2011-12-16  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix sgen

2011-12-09  Jeffrey Stedfast  <jeff@xamarin.com>

	[GetTimeZoneData icall] Fixed logic for zones where there is only
	a start date

	Thanks to Kirill for this patch.

	Bug #2223.

2011-12-08  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix another case where bridge would not be triggered.

2011-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix severe breakage of sgen bridge code. 2nd and 3rd step where
	not been called anymore.

2011-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-bridge.c: * sgen-gc.c: After we split bridge processing in
	two, one step with world stopped and another with world running,
	we introduced the following regression:

	A minor collection starts and find an young bridge object ready to
	be processed. Major heap overflows and a major GC is triggered.
	The object mentioned above will remain collectible and will be
	queued for processing again. Since we do the first step in
	finish_gray_stack, it will be done twice in the above scenario.
	This will cause an assertion due to duplicate entries in the
	hashtable.

	The solution is to split the step that is performed with world
	stopped into another two. One that happens during collections,
	that can be done multiple times per duty cycle and another one
	that is done only once before we restart the world.

	This split has the minor advantage of reducing duplicated work for
	the dfs1 step. Nothing big as this is one of the fastest steps.

2011-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	Remove some dead code

2011-12-06  Rodrigo Kumpera  <kumpera@gmail.com>

	* domain.c: Use mono-tls for the current domain variable. Sgen
	depends on this so it has to be lock free and the io-layer version
	is not.

	Fixes bxc #2326

2011-12-06  Rodrigo Kumpera  <kumpera@gmail.com>

	Move current thread to use mono-tls.

2011-12-01  Paolo Molaro  <lupus@oddwiz.org>

	Fixed complex value type scan (xmarin bug#228).

2011-11-24  Zoltan Varga  <vargaz@gmail.com>

	Save the stack space used by arguments into MonoJitInfo to avoid
	calling mono_arch_get_arg_info () during stack walking, since it
	is not signal safe. Fixes #2190.

2011-11-23  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_card_table_mark_range): The number of
	pages to be marked must be correctly calculated to avoid the case
	when the in-card offset of the start address is bigger than of the
	end address and cause the last card to be skipped.

	Fixes #1917

2011-11-22  Zoltan Varga  <vargaz@gmail.com>

	Fix a crash introduced by
	64d35e3940f7b0e1839c1906855c29862e6ab8c1. Fixes #2150.

2011-11-22  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (mark_ephemerons_in_range): All ephemeron arrays must
	be scanned during a nursery collection since we ignore them during
	remset processing for a good reason.

	In the future we should use cardtable information to avoid
	scanning the whole thing.

	Fixes bxc #1175.

2011-11-20  Zoltan Varga  <vargaz@gmail.com>

	Free debug info for dynamic methods by storing it in malloc-ed
	memory instead of the normal debugger tables. Fixes #731579.

2011-11-15  Rodrigo Kumpera  <kumpera@gmail.com>

	Add JIT counters to the local set of counters we support.

2011-11-04  Zoltan Varga  <vargaz@gmail.com>

	Fix a crash if a profiler is not found. Fixes #1855.

2011-11-03  Rodrigo Kumpera  <kumpera@gmail.com>

	Implement the icalls needed by the new mobile mmap code.

2011-11-02  alexrp  <xtzgzorex@gmail.com>

	Fix call to mono_sgen_gc_unlock () in mono_gc_toggleref_add ().

2011-10-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-toggleref.c: GC backed toggleref machinery. This enables
	embedders to support toggleref style of external memory management
	without hooking up to the host retain/release machinery.

	The API export two entry points. The first let the caller register
	a callback with sgen that decides the state of a given object, by
	probably inspecting its native state. The second allows
	registration of objects with the toggleref machinery.

	The idea of toggleref is that we keep an external reference to an
	object and it can be either a strong or weak reference. We use a
	weak reference when the external peer has no interest into the
	object and a strong otherwise.

2011-10-26  Rodrigo Kumpera  <kumpera@gmail.com>

	Export a bunch of sgen functions for internal usage.

2011-10-13  Rolf Bjarne Kvinge  <rolf@xamarin.com>

	Profiler: add support embedded profilers whose entry point ends
	with _<profiler name>.

2011-10-22  Miguel de Icaza  <miguel@gnome.org>

	Patch from Mario Kosmiskas for Bug 1460: add support for
	Path.GetFileName to work with MONO_IOMAP

2011-10-19  Marek Safar  <marek.safar@gmail.com>

	Fix VolatileRead(uint&), VolatileWrite(uint&,uint) to use correct
	word size

2011-09-29  Zoltan Varga  <vargaz@gmail.com>

	Avoid a crash if mono_debug_open_image_from_memory is called
	without --debug. Fixes #1093.

2011-09-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-bridge.c: Bridge processing must be split in two steps
	because the object scanning step must be done with world stop and
	before we copy the finalizable objects and the ones pointed by
	them.

2011-09-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (finish_gray_stack): We must process ephemerons before
	we check for non track weak refs to make sure we mark those values
	whose only root are their keys.

2011-06-23  Mark Probst  <mark.probst@gmail.com>

	[sgen] Do the bridge callback after the world has been restarted.

	Conflicts:

	mono/metadata/sgen-gc.c

2011-09-25  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Create the first tp thread right away.

	Avoid 500ms delay. Fixes Xamarin bug #1036.

2011-09-19  Miguel de Icaza  <miguel@gnome.org>

	Fix my profiler loader.

	This is what happens when you test on a pre-configured environment
	that already worked fine. This depended on a function that was
	never called so we ended up probing for paths on NULL (repeating
	the same process twice) instead of loading the profiler from the
	installation directory.

2011-09-13  Rodrigo Kumpera  <kumpera@gmail.com>

	Avoid duplicates in the SSC xrefs.

2011-09-13  Rodrigo Kumpera  <kumpera@gmail.com>

	Add logging to sgen-bridge. Log times and sizes.

2011-09-07  Miguel de Icaza  <miguel@gnome.org>

	Fallback: load profiler from the Mono default path. This in
	particular allows users to run mono --profiler=log foo.exe without
	having to set anuy environment variables

2011-09-06  Rodrigo Kumpera  <kumpera@gmail.com>

	Improve exception message.

2011-09-06  Rodrigo Kumpera  <kumpera@gmail.com>

	Add collection logging to sgen.

2011-09-05  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Display more debugging info when epoll fails

2011-09-05  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Fallback to poll() if epoll_create() fails

	From a patch by Zoltan in bug #705190.

2011-02-22  Mark Probst  <mark.probst@gmail.com>

	[sgen] Break tracking weak references as early as possible.

	Our tracking references code aimed to transform tracking
	references into normal weak references the first time their
	targets became unreachable. It was implemented incorrectly though,
	and is not the right thing to do in the first place anyway,
	because tracking references have to keep tracking if the target is
	re-registered for finalization. The incorrect implementation
	inadvertently handled re-registration correctly, but it kept the
	reference intact for one garbage collection cycle too many.

2011-09-01  Rodrigo Kumpera  <kumpera@gmail.com>

	Handle finalizable objects pointed by bridge objects. (cont...)

2011-08-28  Zoltan Varga  <vargaz@gmail.com>

	Allow pointers to structures to be passed in pinvoke, MS seems to
	allow this at least in some cases. Fixes bxc #158. This partially
	reverts c4d9097c5719bc9455593a47d8d7d2585f1219ec.

2011-08-19  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix sgen-arm-mach. It requires some #define juggling. .

2011-08-19  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_is_variant_compatible): Reject valuetypes if
	not the same straight away. This fixes testing IEnumerable<int?>
	with IEnumerable<int>.

	Fixes bxc #185

2011-08-18  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-bridge.c (dyn_array_ensure_capacity): We must correctly
	calculate the size as our allocator asserts when we do it with
	very large allocs.

2011-08-17  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix android's broken pthread_kill under sgen.

2011-08-17  Miguel de Icaza  <miguel@gnome.org>

	updated copyrights

2011-08-17  Miguel de Icaza  <miguel@gnome.org>

	More updates

2011-08-13  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threadpool] Exit on unhandled exceptions only

	Unhandled exceptions will only set the exitcode if there is no
	AppDomain unhandled exception handler. When the exitcode is set,
	the TP will exit for unhandled exceptions.

	Fixes bug #227.

2011-08-12  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threadpool] Work around for a race-condition

	Under some circumstances new_job was not signaled and the
	threadpool threads didn't realized there was a workitem in the
	queue.

	Fixes Xamarin bug #12 and Novell bug #690357.

2011-08-11  Marek Habersack  <grendel@twistedcode.net>

	Compilation fix for e449d41158a205581e7519cc961b7c618f6163a8

2011-08-11  Marek Habersack  <grendel@twistedcode.net>

	[runtime] Fix for Xamarin bug #99. Don't fail to parse assembly
	names with spaces surrounding = in key=value pairs

2011-08-04  Mark Probst  <mark.probst@gmail.com>

	[sgen] Enqueue finalizers after update the pointer.

	If the object was forwarded we read a bogus vtable and hence a
	bogus klass.

2011-08-03  Marek Habersack  <grendel@twistedcode.net>

	[runtime, globalization] Fix for Xamarin bug #161. Fix culture
	info data for certain locale short date formats

	Modified locales which don't use '/' as the short date separator.

2011-07-26  Rodrigo Kumpera  <kumpera@gmail.com>

	OSX won't expose IPV6_PKTINFO unless __APPLE_USE_RFC_3542 is
	defined.

2011-07-26  Mark Probst  <mark.probst@gmail.com>

	[sgen] Use the proper object size when scanning arrays from a card
	table.

	Using the block object size is incorrect since we might scan
	beyond the end of the array.

2011-07-26  Mark Probst  <mark.probst@gmail.com>

	[sgen] Make mono_sgen_safe_object_get_size() handle forwarded
	objects.

	This is sometimes called on forwarded objects from the major
	collector during finalization. Now it doesn't crash anymore.

2011-07-11  Zoltan Varga  <vargaz@gmail.com>

	Fix caching in mono_marshal_get_array_address ().

2011-06-13  Rodrigo Kumpera  <kumpera@gmail.com>

	Allow AssemblyRef flags to have at least ECMA's values. Fixes
	#684613.

2011-06-03  Jonathan Pryor  <jonpryor@vt.edu>

	Simplify building with the Android NDK.

	Check --host against *-*-linux-android* for Android-specific
	configure fixes, and improve **/Makefile.am to simplify Android
	support:

	./configure \ --build=`./config.guess` \
	--host=armv5-linux-androideabi \ --target=armv5-linux-androideabi
	\ --enable-nls=no --with-mcs-docs=no --enable-mcs-build=no \
	CC="/path/to/ndk/arm-linux-androideabi-gcc
	--sysroot=/path/to/sysroot" \ AR="..." AS="..." CPP="..."
	CXX="..." LD="..." RANLIB="..." STRIP="..."
	CFLAGS="-DARM_FPU_NONE=1" CXXFLAGS="-DARM_FPU_NONE=1"

	See also Android NDK docs/STANDALONE-TOOLCHAIN.html.

	The Android NDK/bionic is "interesting", in that it's lacking
	header files and macros normally present on Linux which otherwise
	break the build (e.g. no <link.h> which breaks Boehm support).
	Using --host with an android target works around the known issues,
	simplifying the building of libmonosgen-2.0.so with the Android
	NDK toolchain.

2011-06-01  Rodrigo Kumpera  <kumpera@gmail.com>

	Handle a vtable layout corner case.

	class.c (mono_class_inflate_generic_method_full_checked): Don't
	inflate a method if the provided context won't change it. This
	change, in particular, avoid inflating a generic method of a
	non-generic class if the context has class only vars.

	This fixes #696593 as the above was causing the vtable of Class3
	ending up with an inflated Class1::Method<> that comes from
	inflated Class2<object> parent. Then the parent override pass
	would collect a non-inflated Class1::Method<> overide that would
	then not match the one on the vtable causing Class3 to have an
	abstract method on its vtable and thus failing to load.

	Big explanation means tricky change, might break tons of stuff.

2011-05-30  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (typebuilder_setup_fields): Alloc RVA data on the
	image mempool so it works with a moving collector.

	Fixes #696817

2011-05-18  Marek Habersack  <grendel@twistedcode.net>

	[runtime] When shadow-copying assemblies, use the io portability
	function to find the file.

	This is necessary in situations when managed code pases
	case-insenstive file name and the file on disk uses different
	case. stat(2) would return an error in such situation and, in
	effect, the stat structure would get invalid/random values in its
	fields.

2011-05-15  Zoltan Varga  <vargaz@gmail.com>

	Avoid a crash in Field:GetRawConstantValue () if the field type
	couldn't be loaded. Fixes #693894.

2011-05-03  Zoltan Varga  <vargaz@gmail.com>

	Implement BSTR icalls even when COM is disabled. Fixes #690255.

2011-05-02  Zoltan Varga  <vargaz@gmail.com>

	Fix support for parameters with generic constraints in
	Type.IsAssignableFrom (). Fixes #691119.

2011-04-29  Geoff Norton  <grompf@sublimeintervention.com>

	Remove debug spew

2011-04-28  Zoltan Varga  <vargaz@gmail.com>

	Revert "Modify fixup_cattrs () to handle a corner case where a
	cattr is created using a MonoCMethod instead of a
	ConstructorBuilder. Fixes #689533."

	This reverts commit 046ff98055aff6f49037fe612b6f32271678e8c6.

	This seems to break smcs.exe.

2011-04-26  Zoltan Varga  <vargaz@gmail.com>

	Modify fixup_cattrs () to handle a corner case where a cattr is
	created using a MonoCMethod instead of a ConstructorBuilder. Fixes
	#689533.

2011-04-22  Zoltan Varga  <vargaz@gmail.com>

	Fix AOT support for isinst_with_cache wrappers. Fixes #687865.

2011-04-17  Zoltan Varga  <vargaz@gmail.com>

	Fix Object.MemberwiseClone () on arrays. Fixes #688033.

2011-04-15  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	[corlib] Ensure Thread.ManagedThreadId is unique per thread.

	This fixes bug #667329.

	The problem was that ManagedThreadId was created from a
	per-appdomain counter, but stored in a per-thread storage, so if
	two threads could end up with the same ManagedThreadId if a second
	appdomain executed on the second thread first.

2011-04-14  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Clearing the queue messed up with the per-domain job count

	Fixes bug #687399.

2011-04-13  Marek Habersack  <grendel@twistedcode.net>

	[runtime,IO] Filesystem entries can only be sought for in
	directories, not files.

2011-04-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (restart_threads_until_none_in_managed_allocator): On
	mach we used to simply call thread_suspend/thread_resume without
	updating the thread context, which would result in sgen getting
	hang.

2011-04-01  Rodrigo Kumpera  <kumpera@gmail.com>

	Extract suspend code from mono_sgen_thread_handshake.

	sgen-os-mach.c (mono_sgen_thread_handshake): Extract suspend code
	into new function mono_sgen_suspend_thread.

2011-04-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.h: Since darwin doesn't use signals to stop the target
	threads, we must reserve space for register in SgenThreadInfo.

	* sgen-os-mach.c (mono_sgen_thread_handshake): Don't alloca inside
	the loop. Make sure each thread registers are copied to the right
	place.

2011-04-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-os-mach.c (mono_sgen_thread_handshake): Loop over the
	registered threads insted of asking the kernel to enumerate them.
	Avoid calling pthread_from_mach_thread_np which takes a lock and
	is O(n) on the number of threads.

2011-04-01  Rodrigo Kumpera  <kumpera@gmail.com>

	Store the mach port on SgenThreadInfo

2011-03-30  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Remove printf's

2011-03-30  Zoltan Varga  <vargaz@gmail.com>

	Add some checks to the
	ActivationServices:AllocateUninitializedClassInstance () icall to
	avoid instantiating interfaces/abstract types.

2011-03-30  Zoltan Varga  <vargaz@gmail.com>

	Fix the previous change.

2011-03-30  Zoltan Varga  <vargaz@gmail.com>

	Call SleepEx in a loop in the Thread.Sleep () icall, to avoid a
	race when the sleep is interrupted. Fixes #683519.

2011-03-28  Zoltan Varga  <vargaz@gmail.com>

	Remove some unused fields from MonoDynamicGenericClass.

2011-03-28  Zoltan Varga  <vargaz@gmail.com>

	Fix a case where class->instance_size was not set for dynamic
	classes.

2011-03-21  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	.gitignore

2011-03-21  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[windows] Avoid creating a thread in init

2011-03-18  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[windows] Make the connect hack work again.

2011-03-18  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Revert "Replace old connect hack with _pipe on windows."

	This reverts commit 169183740002a0a38245e0fd045bd51c8be1c200.

2011-03-18  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Revert "Remove unneeded function and use same code for win/lin"

	This reverts commit 59c30ca79c6d9f005b852d071bc26267ca3f192e.

2011-03-17  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Remove unneeded function and use same code for win/lin

2011-03-17  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Replace old connect hack with _pipe on windows.

2011-03-22  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threadpool] Don't start all the IO threads on first request.

	The IO threadpool behaves as the regular one now: threads are
	created on demand up to the default and then they are throttled
	based on load unless Set(Min|Max)Threads is used.

	Fix the stack size for threadpool threads when Set(Min|Max)threads
	is used.

2011-03-09  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Some changes to the threadpool

	-Reduce stack size for IO threads. -Create threads on demand up to
	min_threads, then throttle.

2011-02-19  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threadpool] Add support for kqueue asynch. IO.

2011-03-22  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threadpool] Split the socket code in separate files.

2011-03-23  Marek Habersack  <grendel@twistedcode.net>

	[runtime] Fix compilation

2011-03-23  Miguel de Icaza  <miguel@gnome.org>

	OSX, Win32: Implements support for DriveInfo

	This implements support for DriveInfo for OSX and Windows.

	On OSX we use statfs system call that provides the filesystem type
	information that we need. On Linux, we continue to fallback to
	mtab parsing

2011-03-22  Zoltan Varga  <vargaz@gmail.com>

	Implement OperatingSystem.ServicePack. Fixes #681552.

2011-03-22  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threadpool] Avoid the infame assert in mono-wsq.

	Fixes bug #677746.

2011-03-21  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[windows] Avoid creating a thread in init.

2011-03-18  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Fix the host name returned in GetHostEntry.

	GetHostEntry() was setting the HostName to the last IP address
	returned for the requested host name.

2011-03-17  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[Threadpool] Handle multiple calls to cleanup

	Don't fail if mono_thread_pool_cleanup() is called more than once.
	Fixes bug #678662.

2011-03-16  Zoltan Varga  <vargaz@gmail.com>

	Add a cache for virtual generic thunks to avoid freeing those
	created by AOT.

2011-03-14  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Appdomain refs can be NULL in pop_refs

	This fixes a bunch of test I broke with my previoius commit.

2011-03-14  Mark Probst  <mark.probst@gmail.com>

	[sgen] Debug options for disabling minor and/or major collection.

2011-03-14  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threads] appdomain_refs push/pop speedup

	Replace the GSList with an array to avoid malloc/free on every
	push/pop call.

2011-03-11  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Cache NewLine per AppDomain.

2011-02-05  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[threadpool] Added dynamic concurrent queue implementation

	Replace the big lock around the list+array used to queue work
	items with a dynamic concurrent queue to reduce contention.

2011-03-10  Geoff Norton  <grompf@sublimeintervention.com>

	Fix ARCH_STORE_REGS on arm

2011-03-10  Rodrigo Kumpera  <kumpera@gmail.com>

	mono_gc_alloc_mature must check if the object needs to be
	registered for finalization

2011-03-10  Zoltan Varga  <vargaz@gmail.com>

	Use mono_field_get_type () in one place to fix a crash. Fixes
	#678269.

2011-03-09  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	IO threads have their own name

2011-03-09  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Some changes to the threadpool

	-Reduce stack size for IO threads. -Create threads on demand up to
	min_threads, then throttle.

2011-03-07  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Host name is the same when querying localhost

	The host name is set to the queried host name when it is the local
	machine name. Fixes bug #676260.

2011-03-03  Zoltan Varga  <vargaz@gmail.com>

	Resurrect THREAD_DEBUG.

2011-03-03  Zoltan Varga  <vargaz@gmail.com>

	Change an #ifdef DEBUG to THREAD_DEBUG(). Fixes #676615.

2011-03-02  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_get_unique_iid): Don't store the iid of generic
	instances on their GTD image since they can be unloaded before.

	* metadata.c (free_generic_class): Reset the iid used by
	interfaces.

2011-02-28  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata.c (do_mono_metadata_parse_type): NET 1.1 assemblies can
	have string and object encoded in a denormalized way.

	Fixes #675464.

2011-02-22  Zoltan Varga  <vargaz@gmail.com>

	Avoid returning TRUE from mono_domain_finalize () if it is
	interrupted by sdb. Fixes #673592.

2011-02-20  Zoltan Varga  <vargaz@gmail.com>

	Make the var/mvar caches per-image, since the generic params they
	refer to can be freed on domain unload. Fixes part of #672939.

2011-02-08  Mark Probst  <mark.probst@gmail.com>

	[sgen] Fix some debug functions.

2011-02-16  Geoff Norton  <grompf@sublimeintervention.com>

	Fix ARCH_STORE_REGS on arm to save r0->r12 properly

2011-02-11  Hib Eris  <hib@hiberis.nl>

	Decorate _image_base__ with __MINGW_LSYMBOL

	This fix is needed in compiling for x86_x64.

2011-02-13  Mark Probst  <mark.probst@gmail.com>

	[sgen] Register the main_thread as a GC root. Fixes shutdown
	crashes.

2011-02-13  Zoltan Varga  <vargaz@gmail.com>

	Fix reading of cattr arguments of type Type[]. Fixes #670331.

2011-02-12  Zoltan Varga  <vargaz@gmail.com>

	Fix token generation for TypeBuilder's in another assembly. Fixes
	#671245.

2011-02-09  Hib Eris  <hib@hiberis.nl>

	Earlier undefine HAVE_GETPROCESSID when cross compiling

2011-02-11  Zoltan Varga  <vargaz@gmail.com>

	Make the wait in the finalizer thread alertable to fix sdb on
	windows. Fixes #670619.

2011-02-09  Rodrigo Kumpera  <kumpera@gmail.com>

	Handle assignment check of variant type and its gtd.

2011-02-09  Rodrigo Kumpera  <kumpera@gmail.com>

	* gc.c (finalize_domain_objects): Clear reference queues on domain
	unload after running all finalizers.

2011-02-08  Miguel de Icaza  <miguel@gnome.org>

	Update docs

2011-02-03  Miguel de Icaza  <miguel@gnome.org>

	Add prototype to .h file

2011-01-31  Lucas Meijer  <lucas@unity3d.com>

	implement mono_set_assemblies_path for platforms that cannot set
	MONO_PATH environment variable.

2011-02-08  Rodrigo Kumpera  <kumpera@gmail.com>

	* gc.c (finalizer_thread): Clean reference queues after finalizers
	are called to give boehm a chance to resurrect it.

2011-02-07  Hib Eris  <hib@hiberis.nl>

	Use winternl.h instead of ddk (when available)

	These changes are nescessary for compiling with a mingw-w64
	compiler.

2011-02-07  Hib Eris  <hib@hiberis.nl>

	Remove implementation details from public header io-layer.h

	The macro HAVE_GETPROCESSID is defined in config.h and should not
	be exposed in public headers.

2011-02-07  Zoltan Varga  <vargaz@gmail.com>

	Use mono_method_get_vtable_slot () instead of accessing
	method->slot directly. Fixes #669808.

2011-02-03  Zoltan Varga  <vargaz@gmail.com>

	Add support for --debug=casts to Array:SetValue (). Fixes #668851.

2011-02-03  Zoltan Varga  <vargaz@gmail.com>

	Fix a warning.

2011-02-02  Rodrigo Kumpera  <kumpera@gmail.com>

	* gc.c (mono_gc_cleanup): Cleanup all reference queues after
	regular finalization.

	* reflection.c: The dynamic method ref queue is finalized by the
	runtime itself.

	* runtime.c: Ditto.

2011-02-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c: Use a reference queue to cleanup dynamic methods
	instead of finalization.

	* runtime.c: Shutdown the dynamic method queue before runtime
	cleanup begins.

	* icall-def.h: Remove unused dynamic method icall.

	Fixes #660422

2011-02-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* gc.c: A reference queue allows one to queue callbcks for when
	objects are collected. It allows for safe cleanup of objects that
	can only be done when it is effectively collected. The major
	difference with regular finalization is that the collector makes
	sure the object was collected - and can't be resurrected.

	* gc-internal.h: Export entrypoints for the new API.

2011-02-01  Zoltan Varga  <vargaz@gmail.com>

	Make caching in mono_marshal_get_virtual_stelemref () thread-safe.
	Fixes #668489.

2011-01-31  Marek Habersack  <grendel@twistedcode.net>

	[runtime] AddWatcher icall must look up the path in an IOMAP-aware
	way

2011-01-29  Marek Habersack  <grendel@twistedcode.net>

	[runtime] Use IOAMP-aware method of looking for domain
	configuration file

2011-01-30  Jo Shields  <directhex@apebox.org>

	Really fix sgen on PowerPC Linux. Assembler on Linux requires that
	register names are just bare numbers, unlike OSX, i.e. "r0" must
	be "0" on Linux.

2011-01-29  Geoff Norton  <grompf@sublimeintervention.com>

	Typo

2011-01-28  Geoff Norton  <grompf@sublimeintervention.com>

	Avoid a crash when shutting down jit attached threads

2011-01-28  Geoff Norton  <grompf@sublimeintervention.com>

	Ensure we setup the vtable before accessing it

2011-01-27  Zoltan Varga  <vargaz@gmail.com>

	Fix AOT support for types in the EXPORTEDTYPE table.

2011-01-27  Zoltan Varga  <vargaz@gmail.com>

	Applied patch from Burkhard Linke
	<blinke@cebitec.uni-bielefeld.de>. Add support for newer boehm-gc
	versions.

2011-01-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (mono_marshal_get_delegate_invoke): If the target is a
	static method with first arg bound and it belongs to a different
	assembly than the delegate we might end up with a freed signature
	in the hashtable.

	Fix a moonlight crash.

2011-01-24  Mark Probst  <mark.probst@gmail.com>

	[sgen] Don't assert when on Android.

2011-01-20  Mark Probst  <mark.probst@gmail.com>

	[sgen] Make the second bridge DFS pass use an implicit stack to
	avoid stack overflow.

2011-01-19  Mark Probst  <mark.probst@gmail.com>

	[sgen] Use an explicit stack instead of recursion for the first
	DFS pass in the bridge code.

2011-01-19  Mark Probst  <mark.probst@gmail.com>

	[build] pkg-config support for libmonosgen.

2011-01-16  Mark Probst  <mark.probst@gmail.com>

	[sgen] Bridge cross references pass.

	This is an extension for the benefit of the Mono/Java bridge on
	MonoDroid. We go through all finalizable objects and report the
	strongly connected components of bridge objects and their
	connections between each other.

2011-01-24  Geoff Norton  <grompf@sublimeintervention.com>

	Avoid leaking the vmmap allocated by the kernel for the
	thread_act_array_t

2011-01-24  Geoff Norton  <grompf@sublimeintervention.com>

	Fix a mach port leak

2011-01-21  Bassam Tabbara  <bassam@symform.com>

	Fix for 666225

2011-01-21  Zoltan Varga  <vargaz@gmail.com>

	Transition non perf-critical users of klass->has_finalize over to
	mono_class_has_finalizer ().

2011-01-21  Zoltan Varga  <vargaz@gmail.com>

	Initialize klass->has_finalizer lazily. This allows us to remove
	the find_method_in_metadata () optimization without a perf cost
	which is broken in the presence of overrides. Fixes #665769.

2011-01-20  Jb Evain  <jbevain@gmail.com>

	[bug] Prevent a GetMethodBody call on a dynamic method. Fixes
	665788

2011-01-19  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (finish_gray_stack): We must clear weak refs that
	don't track resurrection before processing finalizable objects
	otherwise we'll copy/mark them and the weak ref won't be cleared
	until after finalization.

	Fixes #657408

2011-01-18  Zoltan Varga  <vargaz@gmail.com>

	Disable some of the FastCopy fast paths since they are racy.

2011-01-18  Zoltan Varga  <vargaz@gmail.com>

	Allow only primitive types/enums in RuntimeHelpers.InitializeArray
	().

2011-01-17  Zoltan Varga  <vargaz@gmail.com>

	Make runtime invoke wrappers use cdecl cconv on windows.

2011-01-17  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (is_valid_generic_instantiation): Don't check if any
	argument is broken during constraint check as an instance should
	be valid, but not realizable, even if it has broken arguments.

	Fixes one of the issues with #664612

2011-01-17  Zoltan Varga  <vargaz@gmail.com>

	Fix the previous marshalling change so it only applies to chars,
	not structures which contain char fields.

2011-01-16  Zoltan Varga  <vargaz@gmail.com>

	Pass the string encoding to emit_struct_conv () so marshalling of
	char arrays works on big-ending machines like s390/ppc64.

2011-01-13  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix 2.0 remapping of System.Transations to 2.0 and not 3.5.

2011-01-12  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c: mono_class_is_assignable_from can't handle
	IList<GTD<T>> x GTD[] since GTD[] won't have the right iface slots
	set. This isn't a problem for the runtime since GTD[] will never
	happen as it's an unrealizable type.

	Fixes #663815

2011-01-12  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_type_is_valid_type_in_context_full): The trick of
	encoding the GTD as an instantiation over its own arguments is
	also valid for component types such as GTD[] GTD[,] and Foo<GTD>.

2011-01-12  Atsushi Eno  <atsushi@ximian.com>

	Fix cygwin build.

2011-01-11  Zoltan Varga  <vargaz@gmail.com>

	Fix a regression introduced by db4299a1.

2011-01-10  Rodrigo Kumpera  <kumpera@gmail.com>

	* assembly.c: * domain.c: * image.c: * coree.c: Coree funcionality
	is now under the ENABLE_COREE define that is not set by default.
	The current code breaks the verification infrastructure.

2011-01-10  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_get_virtual_methods): Handle missing methods
	in the methods array.

	Fixes #572223

	Patch by Sebastien Pouliot <spouliot@novell.com>

2011-01-07  Rodrigo Kumpera  <kumpera@gmail.com>

	Remove debug spew

2011-01-06  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (emit_marshal_custom): If the lookup for
	ICustomMarshaler fails, emit code to raise an exception instead of
	asserting.

	Fixes #560334

2011-01-06  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_method_verify): If neither the method or its
	class is generic a signature can't have type parametets.

	Fixes #662238

2011-01-05  Mark Probst  <mark.probst@gmail.com>

	[sgen] Always use the GC descriptor instead of
	MonoClass.has_references.

	has_references can be set even though the class has no references
	registered by the GC. One case is Ephemeron. Now we always go by
	the GC descriptor which holds the information relevant to SGen.

	This fixes a crash in the 4.0 corlib testsuite.

2011-01-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_generic_class_get_class): Use the checked version
	of mono_class_inflate_generic_class to avoid aborting on error.

	Fixes #560327

2011-01-04  Elijah Taylor  <elijahtaylor@google.com>

	fix IMT_REG assignments that got switched for non-nacl builds,
	provide no-op versions of nacl routines to avoid #ifdef's all over

2011-01-03  Zoltan Varga  <vargaz@gmail.com>

	Implement VBByRefStr marshalling. Fixes #661917.

2011-01-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c: The copy versions of type/hash functions is no
	longer needed. Just get rid of them which brings some niceties
	such such as support for FNPTR.

2011-01-03  Zoltan Varga  <vargaz@gmail.com>

	Fix a warning.

2011-01-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_implement_interface_slow): If the reflection
	type has not been realized, ignore it since can't affort to do it
	from here.

	Fixes #656262

2011-01-03  Paolo Molaro  <lupus@oddwiz.org>

	Allow the special ECMA key when parsing assembly names
	(bug#660570).

2011-01-03  Zoltan Varga  <vargaz@gmail.com>

	Avoid computing GC maps if precise stack marking is disabled.

2011-01-03  Zoltan Varga  <vargaz@gmail.com>

	Make conservative stack marking the default for now.

2011-01-03  Zoltan Varga  <vargaz@gmail.com>

	Fix some merge problems.

2010-11-10  Zoltan Varga  <vargaz@gmail.com>

	Remove obsolete conservative-stack-mark MONO_GC_DEBUG option, it
	is superseded by a MONO_GC_PARAMS option.

2010-10-11  Zoltan Varga  <vargaz@gmail.com>

	Add stats for the number of pinned objects during all collections.
	Avoid scanning the frames above the start_wrapper () frame. Rework
	start_wrapper () to avoid references to the Thread object, so
	hopefully it won't get pinned.

2010-10-05  Zoltan Varga  <vargaz@gmail.com>

	Log to stdout by default, so it matches up with the output of the
	program.

2010-10-05  Zoltan Varga  <vargaz@gmail.com>

	Share the log file between sgen and the stack marking code.

2010-10-04  Zoltan Varga  <vargaz@gmail.com>

	Revert "Flush the actual file too in binary_protocol_flush_buffers
	()."

	This reverts commit 27bb69444433cd4eda1fccfcd45fcc619559a29d.

2010-10-04  Zoltan Varga  <vargaz@gmail.com>

	Flush the actual file too in binary_protocol_flush_buffers ().

2010-10-02  Zoltan Varga  <vargaz@gmail.com>

	Allow an argument to collect-before-allocs to force sgen to do a
	minor collection every N allocations. Implement
	major_ptr_is_in_non_pinned_space ().

2010-09-26  Zoltan Varga  <vargaz@gmail.com>

	Add an option to turn on CLEAR_AT_GC.

2010-09-25  Zoltan Varga  <vargaz@gmail.com>

	Don't assert in describe_ptr () for oldspace pointers.

2010-09-22  Zoltan Varga  <vargaz@gmail.com>

	Add a free callback to sgen, use it to free our TLS data.

2010-09-22  Zoltan Varga  <vargaz@gmail.com>

	Add the conservative-stack-mark option to the MONO_GC_DEBUG help.

2010-09-06  Zoltan Varga  <vargaz@gmail.com>

	Ongoing work.

2011-01-03  Miguel de Icaza  <miguel@gnome.org>

	[mscorlib] inside mscorlib Platform's value will be correct for
	OSX, but userland still gets Unix.

	This change allows mscorlib to get the real PlatformID, to split
	code between OSX and general Unix. We continue to expose the value
	4 (Unix) to usercode as changing this might break user
	applications.

2011-01-03  Zoltan Varga  <vargaz@gmail.com>

	.gitignore.

2010-12-24  Zoltan Varga  <vargaz@gmail.com>

	Partially revert 759ebbb3df836e82fac2443dea23659ede972ce7: pass
	the 'err' argument to mono_dl_open () again. Fixes #661356.

2010-12-24  Zoltan Varga  <vargaz@gmail.com>

	Remove an obsolete comment.

2010-12-21  Andreia Gaita  <shana@jitted.com>

	Moonlight build fixes and cleanup

2010-12-20  Mark Probst  <mark.probst@gmail.com>

	[sgen] Make Mark&Sweep compile without card tables.

2010-12-19  Zoltan Varga  <vargaz@gmail.com>

	Add functions to access values of ThreadStatic fields from another
	threads.

2010-12-17  Andreia Gaita  <shana@jitted.com>

	Add --with-moon-gc to select the gc to use with moon (boehm/sgen)

2010-12-17  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[ThreadPool] Reset the abort state when unloading a domain

	Properly reset the abort state of threadpool threads that
	processed domain unloading or were running in a domain that was
	being unloaded.

	Thanks go to Kumpera for finding this out.

2010-12-14  Elijah Taylor  <elijahtaylor@google.com>

	Merge mono/io-layer, mono/metadata, mono/arch/x86 and configure.in
	for Native Client

2010-12-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* appdomain.c (unload_thread_main): Call function bindings
	cleanup.

	* assembly.c (mono_assembly_apply_binding): Dupe the content of
	per-domain bindings. Assign a domain_id on such entries to be
	possible to track them later.

	* assembly.c (mono_assembly_cleanup_domain_bindings): New function
	that removes per-domain bindings on unload.

	* metadata-internals.h (MonoAssemblyBindingInfo): Add domain_id
	field so it's possible to track if an entry is appdomain bound.

2010-12-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (emit_struct_conv): Take the native type of the field
	to decide what kind of conv to use if field is of type char.

	* marshal.c (mono_pinvoke_is_unicode): Unify auto and default.

	* marshal.c (emit_struct_conv_full): Kill this variant that
	doesn't make any sense as structures are marshaled in the same way
	regardless of the charset of the method.

	* metadata.c (mono_type_to_unmanaged): Handle marshalspec for
	char.

	Fixes the regression on MD caused by 1f3cfba.

2010-12-12  Bojan Rajkovic  <bojan@airpoweranalytics.com>

	Use SIGXFSZ on FreeBSD too by checking for the __FreeBSD__ define.
	Like Apple and OpenBSD, it doesn't have SIGPWR.

2010-12-10  joncham  <joncham@gmail.com>

	Use 2.0 instead of 1.0 when probing install dirs.

2010-12-10  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: call mono_field_get_type_checked to ensure
	the field's type is resolved since coreclr checks can occurs
	before the "normal" check done by mono. Fix crashes in DRT#8005

2010-12-10  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (emit_struct_conv): Add _full variant that takes an
	extra boolean argument to tell if char is to be marshaled with one
	or two bytes.

	* marshal.c (emit_marshal_array): Use emit_struct_conv_full to
	correctly marshal ansi char arrays.

2010-12-09  Rodrigo Kumpera  <kumpera@gmail.com>

	Add a few more undocumented bits to allowed AssemblyFlags

	Fixes #657516

2010-12-09  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (verify_typedef_table): Fail if the token
	index is encoded as zero.

	Fixes #651682

2010-12-08  Geoff Norton  <grompf@sublimeintervention.com>

	Avoid leaking the name buffer since we already resolve this below

2010-12-08  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (lookup_custom_attr): Since we memdup the returned
	cattr, we better mark it as not cached.

2010-12-08  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_type_is_valid_type_in_context): Refuse a GTD if
	not at a root positision.

	Fixes #656913

2010-12-08  Zoltan Varga  <vargaz@gmail.com>

	Mark runtime invoke wrappers as pinvoke, since they are called
	from native code.

2010-12-08  Zoltan Varga  <vargaz@gmail.com>

	Update a comment.

2010-12-08  Mark Probst  <mark.probst@gmail.com>

	[sgen] Have an allocated block list for fixed-heap M&S, too.

	It turns out we iterate over all allocated blocks often enough
	that the way we did it for fixed-heap Mark&Sweep (iterating over
	all blocks and jumping over the non-allocated ones) slows us down
	considerably. So, use the same allocated block list as "regular"
	Mark&Sweep, which also unifies the code a bit.

2010-12-08  Mark Probst  <mark.probst@gmail.com>

	[sgen] Don't increase degraded_mode in alloc_degraded().

	Mature allocation uses the degraded allocation machinery to
	allocate objects in the major space. Modifying degraded_mode in
	those cases will actually put us into degraded mode which slows us
	down immensely.

2010-12-08  Zoltan Varga  <vargaz@gmail.com>

	Tidy up the assembly loading log messages a bit.

2010-12-07  Zoltan Varga  <vargaz@gmail.com>

	Log images still loaded during shutdown.

2010-12-07  Zoltan Varga  <vargaz@gmail.com>

	Fix some small memory leaks.

2010-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c
	(mono_verifier_verify_memberref_method_signature): Memberref
	method signatures allow sentinels.

2010-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_delegate_type_equal): Properly check if candidate
	is a pointer type.

	Fixes #657746

2010-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_create_from_typedef): Set failed enums to
	extends int32 as the whole runtime can't handle this been null.

	Fixes #657745

2010-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_newobj): Honor skip visibility request.

	* verify.c (do_load_function_ptr): Ditto.

	Fixes #657694

2010-12-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* loader.c: Use new split functions.

	* metadata-verify.c (parse_custom_mods): Make sure encoded type
	tokens are not zero.

	* metadata-verify.c (parse_generic_inst): Ditto.

	* metadata-verify.c (parse_type): Ditto.

	* metadata-verify.c (mono_verifier_verify_memberref_signature):
	Replace this function with a pair that does field or method
	verification.

	Fixes #656914

2010-12-06  Zoltan Varga  <vargaz@gmail.com>

	Fix a few SRE memory leaks.

2010-12-06  Zoltan Varga  <vargaz@gmail.com>

	Remove some #ifdef HAVE_SGEN_GC deps, centralize others to
	gc-internal.h.

2010-12-05  Zoltan Varga  <vargaz@gmail.com>

	Make sgen-protocol.c into its own module.

2010-12-04  Zoltan Varga  <vargaz@gmail.com>

	Fix a warning.

2010-12-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_ldstr): We encode string tokens in a weird way in
	dynamic modules.

2010-12-03  Rodrigo Kumpera  <kumpera@gmail.com>

	Handle one more case we cmods can appear in odd places.

2010-12-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (parse_generic_inst): A ginst param can have a
	cmod.

	* metadata-verify.c (parse_param): We can have a cmod after the
	byref.

	* metadata-verify.c (parse_property_signature): A property
	signature can have a cmod on the parameters.

	Fixes the verifier for #656787

2010-12-03  Mark Probst  <mark.probst@gmail.com>

	[sgen] Make concurrent sweep user-selectable.

	It's off by default for now.

2010-12-02  Mark Probst  <mark.probst@gmail.com>

	[sgen] Compute allowance when sweeping is finished.

	Before sweeping hasn't finished we don't know how many major
	blocks are in use, so we delay computing the minor collection
	allowance until sweeping is done. In the mean time we use the
	minimum allowance.

2010-12-01  Mark Probst  <mark.probst@gmail.com>

	[sgen] Concurrent sweep.

2010-12-03  Zoltan Varga  <vargaz@gmail.com>

	Parse custom modifiers in mono_type_create_from_typespec ().

2010-12-01  Mark Probst  <mark.probst@gmail.com>

	[sgen] Remove skip_size in sgen-scan-object.h.

	Dead code.

2010-12-01  Mark Probst  <mark.probst@gmail.com>

	[sgen] Handle forwarding in mono_gc_scan_for_specific_ref().

	This function is used for debugging purposes only. Previously it
	didn't handle forwarding which meant that it couldn't be used
	during a collection.

2010-12-01  Mark Probst  <mark.probst@gmail.com>

	[sgen] Zero freed blocks in fixed heap Mark&Sweep.

	Fresh blocks must be zeroed, which means that when we free blocks
	we must ensure that they are zeroed before they are used again.

2010-12-01  Zoltan Varga  <vargaz@gmail.com>

	Make sgen-los.c into a proper C module.

2010-12-01  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix thread attaching

2010-12-01  Zoltan Varga  <vargaz@gmail.com>

	Move the DEBUG() macro to sgen-gc.h and resurrect debug logging in
	the major collectors.

2010-12-01  Zoltan Varga  <vargaz@gmail.com>

	Fix some warnings.

2010-12-01  Zoltan Varga  <vargaz@gmail.com>

	Handle LOS objects in describe_ptr ().

2010-12-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_load_function_ptr): Handle wrappers correctly.

	* verify.c (do_sizeof): Remove superfluous check.

	* verify.c (do_ldstr): Handle wrappers correctly.

2010-12-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata.c (mono_type_to_unmanaged): Return the appropriate type
	for char based on unicode option.

	* marshal.c (emit_marshal_array): Calculate char size based on
	marshaling preferences.

	Fixes #647267

2010-11-30  Rodrigo Kumpera  <kumpera@gmail.com>

	* gc.c: Implement mono_gc_alloc_mature for boehm and null-gc.

	* sgen-gc.c (mono_gc_alloc_mature): Alloc using the degrated
	machinery.

	* threads.c (create_internal_thread_object): Alloc using
	mono_gc_alloc_mature instead of mono_gc_alloc_pinned_obj as the
	later requires explicit freeing and we don't do it.

	* threads.c (create_thread_object): Ditto.

2010-11-30  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (check_interface_method_override): Check if signatures
	decoded correctly before comparing them.

	Fixes #541815

2010-11-30  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix token checking for dynamic methods.

2010-11-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (token_bounds_check): Check if token index is zero.

	Fixes #651682

2010-11-29  Rodrigo Kumpera  <kumpera@gmail.com>

	Remove some junk I left by accident

2010-11-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* security-core-clr.c (get_default_ctor): Handle nulls in
	MonoClass::methods.

	Fixes #569542

2010-11-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (mono_image_create_token): Don't mono_class_init
	here as it's not needed and break mcs for cases doing typeof()
	over broken types.

	Fixes a TLE in #653211

2010-11-29  Rodrigo Kumpera  <kumpera@gmail.com>

	WIP

2010-11-25  Mark Probst  <mark.probst@gmail.com>

	[sgen] Recompute heap boundaries at each major collection.

	Previously we updated heap boundaries when a new block was
	allocated, but no updates were performed for freed blocks,
	resulting in a constant increase in the heap boundaries which can
	lead to unnecessary work during pinning.

	Now we recompute the heap boundaries during the sweep phase at
	each major collection.

2010-11-29  Paolo Molaro  <lupus@oddwiz.org>

	Forgot old header file in profiler.c.

2010-11-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (make_generic_param_class): Don't assert if parent is
	broken.

	Fixes #653211

2010-11-29  Paolo Molaro  <lupus@oddwiz.org>

	Profiler: reomved the old builtin default profiler.

	The new log profiler is now used automatically instead of the old
	default profiler.

2010-11-27  Rodrigo Kumpera  <kumpera@gmail.com>

	Remove some culture caching dead code

2010-11-27  Rodrigo Kumpera  <kumpera@gmail.com>

	* threads.c: Remove culture caching machinery.

	* icall-def.h: Ditto.

	Fixes #318750 as a byproduct.

2010-11-27  Zoltan Varga  <vargaz@gmail.com>

	Throw an exception if a custom attr cannot be decoded. Fixes
	#656058.

2010-11-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_verifier_is_enabled_for_method): A dynamic method
	has a different wrapper kind than regular methods.

	* verify.c (mono_verifier_is_method_full_trust): Dynamic methods
	can't be handled as fulltrust since they don't store proper origin
	for verifying it.

2010-11-26  Zoltan Varga  <vargaz@gmail.com>

	Fix the DISABLE_REFLECTION_EMIT build.

2010-11-26  Zoltan Varga  <vargaz@gmail.com>

	Fix crashes inside find_method_in_metadata (). Fixes #561728.

2010-11-25  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
	CreateDelegate can be called with an abstract method in a similar
	fashion to how ldvirtftn works.

	Fixes #655741

2010-11-25  Zoltan Varga  <vargaz@gmail.com>

	Fix a bug introduced by the last change to
	mono_marshal_get_virtual_stelemref () in
	r038598e503d3db631224288ca5295988c3d22288.

2010-11-25  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c: Add new function to internal verifier API to check
	method instantiations.

	* reflection.c (mono_reflection_bind_generic_method_parameters):
	Check the instantiation before returning it.

	Fixes #655847

2010-11-25  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix argument name on the exception

2010-11-25  Rodrigo Kumpera  <kumpera@gmail.com>

	* gc.c (alloc_handle): Set domain_ids if it's a weak ref handle.

	* gc.c (mono_gchandle_set_target): Ditto.

	Fixes #655669

2010-11-24  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_setup_interfaces): Don't free
	MonoClass::interfaces on failure since this is now allocated from
	a mempool.

	Fixes #655749

2010-11-24  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[Sockets] Support Remote/LocalEndPoint for AF_UNIX

	We were not handling correctly the AF_UNIX family when getting the
	socket name or the peer name.

	Fixes bug #655637.

2010-11-24  Andreia Gaita  <shana@jitted.com>

	[Moon] Speed up the moonlight build by stripping it down to the
	bare basics

2010-11-23  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_Type_MakeGenericType): We can inflate into
	the gtd and the verifier function is not able to handle it.

2010-11-23  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix typo.

2010-11-23  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix some array overflow bugs

2010-11-23  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_init): Check instantiations of generic
	instances.

	* icall.c (ves_icall_Type_MakeGenericType): Ditto.

	* verify.c: Add mono_verifier_class_is_valid_generic_instantiation
	to the internal API so generic instances can be checked.

	Fixes #654136

2010-11-22  Zoltan Varga  <vargaz@gmail.com>

	Fix a memory leak.

2010-11-22  Zoltan Varga  <vargaz@gmail.com>

	Allocate memory for generic instances from the mempool of the
	image set they belong to. Use this to simplify the freeing of
	these instances.

2010-11-22  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (is_valid_fixed_param): Handle arrays of
	types. They can be encoded as 0x1B or 0x50.

	* metadata-verify.c (is_valid_cattr_content): Ditto.

	Fixes #655159

2010-11-21  Zoltan Varga  <vargaz@gmail.com>

	Allocate generic param constraint data from the image mempool.

2010-11-21  Zoltan Varga  <vargaz@gmail.com>

	Fix some small memory leaks.

2010-11-20  Zoltan Varga  <vargaz@gmail.com>

	Add support for the processorArchitecture field in assembly names.
	Fixes #655096.

2010-11-19  Mark Probst  <mark.probst@gmail.com>

	[sgen] Implement evacuation for parallel mark.

2010-11-18  Mark Probst  <mark.probst@gmail.com>

	[sgen] Use bit fields for the booleans in MSBlockInfo.

2010-11-18  Rodrigo Kumpera  <kumpera@gmail.com>

	* loader.c (method_from_methodspec): Don't crash if parsing of the
	generic instance fails.

	Fixed #560834

2010-11-18  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_invoke_method): Make sure the returned value is
	valid in the caller's context.

	Fixes #562324

2010-11-17  joncham  <joncham@gmail.com>

	Undefine AF_INET6 on windows to disable IPv6 for now.

2010-11-17  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Updated remove_wsq.

	remove_wsq() should only clean up the queue when the runtime is
	shutting down. In any other case, removing a queue that still
	contains work items is an error.

2010-11-17  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Fix typo.

	Thanks Rolf debugging this.

2010-11-17  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Wrong return value in mono_sem_timedwait()

	The return value of mono_sem_timedwait() with a timeout 0 was
	incorrect (0=failure, !0=success instead of 0=success). This
	worked on non-Windows platforms because the only call with timeout
	0 was expecting the incorrect return value, but it made the mono
	threadpool in Windows fail.

	Fixes bug #653928.

2010-11-17  Rodrigo Kumpera  <kumpera@gmail.com>

	* loader.c (find_method_in_class): Properly handle failure of
	loading a method.

	* loader.c (find_method_in_class): Handle method load failure. We
	can't just bail out since working code depends on working while
	having broken methods in the mix.

	Fixes #562009

2010-11-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* loader.c (find_method): Instead of asserting when a type has its
	interfaces missing, ignore them and keep searching.

	Fixes #560346

2010-11-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_is_assignable_from): Simply return false if
	any of the arguments is broken.

	Fixes #651287

2010-11-16  Paolo Molaro  <lupus@oddwiz.org>

	* profiler-private.h, profiler.c, profiler.h: added API to
	enumerate the roots used during a garbage collection. * sgen-gc.c:
	enumerate roots if requested by the profiler.

2010-11-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (verify_cattr_table): Type column can't have a
	zero index.

	Fixes #651682

2010-11-15  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (mono_reflection_method_on_tb_inst_get_handle):
	Ensure the typebuilder had it's generic arguments initialized.

	Fixes #652952

2010-11-14  Zoltan Varga  <vargaz@gmail.com>

	Remove the unused and incomplete CMake build scripts for now.

2010-11-13  Vincent Povirk  <madewokherd@gmail.com>

	Convert MONO_MARSHAL_CONV_LPSTR_STR to mono_string_to_utf16 on
	windows.

2010-11-13  Zoltan Varga  <vargaz@gmail.com>

	Fix a typo (DISABLE_SOCKET->DISABLE_SOCKETS).

2010-11-13  Zoltan Varga  <vargaz@gmail.com>

	Use CloseHandle () for closing process handles if HOST_WIN32 is
	defined, so it works on windows based cross compilers.

2010-11-12  Paolo Molaro  <lupus@oddwiz.org>

	GC: changed the heap walk API to also report the offset of
	referenced objects.

2010-11-12  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-marksweep.c (major_copy_or_mark_object): Stop evacuating
	major objects if we fail to alloc them.

2010-11-11  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Don't disable IPv6 if bulding with VS.

	When building with Cygwin or a cross-compiler there are at least 4
	functions that are not present (inet_ntop, getaddrinfo,
	getnameinfo and freeaddringo) so in these cases we just disable
	IPv6. Note that Socket.OSSupportsIPv6 will still return true.

	When building with VS, IPv6 will be supported without a problem.

2010-11-11  Zoltan Varga  <vargaz@gmail.com>

	Define mono_gc_get_card_table () for boehm/null gc too, to reduce
	the number of sgen dependencies in mini/.

2010-11-10  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-marksweep.c (major_copy_or_mark_object): Until we figure
	out how to handle OOM while evacuating major objects lets assert.

2010-11-10  Rodrigo Kumpera  <kumpera@gmail.com>

	Handle OOM on string intern icall.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	Handle OOM with string interning.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	Handle OOM with string interning.

2010-11-10  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-marksweep.c (major_copy_or_mark_object): Use a loop around
	CAS'ng on failed memory allocation to make sure we have the right
	behavior in place.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (collect_nursery): If any object was pinned after
	initial pinning, sort the queue so build_nursery_fragments will
	see the aditional objects. If pinning due to OOM happened ask for
	a major collection.

	* sgen-gc.c (major_do_collection): Adjust the pin queue if OOM
	happened. Here we have to clean discarded entries before
	optimizing the queue or we might end with interior pointers in the
	mix.

	* sgen-gc.c (sgen_collect_major_no_lock): New function so major
	collectors can trigger a collection. They can't use public API
	since the gc lock is not meant to be reentrant.

	* sgen-major-copy-object.h (copy_object_no_checks): Pin the object
	if we can't promote it.

	* sgen-marksweep.c (alloc_obj): Return null if we fail to allocate
	a block for a given freelist size.

	* sgen-marksweep.c (major_alloc_degraded): Ditto.

	* sgen-marksweep.c (major_copy_or_mark_object): Handle OOM.

	* sgen-marksweep.c (major_alloc_small_pinned_obj): If allocation
	fails, try a major collection since this is memory requested by
	the runtime and it's much harder to handle failure.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (need_major_collection): Add a space_needed parameter
	that is checked against the available space quota.

	* sgen-gc.c (alloc_degraded): Adjust call to
	need_major_collection. Pass zero as space_needed since it's won't
	help to do a major gc if we're already doing degrated alloc and
	old gen is full.

	* sgen-gc.c (alloc_large_inner): Pass size to
	need_major_collection as shrinking major might be needed to meet
	the space quota for.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c: Simple accounting with no los/major reserve.

	* sgen-los.c: * sgen-marksweep.c: Account for allocation and
	release of memory. Fail to allocate if above alloc quota.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (mono_gc_alloc_obj_nolock): * sgen-gc.c
	(mono_gc_alloc_obj): * sgen-gc.c (mono_gc_alloc_vector): *
	sgen-gc.c (mono_gc_alloc_array): * sgen-gc.c
	(mono_gc_alloc_string): * sgen-gc.c (mono_gc_alloc_pinned_obj):
	Handle allocation failure.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (mono_gc_base_init): Added new parameter. Right now it
	is not used.

2010-10-28  Rodrigo Kumpera  <kumpera@gmail.com>

	Add boehm support for max-heap-size.

	boehm-gc.c (mono_gc_base_init): Check MONO_GC_PARAMS environment
	variable for max-heap-size.

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (mono_sgen_parse_environment_string_extract_number):
	Move this function to gc.c and rename.

2010-10-28  Rodrigo Kumpera  <kumpera@gmail.com>

	* object.c (mono_print_unhandled_exception): We can't really do a
	ToString () during an OOM.

2010-11-10  Zoltan Varga  <vargaz@gmail.com>

	Allocate MonoInternalThread/MonoThread objects using
	mono_gc_alloc_pinned () when using sgen, since they will be pinned
	anyway.

2010-11-10  Zoltan Varga  <vargaz@gmail.com>

	Fix a warning.

2010-11-10  Paolo Molaro  <lupus@oddwiz.org>

	* gc.c: set the name of the finalizer thread. * threadpool.c: set
	the name of the threadpool worker threads.

2010-11-10  Paolo Molaro  <lupus@oddwiz.org>

	* profiler-private.h, profiler.c, profiler.h: users can now get a
	callback when the name of a thread gets set when
	MONO_PROFILE_THREADS is enabled. * threads.c: notify profilers
	about thread name changes.

2010-11-09  Paolo Molaro  <lupus@oddwiz.org>

	* profiler-private.h, profiler.c, profiler.h: new API to get
	notiffications when GC handles are created or destroyed. * gc.c:
	notify the profiler on GC handle creation/destruction.

2010-11-09  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_generic_param_is_constraint_compatible): Handle
	transitive constraints where one type can only satisfy the
	constraints required by means of the other types it's constainted
	to. For example:

	Bar<K> where K : IFace Foo<T, U> where T : U where U : IFace
	Bar<T>

	On the above example, T can only satisfy K constraint by means of
	the constraints that U has.

2010-11-09  Zoltan Varga  <vargaz@gmail.com>

	Fix the DISABLE_REFLECTION_EMIT build. Fixes #652188.

2010-11-08  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (verifier_load_field): Fail if the field is literal.

	Fixes #595044

2010-11-08  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (is_valid_method_header): The local token
	cannot have a zero index.

	* metadata.c (mono_metadata_parse_mh_full): Fail if locals token
	index is zero.

	Fixes #651682

2010-11-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata.c (do_mono_metadata_parse_type): It's possible that
	we're decoding a reference to a class that it's currently been
	loaded so byval_arg.type will be zero.

2010-11-06  Mark Probst  <mark.probst@gmail.com>

	[sgen] Don't compile evacuation for parallel mark.

	Parallel Mark doesn't yet support evacuation, so don't compile it
	in.

2010-10-30  Mark Probst  <mark.probst@gmail.com>

	[sgen] User-settable evacuation threshold.

	A MONO_GC_PARAMS option for setting the evacuation threshold.

2010-10-30  Mark Probst  <mark.probst@gmail.com>

	[sgen] Mark&Sweep evacuation.

	When the occupancy for some block size falls below a certain
	threshold the objects in that block size will be evacuated in the
	next major collection, resulting in optimal occupancy.

2010-10-29  Mark Probst  <mark.probst@gmail.com>

	[sgen] Function for querying current collection generation.

	This lets the major collector query whether the current collection
	is a minor or a major one.

2010-10-18  Mark Probst  <mark.probst@gmail.com>

	[sgen] Dump Mark&Sweep heap occupancy.

	For each block size dump the occupancy to the heap-dump file.

2010-10-20  Mark Probst  <mark.probst@gmail.com>

	[sgen] Flush the binary protocol file when protocol is flushed.

2010-11-05  Zoltan Varga  <vargaz@gmail.com>

	Fix DISABLE_REFLECTION_EMIT build.

2010-11-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata.c (do_mono_metadata_parse_type): Fail if a valuetype is
	encoded as MONO_TYPE_CLASS and vice-versa. This can't be done
	easily in the verifier since it requires resolving the destination
	type.

	Fixes #650936

2010-11-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (parse_type): Don't allow zero index type
	tokens.

	* metadata.c (mono_metadata_decode_row): Assert on negative
	indexes.

	Fixes #560359

2010-11-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* pedump.c (verify_image_file): Finish initializing the runtime
	here since at this point we can safely query what version the
	supplied image requires.

	Fixes #650916

2010-11-02  Paolo Molaro  <lupus@oddwiz.org>

	Introduced a GC heap walk API.

	This API is currently only implemented for the sgen GC. It can be
	used to iterate over all the managed objects in the heap and it
	allows to also easily track object references.

2010-11-03  Marek Habersack  <grendel@twistedcode.net>

	[runtime] System.Web.Extensions must not be remapped to the
	current framework.

	The reason for this is applications which still use Sys.Web.Ext
	1.0* (note: 1.0 does NOT mean the assembly is for the 1.x runtime
	- it's for 2.0). Remapping would cause 1.0* not to be loaded,
	instead a 3.5 or 4.0 assembly would be fetched.

2010-11-02  Zoltan Varga  <vargaz@gmail.com>

	Fix the text of the Signatures size stat.

2010-11-02  Zoltan Varga  <vargaz@gmail.com>

	Add a stat for the memory occupied by MonoMethodSignature
	structures.

2010-11-02  Zoltan Varga  <vargaz@gmail.com>

	Add a stat for the the memory occupied by MonoMethod structures.

2010-10-31  Zoltan Varga  <vargaz@gmail.com>

	Disable inlining if the assembly has a DebuggableAttribute with
	the IsJITOptimizerDisabled flag set. Fixes #604486.

2010-10-31  Zoltan Varga  <vargaz@gmail.com>

	Call mono_field_get_type () in one place to fix an aot problem.

2010-10-30  Zoltan Varga  <vargaz@gmail.com>

	Fix some copyright messages.

2010-10-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_MonoField_SetValueInternal): Handle lazy
	field loading. Fixes buildbot crash.

2010-10-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_Type_GetGenericTypeDefinition_impl): Don't
	mono_class_init the type. Fixes test-792.

2010-10-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_get_method_info): Use _checked variant and
	avoid the assert.

2010-10-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_check_vtable_constraints): Only fetch the
	class of generic arguments as those are the only ones we care
	about. This fixes the case where a generic arguments has its
	container as a constraint and we crash with a stackoverflow.

2010-10-28  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_create_from_typedef): If the type fails due
	to a problem with the parent make sure we have byval_arg and
	this_arg are setup properly as the whole runtime requires those
	two to be setup even for broken types.

2010-10-27  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_create_from_typedef): Avoid a loader leak on
	parent load.

	* class.c (mono_method_signature_checked): Avoid a loader leak if
	type parsing fails.

2010-10-27  Geoff Norton  <grompf@sublimeintervention.com>

	Fix the profiler thread start/end hooks for threadpool threads

2010-10-27  Rodrigo Kumpera  <kumpera@gmail.com>

	Only set lockTaken to TRUE if it did not timeout.

2010-10-27  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (mono_param_get_objects_internal): Use checked
	variant of mono_method_signature.

2010-10-27  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_Type_GetField): Use code path that lazy load
	the field type.

	Fixes #649522

2010-10-27  Rodrigo Kumpera  <kumpera@gmail.com>

	* loader.c (mono_loader_set_error_assembly_load): Don't g_warning
	on failure. Use our tracing facility instead.

2010-10-27  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c: New icall to resolve ::Attributes so it can avoid
	loading the signature and work around methods with broken
	signatures.

	Fixes #649527

2010-10-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* monitor.c: New icall for the above.

	Fixes #649159

2010-10-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (field_encode_signature): If the field was
	constructed with a GTD, encode it as an open instance.

	Fixes #649233

2010-10-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_MonoType_GetArrayRank): Don't mono_class_init
	the class as it's not needed.

	* icall.c (ves_icall_Type_make_array_type): Ditto.

	Fixes #648833

2010-10-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_cast): The casted to type must be a boxable type.

	Fixes #649014

2010-10-25  Rodrigo Kumpera  <kumpera@gmail.com>

	Rename create_methodspec to create_open_instance.

2010-10-25  Rodrigo Kumpera  <kumpera@gmail.com>

	* appdomain.c: Ditto.

	* icall.c: Pass the new value forward to mono_image_create_token.

	* reflection.c (mono_image_create_token): Handle create_methodspec
	for TypeBuilder and MonoType.

	Fixes #649017

2010-10-23  Zoltan Varga  <vargaz@gmail.com>

	Extract the default profiler into its own file.

2010-10-22  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_MonoType_GetGenericArguments): Don't
	mono_class_init here since it's not needed.

	Fixes #648725

2010-10-22  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (mono_image_get_generic_field_token): If the field
	type is a GTD, ensure its generic_container is properly
	initialized.

	Fixes #648616

2010-10-22  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Remove arbitrary 1024 limit in GetProcesses

	Reallocate the array of PIDs if EnumProcesses used all of it and
	try again.

2010-10-21  Zoltan Varga  <vargaz@gmail.com>

	Fix the assembly/class caching problems in the threadpool code
	too.

2010-10-21  Zoltan Varga  <vargaz@gmail.com>

	Add an assert to mono_class_from_name_cached () to make sure it is
	only called for mscorlib.

2010-10-21  Zoltan Varga  <vargaz@gmail.com>

	Avoid caching stuff in socket-io.c in static variables, since the
	socket assembly can be unloaded, cache them in MonoDomain instead.

2010-10-20  Tak  <levi@unity3d.com>

	* metadata/threads.c: Ensure correct stack pointer initialization
	on !POSIX. This fixes some random crashes with embedded,
	release-optimized binaries on windows.

	License: MIT/X11

2010-10-19  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c: Add mono_verifier_verify_methodimpl_row.

	* metadata.c (mono_class_get_overrides_full): Call in the
	verifier.

	* verify.c: Add mono_verifier_is_signature_compatible that does
	propery signature variance checking.

2010-10-20  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c: Pass around a list of currently been built vtables to
	really avoid going into loop.

	* reflection.c: Adjust to extra arguments.

	* object.c: Ditto.

2010-10-19  Rodrigo Kumpera  <kumpera@gmail.com>

	Temporarily disable iface check o generic instances

2010-10-19  Zoltan Varga  <vargaz@gmail.com>

	Remove the duplicate assembly name->string code from two places,
	uses mono_stringify_assembly_name ().

2010-10-19  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (ensure_runtime_vtable): When recalculating method
	slots, ignore static methods.

	Fixes #640780

2010-10-19  Zoltan Varga  <vargaz@gmail.com>

	Avoid crashes in the assembly name->string code if aname->name is
	NULL.

2010-10-19  Tak  <levi@unity3d.com>

	* metadata/object.c: * mini/mini.c: Ensure that exceptions get
	propagated back to the caller when mono is being embedded.
	License: MIT/X11

2010-10-18  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (collect_implemented_interfaces_aux): Fail if any of the
	collected interfaces is broken.

	* class.c (mono_class_init): Don't bother initing if the class is
	broken. Don't assert on cycles, fail the type instead.

	Fixes #568025

2010-10-18  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_newobj): Check if the .ctor signature is hasthis.
	Even thou this is not a string 335 requirement our runtime asserts
	otherwise.

	Fixes #568004

2010-10-18  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_setup_vtable): Check generic instances using
	mono_class_check_vtable_constraints.

	* object.c (mono_class_create_runtime_vtable): Check generic
	instance arguments since creating the rumtime vtable doesn't
	require resolving the metadata one.

	Fixes #644915

2010-10-18  Zoltan Varga  <vargaz@gmail.com>

	Fix some warnings.

2010-10-18  Marek Habersack  <grendel@twistedcode.net>

	[runtime] Fix for bug 646075. Added support for short version
	string in the <supportedRuntime> element

	Starting from .NET 4.0, the <supportedRuntime/> 'version'
	attribute accepts a shorter runtime version string - v4.0 - in
	addition to the previously accepted vX.Y.Z format.

2010-10-15  Zoltan Varga  <vargaz@gmail.com>

	Fix a regression introduced by the assembly name parsing changes.

2010-10-15  Zoltan Varga  <vargaz@gmail.com>

	Add support for assembly names with embedded and starting spaces.

2010-10-14  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	[ThreadPool] Clear the thread state

	Clear the thread state after finishing a work item. We were only
	resetting the background state.

2010-10-14  Geoff Norton  <grompf@sublimeintervention.com>

	Fix windows build

2010-10-14  Geoff Norton  <grompf@sublimeintervention.com>

	[android] pthread_kill cannot be used safely on android

	Android's fork() function does not properly update the
	pthread_internal_t->threadid variable to point to the tid of the
	fork()'d thread, and instead still points to the pid of zygote. As
	a result we need to track the android tid's manually since
	gettid() is sane, and use an alternate to pthread_kill on android
	Additionally, disable sgen support on android until the same work
	has been done there

	r: kumpera, vargaz

2010-10-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_is_open_constructed_type): Treat generic
	type definition as an open type too. All code that checks is_open
	does to make sure the generic instance is realizable.

2010-10-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (mono_marshal_get_castclass_with_cache): Use the right
	parameter for the cache.

	* marshal.c (mono_marshal_get_isinst_with_cache): Use the right
	parameter for the cache. In the negative case store the obj_vtable
	and not the cache address.

2010-10-13  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (is_valid_generic_instantiation): If the generic
	instantiation is open, GTDs can appear in mutual types.

2010-10-13  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_verifier_verify_class): The generic instance over
	its parent generic arguments will end up extending a GTD. The
	check against not extending a GTD is only valid for not generic
	instance types.

2010-10-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	The System.Net.Sockets.Socket type lives in both System.dll and
	System.Net.dll for moonlight

2010-10-12  Paolo Molaro  <lupus@oddwiz.org>

	* console-io.h, console-null.c, console-unix.c, console-win32.c,
	gc.c: instead of executing tons of managed code in signal context,
	we wake up the finalizer thread and any complex console-specific
	code will be handled there. This can cause a (usually small)
	delay, but it's much better than deadlocking.

2010-10-12  Paolo Molaro  <lupus@oddwiz.org>

	* loader.c: we don't search the current directory anymore for
	shared libraries referenced in DllImport attributes, as it has a
	slight security risk. We search in the same directory where the
	referencing image was loaded from, instead. Fixes bug# 641915.

2010-10-12  Zoltan Varga  <vargaz@gmail.com>

	Load vtable->max_interface_id using LDIND_U2.

2010-10-12  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_setup_vtable): Fail the class if we fail to
	load its overloads.

	Fixes #562156

2010-10-11  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_verifier_verify_class): Don't allow parent to be
	a GTD.

	Fixes #562150

2010-10-11  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (is_valid_generic_instantiation): A GTD cannot be used
	as generic argument. Check for those conditions even if the
	argument has no constraints.

	Fixes #562771

2010-10-11  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (verify_generic_parameters): If a generic constraint is
	a generic instance, it must respect the constraint of that type
	too.

	Fixes #644935

2010-10-11  Zoltan Varga  <vargaz@gmail.com>

	Set the wrapper info for the virtual stelemref wrappers to a
	non-NULL value.

2010-10-08  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (mono_marshal_get_virtual_stelemref): Add a custom
	wrapper for interface casts.

	This was the most frequent array kind left without a fast
	stelem.ref wrapper. During testing the only easy target left was
	arrays of arrays, but those are so rare that won't make a
	different on any workload.

2010-10-08  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_setup_vtable_general): Inject the array
	stelemref method on vectors of reference types.

	* class.c (mono_class_init): Properly handle the fact that arrays
	have different vtable sizes.

	* marshal.c (mono_marshal_get_virtual_stelemref): New function
	that returns a better tailored stelemref wrapper for a given array
	type.

2010-10-06  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Fix Marshal.SizeOf() for structs with explicit layout

	Marshal.SizeOf is now returning the expected values for explicit
	layout in 32 and 64 bits systems.

	Fixes bug #641535.

2010-10-08  Jb Evain  <jbevain@gmail.com>

	Add support generic arguments in ModuleBuilder.Resolve*Token
	icalls

	For ResolveTypeToken, ResolveFieldToken and ResolveMethodToken,
	resolve definitions directly and try to instantiate only types
	that can be instantiated, such as MemberRef, MethodSpec and
	TypeSpec. Also validate the memberref token type for ResolveField
	and ResolveMethod when passing them a MemberRef token.

2010-10-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c: Add mono_marshal_get_isinst_with_cache and
	mono_marshal_get_castclass_with_cache.

	* marshal.h: Export those 2 new functions.

2010-10-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* class-internals.h: Add new kind of rgctx slot.

2010-10-07  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (mono_marshal_load_type_info): Properly check for
	array types.

2010-10-07  Jb Evain  <jbevain@gmail.com>

	Fix resolution of memberref tokens in the dynamic case.

	mono_metadata_memberref_is_method: rename to
	mono_memberref_is_method and deal with the case where the assembly
	is dynamic. This prevents a runtime crash when calling
	ModuleBuilder.ResolveMemberToken with a MemberRef token pointing
	to a field.

2010-10-07  Jb Evain  <jbevain@gmail.com>

	[Fix] Properly compute the tokens for FieldBuilders.

	mono_reflection_get_token: For FieldBuilders, now reuse the token
	computed when the FieldBuilder are instantiated, instead of
	re-creating them. This avoids registering field definitions as
	MemberRefs.

2010-10-07  Zoltan Varga  <vargaz@gmail.com>

	Clear the domain before unloading assemblies in mono_domain_free
	().

2010-10-07  Zoltan Varga  <vargaz@gmail.com>

	Fix more wrappers of dynamic methods.

2010-09-30  Zoltan Varga  <vargaz@gmail.com>

	Avoid clearing nursery fragments before pinning, instead place
	arrays at the start of each fragment which cover the whole
	fragment.

2010-10-06  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Avoid a warning

	Use MONO_TYPE_BOOLEAN instead of MONO_NATIVE_BOOLEAN. Same value,
	different enums.

2010-10-05  Geoff Norton  <grompf@sublimeintervention.com>

	Fix the build on windows

2010-10-05  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_generic_class_get_class): Don't inflated nested_in
	since it's not the expected behavior from managed land. It's a
	safety issue as well since the outer type can have more generic
	arguments.

2010-10-05  Geoff Norton  <grompf@sublimeintervention.com>

	Its possible that we're calling Process_free_internal on a
	pseudo-handle.

	When we are not using SHM we use psuedo handles to return
	processes from pids, however we dont guard against pseudo-handles
	in CloseProcess, which could lead to calling unref on a fake
	handle.

2010-10-04  Rodrigo Kumpera  <kumpera@gmail.com>

	Make cards_in_range more accurate

2010-10-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_card_table_is_range_marked): Use
	card_in_range here since this is used for objects that can start
	at the middle of a card.

	* sgen-cardtable.c (move_cards_to_shadow_table): Properly copy the
	tail bytes of an object that spam around the cardtable. Don't copy
	more bytes than required.

	* sgen-cardtable.c (sgen_cardtable_scan_object): Add extra_idx
	variable that tracks the card offset that we're scanning. This is
	required when we wrap around.

	* sgen-cardtable.c (sgen_cardtable_scan_object): Properly reset
	card_base when at wrap around.

2010-10-04  Rodrigo Kumpera  <kumpera@gmail.com>

	Kill some dead code and fix a function name

2010-10-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* loader.c (mono_lookup_pinvoke_call): Don't assert on bad row
	indexes.

	* metadata-verify.c (verify_implmap_table): Fix the bounds check
	for the module table.

	Fix #563956

2010-10-04  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Map SO_EXCLUSIVEADDRUSE to !SO_REUSEADDR

	This will make windows app that use that property work on *nix.
	Fixes bug #643475.

2010-10-04  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Check no longer needed.

	The is_* function takes care of this check now.

2010-10-03  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Check class names in a better way

	Verify image, nesting status, namespace and class for the types
	used in threadpool.c

2010-09-30  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Schedule the user callback from unmanaged code

	When possible, schedule the user callback from unmanaged code. We
	pass it from the IO pool to the regular pool after our internal
	callback is finished.

2010-09-30  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Avoid a few warnings

2010-09-30  Zoltan Varga  <vargaz@gmail.com>

	Disable the freeing of monitors again, it still crashes with sgen
	when running tests/async_read.exe.

2010-09-29  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix AOT support for delegates

2010-09-29  Rodrigo Kumpera  <kumpera@gmail.com>

	* marshal.c (mono_marshal_get_delegate_invoke): Properly handle a
	static method that has it's first argument bound.

	* marshal.c (mono_marshal_free_inflated_wrappers): Free from the
	new hashtable too.

	* image.c (mono_image_close_except_pools): Free the new hash
	table.

	* metadata-internals.h (MonoImage): Add new hashtable to store the
	new kind of invoke wrappers.

2010-09-28  Jonathan Pryor  <jonpryor@vt.edu>

	Allow mono_install_assembly_preload_hook() to provide mscorlib.dll

	In some embedding scenarios, mscorlib.dll may be present in a
	non-standard location (outside of MONO_PATH) or with an alternate
	filename.

	Use the installed assembly preload hooks to search for
	mscorlib.dll before falling back to the default lookup strategy.

2010-09-29  Zoltan Varga  <vargaz@gmail.com>

	Fix 'thread may have been prematurely finalized' warnings when a
	GC happens during thread attach in sgen.

2010-09-27  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_get_enum_info): All instance fields should be
	ignored here.

	Fixes #604218

2010-09-26  Zoltan Varga  <vargaz@gmail.com>

	Update the comment explaining why the small_id_table uses
	conservative GC tracking.

2010-09-26  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Bypass BeginInvoke for asynch. operations

	The code involved in a delegate BeginInvoke is too heavy and of no
	use for socket asynchronous operations. With these changes, we
	bypass all that and send the work items directly to the
	asynchronous IO queue, improving performance and lowering memory
	use.

2010-09-25  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Added support for ArraySegment

	-Removed NET_2_0 -Implemented support for the Receive/Send
	overloads that take a list of ArraySegments.

2010-09-25  Zoltan Varga  <vargaz@gmail.com>

	Enable support for wrapping non Exception subclasses in
	RuntimeWrappedException objects, implement support for
	RuntimeCompatibilityAttribute.

2010-09-24  Zoltan Varga  <vargaz@gmail.com>

	Fix the setting of pointer type fields using reflection. Fixes
	#641590.

2010-09-24  Zoltan Varga  <vargaz@gmail.com>

	Avoid making the small_id table precisely GC tracked, some runtime
	code can't handle MonoInternalThread's being moved.

2010-09-24  Zoltan Varga  <vargaz@gmail.com>

	Disable make_root_descr_all_refs () for now since it seems to
	cause crashes.

2010-09-24  Zoltan Varga  <vargaz@gmail.com>

	Use g_malloc0 in mono_gc_make_root-descr_all_refs ().

2010-09-24  Zoltan Varga  <vargaz@gmail.com>

	Remove a debug printf.

2010-09-24  Zoltan Varga  <vargaz@gmail.com>

	Add a few variants of the MONO_GC_REGISTER_ROOT () to make most
	roots precisely tracked and to avoid registering locations
	pointing to memory allocated by mono_gc_alloc_fixed () as roots
	under SGEN.

2010-09-23  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_type_is_valid_type_in_context): Handle types such
	as VAR and MVAR encoded as CLASS or VALUETYPE. This encoding is
	not the canonical one, but works and must be properly verified.

	Fixes #601970

2010-09-23  Rodrigo Kumpera  <kumpera@gmail.com>

	Remove unwanted debug spew.

2010-09-23  Zoltan Varga  <vargaz@gmail.com>

	Wrap thrown objects which do not derive from Exception into a
	RuntimeWrappedException. Fixes #640687.

2010-09-22  Sebastien Pouliot  <sebastien@ximian.com>

	Add missing SocketOptionName_HopLimit definition for IPv6

2010-09-23  Zoltan Varga  <vargaz@gmail.com>

	Convert ERROR_PATH_NOT_FOUND to ENOENT too.

2010-09-22  Zoltan Varga  <vargaz@gmail.com>

	Set errno correctly when loading an image fails on windows. Fixes
	#362607.

2010-09-22  Zoltan Varga  <vargaz@gmail.com>

	Call the thread cleanup at the end as it was done before, call it
	even if handle_remove () fails.

2010-09-21  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-marksweep.c (mono_sgen_marksweep_init): Enable cardtable
	for the parallel collector.

	This closes by 50% the gap in binary-tree against the serial
	collector.

2010-09-20  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c: The typeref table is now lazily verified thanks to some
	awesome obfuscators that love to produce junk. So it has to be
	checked everytime before usage instead of at loading time.

2010-09-20  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c: Add mono_verifier_verify_typeref_row that
	checks the metadata of a single row. Fix code around to couple
	with this new function.

	* verify-internals.h: Export it.

2010-09-20  Paolo Molaro  <lupus@oddwiz.org>

	* sgen-gc.c, sgen-los.c: added hooks for the important GC events.
	Update some of the GC-related performance counters, too.

2010-09-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-marksweep.c (major_scan_card_table): Avoid an extra copy
	under overlapping card.

2010-09-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.h: Auto detect the need for
	SGEN_HAVE_OVERLAPPING_CARDS.

	* sgen-cardtable.h: Add CARD_TABLE_BITS and make CARD_COUNT_BITS
	depend on it.

	* sgen-cardtable.h: Document which and how each tunable affect
	runtime of sgen.

2010-09-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_cardtable_scan_object): If the card range
	overflows the cardtable, split the scanning in two steps.

2010-09-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_cardtable_scan_object): Use the card
	pointer as the loop induction variable so it's easier handle
	overlapping cards and overflow.

2010-09-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c: The copy/clear functions may write into
	invalid memory if a block lives across the edges of the cardtable
	address range.

2010-09-15  Rodrigo Kumpera  <kumpera@gmail.com>

	Document some cardtable requirements and add an assert.

2010-09-18  Zoltan Varga  <vargaz@gmail.com>

	Make MonoThreadCleanupFunc take an InternalThread instead of a
	Thread. Move its definition to threads-types.h since it is not
	public API. Use this to remove the workaround in thread_cleanup ()
	so the JIT info for threads is properly cleaned up at shutdown.

2010-09-17  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	Fix typo in Makefile causing build breakage

2010-09-16  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	Only build one version of libmonoruntimemoon.la (the convenience
	lib)

2010-09-16  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	Add a configure option to disable building the shared libmono
	library

2010-09-15  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	Add configure option for disabling assembly remapping

2010-09-15  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Remove 2 extra calls to gettimeofday.

2010-08-26  Mark Probst  <mark.probst@gmail.com>

	Remove weak links for monitors.

	mono_runtime_cleanup() calls mono_monitor_cleanup(), which frees
	the memory associated with monitors. Some of them still have weak
	links registered, which leads to a crash when calling
	mono_domain_free() later on.

2010-09-16  Mark Probst  <mark.probst@gmail.com>

	[sgen] Avoid doing an unnecessary gettimeofday().

2010-09-15  Miguel de Icaza  <miguel@gnome.org>

	Revert

2010-09-15  Miguel de Icaza  <miguel@gnome.org>

	Make the thread-id field be of the proper size on 64 bit machines.

	This error was found by Gonzalo when he was looking at another
	problem when thread IDs overflowed ints.

	Currently we use gpointers in the io-layer for the threadid, but
	we were only exposing the value as an int32. The good news is that
	the code is not really used right now, but could cause problems in
	the future as we extend Process.

2010-09-15  Geoff Norton  <gnorton@novell.com>

	Fix the embedded mono on OSX code to support a symlinked mono into
	the framework.

	The embedding code looks at the executable name, and builds the
	embedding profile from that, however the default install has a
	/usr/bin/mono symlink pointing to
	/Library/Frameworks/Mono.framework. We now resolve the symlink
	before allowing the embedding code to proceed.

2010-09-15  Paolo Molaro  <lupus@oddwiz.org>

	Documentation for a few garbage collector APIs.

2010-09-10  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	mono_trace already adds a newline to trace messages, don't add
	another one

2010-09-14  Chris Toshok  <toshok@gmail.com>

	built a separate libmonoruntime for moonlight, so we can do
	-DMOONLIGHT just in the moonlight lib instead of globally.

2010-09-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* pedump.c (verify_image_file): Setup the fake assembly before
	doing full metadata verification since it does type loading.

	Fixes #598228

2010-09-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_card_table_get_card_data): Start must be
	incremented with and without overlapping cards.

2010-09-13  Rodrigo Kumpera  <kumpera@gmail.com>

	Add v4.0 beta to runtime versions list.

2010-09-13  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_method_verify): Only skip dead code after
	checking for fallthru.

2010-09-13  Geoff Norton  <gnorton@novell.com>

	The tid is passed around internally as a unsigned value.

	We were having a crash on OSX due to thread->tid not equalling the
	passed tid due to a signedness issue.

2010-09-13  Geoff Norton  <gnorton@novell.com>

	Rename major -> major_collector and drop unguarded usage of
	ucontext_t.

	Android defines a variable called "major" in its headers, lets
	rename major -> major_collector to work around the conflict.

	Not every architecture/platform has ucontext_t, so lets not
	strongly type our contexts to that and let the macros do their
	job.

2010-09-13  Zoltan Varga  <vargaz@gmail.com>

	Fix a warning.

2010-09-13  Rodrigo Kumpera  <kumpera@gmail.com>

	* threads.c (mono_thread_suspend_all_other_threads): wait_data
	must not be malloc'd since it holds managed pointers. Alloc it on
	stack since the struct is about 512/1024 bytes long.

	* threads.c (mono_thread_manage): Ditto.

	* threads.c (mono_threads_request_thread_dump): Ditto.

2010-09-10  Zoltan Varga  <vargaz@gmail.com>

	Log the clearing of nursery fragments, avoid clearing small
	fragments twice.

2010-09-10  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-marksweep.c (major_scan_card_table): Rework the small
	object size loop to have a single induction variable. In adition
	to that, add a fast initial card skip code.

2010-09-09  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_card_table_get_card_data): Check if any
	card is marked and return it.

	* sgen-marksweep.c (major_scan_card_table): Don't waste time
	scanning a block if no card was marked.

2010-09-09  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_cardtable_scan_object): Lookup the card
	once and then bump over it. This saves a bunch of stores and opens
	up for later improvements.

	* sgen-marksweep.c (major_scan_card_table): Ditto.

	* sgen-cardtable.h: Add new inline function to return the card
	scan pointer of a given adddress.

2010-09-10  Andrew Jorgensen  <ajorgensen@novell.com>

	Dist sgen-cardtable.h

2010-09-09  Chris Toshok  <toshok@gmail.com>

	move the call to mono_gc_base_init into mono_debug_init

	mono_debug_init is a public embedding interface and calls into
	mono_debugger_initialize, which registers a GC root. driver.c
	calls mono_gc_base_init before calling mono_debug_init for this
	reason, but that's not an option for embedding (as
	mono_gc_base_init is internal.)

	since mono_gc_base_init is idempotent, just add a call to
	mono_debug_init (and remove the driver.c call). Document (in
	sgen-gc and sgen-gc.h) the fact that although mono_gc_base_init is
	idempotent, changing LOCK_INIT to something non-idempotent will
	break this.

2010-09-09  Zoltan Varga  <vargaz@gmail.com>

	Avoid freeing the allocated monitors on shutdown, it seems to
	cause crashes when running with SGEN, since SGEN writes to those
	arrays in:

	==29095== at 0x6844E5: add_or_remove_disappearing_link
	(sgen-gc.c:4143) ==29095== by 0x6845F8:
	mono_gc_register_disappearing_link (sgen-gc.c:4167) ==29095== by
	0x67DE35: clear_domain_process_object (sgen-gc.c:1384) ==29095==
	by 0x67DEA3: clear_domain_process_major_object_callback
	(sgen-gc.c:1400) ==29095== by 0x6DE2DC: major_iterate_objects
	(sgen-marksweep.c:692) ==29095== by 0x67E00B: mono_gc_clear_domain
	(sgen-gc.c:1459)

2010-09-06  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.h (sgen_card_table_get_card_address): This needs
	marking under SGEN_HAVE_OVERLAPPING_CARDS too.

2010-09-06  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_create_from_typedef): If if any parent
	doesn't extend the generic instantiation.

	Fixes #604270

2010-09-06  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_leave): Set the target of leave.

	* verify.c (mono_method_verify): Merge the resulting empty stack
	of a leave instruction with it's target.

	Fixes #633248

2010-09-05  Zoltan Varga  <vargaz@gmail.com>

	Fix the build.

2010-09-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c: Introduce dummy_use function that forces the compiler
	to keep a given value alive until the call to it.

	* sgen-gc.c (mono_gc_wbarrier_set_field): Use dummy_use to avoid
	race condition between the store and the barrier.

	* sgen-gc.c (mono_gc_wbarrier_set_arrayref): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_generic_store): Ditto.

	This pattern of usage is the same we do with managed code write
	barrier. The race condition is extremely race and requires the
	thread to be interrupted in between the store and the barrier,
	which is a very tiny narrow window.

2010-09-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Avoid locking if
	using cardtables. Even thou the new code looks slower than a plain
	memmove, it has the advantage of not taking locks, which means
	it's much more scalable.

	Array copy under sgen/cardtables was 1.6x slower than with boehm.
	With this patch it reduces to 1.54x. The serial performance
	speedup is nice, but it is much more helpfull in multi-threaded
	workloads.

2010-09-03  Rodrigo Kumpera  <kumpera@gmail.com>

	Fix a warning

2010-09-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-gc.c: Avoid taking locks for single pointer barriers.

2010-09-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c: Move a bunch of stuff to new header.

	* sgen-cardtable.h: New header with functions meant to be inlined.

	* sgen-gc.c: Use new header.

	* sgen-marksweep.c (major_scan_card_table): Introduce fast version
	of some macros that avoid a few indirections.

2010-09-03  Rodrigo Kumpera  <kumpera@gmail.com>

	Better cardtable stats gathering codebase.

2010-09-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (sgen_cardtable_scan_object): The source of the
	cardtable can now be supplied, this is needed since major blocks
	can't use regular card checking code here.

	* sgen-los.c (los_scan_card_table): Adjust to signature change in
	sgen_cardtable_scan_object.

	* sgen-marksweep.c (major_scan_card_table): If the block size is
	larger than a card it makes more sense to loop around objects and
	not cards since objects might be scanned twice since a card can be
	shared between two of them.

	In such case the cards of a block must be copied to a side buffer
	since we are no longer looping one by one. This ia a problem when
	two objects share a marked card as the first can cause it to be
	left cleared and not have the second one scanned.

	Another advantage of this patch is that it enables partial
	scanning of larger array in the major heap.

2010-09-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-los.c (los_scan_card_table): Move meat of this function
	into a separate one.

	* sgen-cardtable.c: New function sgen_cardtable_scan_object.

	* sgen-gc.h: Add sgen_cardtable_scan_object.

2010-09-03  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-marksweep.c (major_scan_card_table): Don't load some fields
	if the block has no references.

2010-09-02  Rodrigo Kumpera  <kumpera@gmail.com>

	Add stats for cardtable processing time

2010-09-04  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Fixed GetLogicalDriveString

	When calling GetLogicalDriveString, icall.c was passing the length
	in the wrong units.

	GetLogicalDriveString now translates any octal sequence found into
	its corresponding byte. Use the UTF16 length ('items_written')
	instead of the UTF8 input string length ('items_read') when
	computing the total size.

2010-09-03  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Allow ordinal entry points in windows.

	Windows allows entry point names like "#10" which refer to the Nth
	function (n > 1 and less than the highest ordinal value in the
	.def file).

	Fixes bug #636966.

2010-09-03  Zoltan Varga  <vargaz@gmail.com>

	Fix a crash when the signature of the Main method could not be
	loaded. Fixes #636794.

2010-09-02  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Return IPv6 addresses

	We were not returning IPv6 addresses if there was no IPv6
	configured interface. Now we will return those addresses if ipv6
	is enabled by configuration.

	Fixes bug #636517.

2010-09-01  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (mono_verifier_verify_method_header): If the
	header has a locals token, verify the corresponding row in the
	standalonesig table.

2010-08-31  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Handle WAIT_IO_TIMEOUT in WaitAny call

	WaitForMultipleObjectsEx might return WAIT_IO_COMPLETION if an APC
	is queued. Fixes bug #549807.

2010-08-30  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c (cards_in_range): This should take into account
	the first card.

2010-08-26  Rodrigo Kumpera  <kumpera@gmail.com>

	Enable cardtable on 64bits targets.

2010-08-26  Rodrigo Kumpera  <kumpera@gmail.com>

	Don't scan blocks without references.

2010-08-26  Rodrigo Kumpera  <kumpera@gmail.com>

	Improve check consistency assertion.

2010-08-26  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c: In order to support cardtables with 64bits we
	allow cards to overlap each other. Cards are copied to a shadow
	cardtable at the beginning of the scanning.

2010-08-25  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c: Add functions that test if a given card or
	range or cards should be scanned. Those function make sure the
	card are clear on return.

	* sgen-gc.h: Export new functions.

	* sgen-los.c: Use to new functions.

	* sgen-marksweep.c: Ditto.

2010-08-25  Rodrigo Kumpera  <kumpera@gmail.com>

	* sgen-cardtable.c: Use live block enumeration API to clean blocks
	instead of a custom API.

	* sgen-los.c: Add los_iterate_live_block_ranges.

	* sgen-marksweep.c: Add major_iterate_live_block_ranges.

	* sgen-gc.h: Adjust for new function.

2010-08-28  Zoltan Varga  <vargaz@gmail.com>

	Get rid of filter clauses in runtime invoke wrappers. This
	increases their size slighly, but allows them to be compiled by
	LLVM.

2010-08-28  Zoltan Varga  <vargaz@gmail.com>

	Print the unimplemented interface method warnings using the
	mono_trace () infrastructure.

2010-08-28  Zoltan Varga  <vargaz@gmail.com>

	Avoid allocating empty arrays in ves_icall_Type_GetInterfaces ().

2010-08-28  Zoltan Varga  <vargaz@gmail.com>

	Use the klass pointer instead of the klass name when computing the
	hash in mymono_metadata_type_hash (), since it is much faster.

2010-08-27  Zoltan Varga  <vargaz@gmail.com>

	Improve the hashing of MonoTypes representing type variables.

2010-08-27  Zoltan Varga  <vargaz@gmail.com>

	Add a mono_g_hash_table_print_stats () function to print hash
	table stats.

2010-08-25  Andrew Jorgensen  <ajorgensen@novell.com>

	Add sgen-cardtable.c to sgen_sources (for dist)

2010-08-25  Rodrigo Kumpera  <kumpera@gmail.com>

	* appdomain.c: Bump corlib version.

	* object-internals.h: Add new field to MonoPropertyInfo.

	* icall.c (ves_icall_get_property_info): Store the declaring type
	into the new field.

	Fixes #633671

2010-08-21  Mark Probst  <mark.probst@gmail.com>

	[sgen] Inline card table wbarrier with nursery check.

	Our previous inline card table write barrier did not perform any
	checks on the pointers, which means that it marked cards for the
	major heap even if the references stored there were not to nursery
	objects. Doing that is slightly faster in the mutator but the
	nursery collections might take a lot longer because objects might
	have to scanned unnecessarily.

	This patch implements an inline write barrier that also performs a
	nursery check. To that end we introduce a new IL opcode,
	OP_CARD_TABLE_WBARRIER.

	It is currently only implemented on x86. For architectures that
	don't support it (yet), we automatically regress to the old,
	non-checking write barrier.

2010-08-25  Mark Probst  <mark.probst@gmail.com>

	[sgen] Properly update heap boundaries for fixed-heap mark&sweep.

	We didn't update the heap boundaries correctly in the fixed-heap
	mark&sweep collector, which could lead to pins being lost.

2010-08-25  Mark Probst  <mark.probst@gmail.com>

	[sgen] Make binary protocol thread-safe for real.

	There was still an issue with thread-safety of binary protocols:
	If the world was stopped while a thread was in the process of
	using a binary protocol buffer, the GC would write all buffers to
	the file and release the memory, making the thread crash once it
	restarted.

	We fix this here by keeping a count of how many threads currently
	use the buffers. If they are in use when we try to save and free
	them, we don't. They'll be saved and freed eventually.

2010-08-25  Robert Nagy  <robert@bsd.hu>

	Make sgen compile on OpenBSD, by adding the missing stuff

2010-08-24  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	Fix permissions

2010-08-24  Zoltan Varga  <vargaz@gmail.com>

	Revert "Close mscorlib on shutdown to avoid leaking it."

	This was only needed because of the buggy assemblyref in mscorlib
	to itself.

	This reverts commit 77d0ee57abd056c3c04f645c9324ee4c4a937b8c.

2010-08-23  Miguel de Icaza  <miguel@gnome.org>

	Add the Sgen license text to the new sgen files

2010-08-13  Mark Probst  <mark.probst@gmail.com>

	[sgen] Inline card table write barrier.

	If the card table write barrier is used, emit it inline. It's a
	quick address calculation and a single store, so it's much more
	efficient than our old write barrier.

2010-08-20  Rodrigo Kumpera  <kumpera@gmail.com>

	[sgen] Use cardtable for all wbarriers, not just generic store.

2010-08-20  Rodrigo Kumpera  <kumpera@gmail.com>

	[sgen] Use mincore to dump faulted pages in the cardtable.

	Debug printing code, currently disabled.

2010-08-20  Rodrigo Kumpera  <kumpera@gmail.com>

	[sgen] Direct card table implementation.

	This is a direct card table, meaning there is only card table
	level, which makes it very simple and efficient. It only works on
	32 bits at this point, and only for Mark&Sweep.

2010-08-23  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (mono_type_is_valid_in_context): Cleanup any loader
	error before continuing.

	* verify.c (verifier_load_field): Ditto.

	* verify.c (verifier_load_method): Ditto.

	* verify.c (verifier_load_type): Ditto.

2010-08-23  Robert Nagy  <robert@bsd.hu>

	Use struct sockpeercred instead of struct ucred on OpenBSD

2010-08-22  Miguel de Icaza  <miguel@gnome.org>

	Updated copyrights to SGen files that were missing it

2010-08-21  Zoltan Varga  <vargaz@gmail.com>

	Avoid freeing an NULL hashtable.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Fix a crash in mono_field_get_value_object () after the
	field->type changes.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Avoid freeing type_initialization_hash () for now because of
	shutdown races.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Fix another bunch of shutdown leaks.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Add a 'mono_remove_image_unload_hook' function, store image unload
	hooks as a GSList.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Free a few hash tables in object.c.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Avoid leaking 'generic_array_method_info' by allocating it from
	the mscorlib mempool.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Free the wsq data even if the thread pool was not started.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Avoid a crash in if image->references [i] is REFERENCE_MISSING.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Free the global dllmap at shutdown.

2010-08-20  Zoltan Varga  <vargaz@gmail.com>

	Avoid leaking 'image_sets' in metadata.c.

2010-08-19  Zoltan Varga  <vargaz@gmail.com>

	Close mscorlib on shutdown to avoid leaking it.

2010-08-18  Zoltan Varga  <vargaz@gmail.com>

	Bump the size of the epoll threads to 256k on 64 bit systems to
	avoid problems on ppc64 with 64k page sizes.

2010-08-17  Zoltan Varga  <vargaz@gmail.com>

	Get rid of some #ifdef EGLIB_MAJORs.

2010-08-17  Elijah Taylor  <elijahtaylor@google.com>

	Disable sockets and a few other things when using NACL.

2010-08-17  Elijah Taylor  <elijahtaylor@google.com>

	Allow mscorlib to be loaded from disk when using NACL.

2010-08-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal):
	Init the class prior to accessing the type.

2010-08-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifier):
	Use function that handle lazy loading.

2010-08-16  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall.c (ves_icall_MonoField_ResolveType): New icall to lazy
	resolve a field.

	* icall-def.h: Ditto.

	* reflection.c (mono_field_get_object): Eager load a field's flags
	since this simplifies a lot the managed side that doesn't have to
	handle loading it if not present.

2010-08-15  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_get_nested_types): Don't init the class.

	* icall.c (ves_icall_Type_GetNestedType): Ditto.

2010-08-15  Rodrigo Kumpera  <kumpera@gmail.com>

	* class-internals.h: Add mono_field_is_deleted_with_flags which
	takes the flag as an argument instead of using the value on
	type->attrs.

	* reflection.c (mono_field_get_object): Check if field->type is
	present before using it.

	* icall.c (ves_icall_Type_GetFields_internal): Do things lazier by
	not depending on a field's type been loaded.

2010-08-15  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_get_fields_lazy): Lazy variant of
	mono_class_get_fields that returns fields with only minimal
	information loaded (name and parent).

2010-08-15  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_class_setup_basic_field_info): Loads minimal info
	about a field, right now just name.

	* class.c (mono_class_setup_fields): Use new functions to load
	everything.

	* class.c (mono_field_resolve_type): Init the error struct and set
	it on case of a class failure.

2010-08-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_field_get_flags): Since the field type is lazy
	loaded we avoid loading it here since some reflection operations
	depends on flags but require lazy loading of type.

2010-08-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c (mono_field_get_type): Lazy load ::type.

2010-08-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* class.c: Add trivial implementation of
	mono_field_get_type_checked.

	* class-internals.h: Export new function.

2010-08-12  Rodrigo Kumpera  <kumpera@gmal.com>

	* reflection.c (mono_reflection_get_type_internal): Don't
	mono_class_init the resulting classes.

2010-08-12  Rodrigo Kumpera  <kumpera@gmal.com>

	* class.c (mono_class_get_methods): Don't mono_class_init the
	type.

	* class.c (mono_class_get_properties): Ditto.

	* class.c (mono_class_get_events): Ditto.

	* icall.c (ves_icall_Type_GetMethodsByName): Ditto.

	* icall.c (ves_icall_Type_GetConstructors_internal): Ditto.

	* icall.c (ves_icall_Type_GetPropertiesByName): Don't
	mono_class_init the types. Move error handling to a label at the
	end of the function.

	* icall.c (ves_icall_Type_GetEvents_internal): Ditto.

2010-08-12  Rodrigo Kumpera  <kumpera@gmal.com>

	* icall.c (ves_icall_MonoType_get_Module): Don't mono_class_init
	the type as it's not needed.

	* icall.c (ves_icall_MonoType_get_Assembly): Ditto.

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
	mono_reflection_get_type can return a non-null type and set a
	loader error. Don't leak it.

	Fixes #630773

2010-08-12  Zoltan Varga  <vargaz@gmail.com>

	Bump corlib version because of the CustomAttributeData:.ctor()
	signature change.

2010-08-12  Zoltan Varga  <vargaz@gmail.com>

	Fix infinite loop in mono_class_get_nested_types () if a nested
	type fails to load. Fixes # 630041. Add a test.

2010-08-11  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (mono_reflection_resolve_custom_attribute_data):
	Check for loader and type load errors.

2010-08-11  Rodrigo Kumpera  <kumpera@gmail.com>

	* icall-def.h: Add new icall from CustomAttributeData.

	* object-internals.h: Add new reflection.c function.

	* reflection.c (mono_reflection_get_custom_attrs_info): Don't init
	the class when retrieving custom attributes since we must handle
	broken types.

	* reflection.c (create_custom_attr_data): Don't resolve cattr
	arguments eagerly. Instead pass enough information to
	CustomAttributeData so it can later on create them.

	* reflection.c (mono_reflection_resolve_custom_attribute_data):
	new icall used to create the cattr data arguments.

	This is required to match MS behavior and fix some of the issues
	triggered by trying to compile MD.

	Fixes #630074

2010-08-10  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	AppDomainUnloadedException ignored.

	AppDomainUnloadedException is also ignored when thrown in a
	threadpool thread.

2010-08-10  Marek Habersack  <grendel@twistedcode.net>

	[runtime] Fix for bug #624914. Runtime has to remap System.Config
	2.0 to 4.0

	The bug was caused by the runtime loading two copies of
	System.Configuration - one for the 4.0 profile (loaded by xsp4
	itself) and another for the 2.0 profile (loaded as a reference for
	BlogEngine.Core.dll) and for that reason, the static class
	System.Configuration.ConfigurationManager was instantiated twice
	in the BlogEngine application's AppDomain which, in effect, led to
	the exception since the configuration system wasn't reset from the
	default one to the system.web-specific one. The commit makes
	runtime remap System.Configuration 2.0 to 4.0.

	Thanks to Zoltan Varga for catching the issue.

2010-08-10  Zoltan Varga  <vargaz@gmail.com>

	Avoid an #ifndef HAVE_SGEN_GC inside MonoDomain, so the layout
	remains the same for all GCs.

2010-08-10  Mark Probst  <mark.probst@gmail.com>

	[sgen] Fix OBS warning.

	Add a dummy return to workers_thread_func() to make OBS happy.

2010-08-09  Andrew Jorgensen  <ajorgensen@novell.com>

	* Makefile.am: Add sgen-workers.c to sgen_sources

2010-08-09  Mark Probst  <mark.probst@gmail.com>

	[sgen] Sleep a little while busy-waiting for the gray queue
	distribution.

	In the parallel collector, the main GC thread needs to distribute
	all remaining entries in the gray queue to the worker threads.
	Since the distribution pool is limited in size we need to wait on
	it, which at this point is only possible with busy-waiting. Since
	we don't want to use up CPU resources and hog the cache lines we
	wait 2ms between distribution attempts.

2010-08-09  Zoltan Varga  <vargaz@gmail.com>

	Avoid registering roots inside the MonoDomain structure when using
	Boehm, since it is GC_MALLOC-ed, and Boehm doesn't like that.

2010-08-09  Laurent Etiemble  <laurent.etiemble@gmail.com>

	* mono/metadata/icall-def.h: Add entry for retrieving embedded
	application configuration.

	* mono/metadata/icall.c: Add function to retrieve embedded
	application configuration if one has been registered with the
	runtime.

2010-08-08  Mark Probst  <mark.probst@gmail.com>

	[sgen] Fixed heap for Mark&Sweep.

	This is a new variant of Mark&Sweep which uses a pre-allocated
	fixed-size heap instead of a dynamically grown, segmented one. The
	main advantage of this heap organization is that it takes only one
	pointer comparison to determine whether an object is on the small
	object heap or in the LOS, instead of inspecting the object's
	size, which requires three loads. Since that determination is
	required for every marked object, speeding it up can improve
	performance significantly.

2010-08-08  Mark Probst  <mark.probst@gmail.com>

	[sgen] Fixes.

	The parallel mark merge was missing a header and included an
	erroneous call to workers_init().

2010-08-07  Zoltan Varga  <vargaz@gmail.com>

	Move wapi shutdown to mono_cleanup () as
	TlsGetValue()/TlsSetValue() is used during shutdown.

2010-08-07  Zoltan Varga  <vargaz@gmail.com>

	* profiler.c (mono_profiler_shutdown): Disable all profiler
	events.

2010-08-06  Mark Probst  <mark.probst@gmail.com>

	[sgen] Separate mark function for parallel vs non-parallel
	mark&sweep.

	Revive the old serial mark function for serial Mark&Sweep because
	it's simpler and faster.

2010-08-06  Mark Probst  <mark.probst@gmail.com>

	[sgen] Make parallel vs non-parallel mark&sweep selectable.

	Make the parallel Mark&Sweep collector selectable with the "major"
	option of the "MONO_GC_PARAMS" variable as "marksweep-par". The
	serial Mark&Sweep collector remains the default as "marksweep".

2010-07-26  Mark Probst  <mark.probst@gmail.com>

	[sgen] One internal allocator per worker thread, to get rid of
	locking.

	Previously we used one internal allocator. That was not a problem
	as long as SGen was single-threaded. With parallel mark, however,
	we needed a lock for the internal allocator to make it work. This
	patch makes each worker thread use its own internal allocator
	instead, so we don't have to lock anymore.

	One problem introduced by this approach is that the allocator from
	which a gray queue section was allocated is not known at the point
	where the section is freed, because it might have been sent off to
	a different worker thread. To solve this we have a "delayed" free
	function, which determines the correct internal allocator from the
	internal allocator block (which is aligned). The section is then
	added to a delayed free queue of that allocator which is processed
	at some point by that allocator's worker thread.

	Note that the section cannot be freed by the thread that calls the
	delayed free function because that would result in the possibility
	of the "ABA" problem occuring.

2010-07-25  Mark Probst  <mark.probst@gmail.com>

	[sgen] Heavy statistics for the shared buffer.

2010-08-07  Mark Probst  <mark.probst@gmail.com>

	[sgen] Parallel mark.

	Make the mark phase of the Mark&Sweep collector parallel. At GC
	initialization we start a number of worker threads (as much as the
	machine has cores) between which the objects in the gray queue are
	distributed for marking.

2010-07-25  Mark Probst  <mark.probst@gmail.com>

	[sgen] Fix SGEN_ATOMIC_ADD.

2010-08-07  Zoltan Varga  <vargaz@gmail.com>

	Avoid loading AOT images compiled against Boehm in an SGEN
	runtime, and vice versa. Use 'amodule' instead of 'aot_module' in
	more places.

2010-08-06  Jb Evain  <jbevain@gmail.com>

	* marshal.c (mono_marshal_get_delegate_invoke): add support for
	delegates pointing to instance methods that are closed over null.
	Managed side of the feature is in 2ec0ab59fe4aecf5507a81846a66de.

2010-08-06  Mark Probst  <mark.probst@gmail.com>

	[sgen] Initialize interruption lock.

2010-08-06  Jb Evain  <jbevain@gmail.com>

	mono_method_body_get_object: implement support for methods defined
	in dynamic modules. Fixes #628660.

2010-08-05  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	* threadpool.c: ignore ThreadAbortException when it is unhandled
	in a threadpool thread.

2010-08-05  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	* threadpool.c: the calls to wsq_create, wsq_destroy and
	wsq_cleanup are inside a lock now to avoid race conditions upon
	shut down. Fixes bug #625359.

2010-08-05  Gonzalo Paniagua Javier  <gonzalo.mono@gmail.com>

	* mono-wsq.c: replaced -1 with a #define. Check the return value
	of TlsSetValue when creating a new queue.

2010-08-05  Mark Probst  <mark.probst@gmail.com>

	[Documentation] Document SGen environment variables.

	Document the MONO_GC_PARAMS variable in the man page and the
	"major" option of this variable in the error message.

2010-08-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* reflection.c (reflection_methodbuilder_to_mono_method): Handle
	the case where a method parameter is defined using a generic
	argument of another method. The resulting signature must use the
	generic arguments of the method it belongs and not from others.
	This fixes one issue found while testing IronRuby 1.1.

2010-08-04  Andrew Jorgensen  <ajorgensen@novell.com>

	* Makefile.am (libmonoruntime_la_SOURCES): Add
	sgen-major-*-object.h

2010-08-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* loader.c (mono_method_signature): Print type and method name in
	case of signature parsing error.

2010-08-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (mono_method_signature_checked): Change
	signature to take a MonoError* instead of a GList** to make it
	easier to the runtime to get error messages out of the metadata
	verifier.

	* verify-internals.h: Change signature.

	* loader.c (mono_method_signature_checked): Pass the current
	MonoError to mono_method_signature_checked to get better error
	messages.

2010-08-04  Rodrigo Kumpera  <kumpera@gmail.com>

	* metadata-verify.c (init_verify_context): Change parameter from
	GList** to gboolean so it can be used with functions that don't
	receive a GList** argument.

2010-08-04  Andrew Jorgensen  <ajorgensen@novell.com>

	* Makefile.am (libmonoruntime_la_SOURCES): Add sgen-protocol.h

2010-08-04  Jb Evain  <jbevain@gmail.com>

	mono_custom_attrs_from_param: return null if the method defining
	the parameter can not be found in the MethodDef table to avoid
	false positives

2010-08-04  Jb Evain  <jbevain@gmail.com>

	mono_method_get_index: return zero for constructed array methods
	as they don't exist in the MethodDef table

2010-07-28  Mark Probst  <mark.probst@gmail.com>

	[sgen] Fix binary protocol.

	The major collector refactoring left the binary protocol broken.
	Fix it.

2010-07-28  Mark Probst  <mark.probst@gmail.com>

	[sgen] Fix heavy statistics.

	The major collector refactoring left heavy statistics broken. A
	few heavy statistics counters are defined in sgen-gc.c but used in
	the major collectors. We're now exporting them. Another
	possibility would have been to define them in both major
	collectors, but since this is only a debug feature that's not
	normally compiled in, we don't care.

2010-07-28  Mark Probst  <mark.probst@gmail.com>

	[sgen] Inline mono_sgen_par_object_get_size().

	Define mono_sgen_par_object_get_size() as an inline function in
	sgen-gc.h.

2010-07-28  Mark Probst  <mark.probst@gmail.com>

	[sgen] Put all scan and copy functions into the major collectors.

	Let the major collectors define their own versions of all the scan
	and copy functions, too. We avoid indirect calls and allow more
	inlining.

2010-07-27  Mark Probst  <mark.probst@gmail.com>

	[sgen] Put major_scan_object() into the major collectors.

	Make the major collectors define their own versions of
	major_scan_object() by including a small header file. This avoids
	indirect calls to major_copy_or_mark_object() and allows inlining.

2010-07-27  Mark Probst  <mark.probst@gmail.com>

	[sgen] Make major collector configurable via MONO_GC_PARAMS.

	We can now tell SGen which major collector to use by setting the
	"major" parameter in MONO_GC_PARAMS to either "copying" or
	"marksweep".

2010-07-27  Mark Probst  <mark.probst@gmail.com>

	[sgen] Major collectors in their own compilation units.

	SGen's two major collector, copying and mark&sweep, are now in
	their own separate compilation units, communicating with SGen
	through an internal API.

2010-08-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_method_from_wrapper): Avoid returning
	non MonoMethod's.

2010-08-03  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_get_header): Add a missing unlock.

2010-07-31  Martin Baulig  <martin@novell.com>

	* metadata/mono-debug.h: Bump debugger version to 81.6.

2010-07-30  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c (do_load_token): Verify table and index of the source
	token.

	Fixes #560348

2011-01-04  Veerapuram Varadhan  <v.varadhan@gmail.com>

	* assembly.c (framework_assemblies): Map System.Transactions to
	4.0 framework assemblies.

	Fixes #635335

2010-11-03  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_register_symfile_for_assembly): New method.
	This is used together with mono_register_bundled_assemblies() and
	mono_register_config_for_assembly() to support bundles.

2010-07-30  Mark Probst  <mark.probst@gmail.com>

	* sgen-archdep.h (ARCH_COPY_SIGCTX_REGS): Add casts to fix
	compiler warnings on AMD64.

2010-07-29 Rodrigo Kumpera  <rkumpera@novell.com>

	Add support for calling vararg methods from SRE code.
	This requires storing per-memberref signatures so
	the JIT can know how many varargs parameters are
	been passed.

	* loader.c (mono_method_get_signature_full): If the
	image is dynamic call mono_reflection_lookup_signature
	to lookup the signature.

	* reflection.c (mono_image_create_method_token): Save
	the method object into the MonoDynamicImage::tokens.
	Create a signature struct for MethodBuilders.
	Save the signature into vararg_aux_hash so it can be
	retrieved later.

	* reflection.c (mono_reflection_lookup_signature): New
	function. Check vararg_aux_hash for a signature before
	returning method's own signature.

	* metadata-internals.h (MonoDynamicImage): Add new
	vararg_aux_hash hashtable.

	* object-internals.h: Add mono_reflection_lookup_signature.

	Fixes #626441

2010-07-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Don't move forward
	with verification if a stack overflow is detected for
	the ARGLIST opcode.

	Fixes #601953

2010-07-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_bounded_array_class_get): Fail arrays
	of void or typedbyref. Those two types are not allowed
	to be used with arrays. Failing them is easier and less
	error prone than returning NULL.

	Fixes #603279

2010-07-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_get_delegate_invoke): Don't assert if
	the Invoke method is not found. This can happen with
	broken types and it's the caller resposibility to deal
	with a null return.

	Fixes #553403

2010-07-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_assembly_name_from_token): Handle
	images with null assembly. This can happen with resource
	or broken assemblies.

	Fixes #623586.

2010-07-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (concat_two_strings_with_zero): Guard against
	null strings.

	Modified version of patch by Sebastien Pouliot.

	Fixes #623653.

2010-07-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* image.c (mono_image_load_module): Handle the case of
	module index equal or smaller than zero. It is possible
	to embed a valid zero index into metadata so this case
	must be explicitly handled.

	Patch by Sebastien Pouliot.

	Fixes #623581.

2010-07-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (INVALID_IMPLMAP_FLAGS_BITS): Add non standard
	bits for best fit on/off (4,5) and throw on unmappable on/off (12/13).

	Fixes #622221.

2010-07-27  Geoff Norton  <gnorton@novell.com>

	* sgen-archdep.h: Ensure we store the registers we actually
	need to scan.

2010-07-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): Improve error message.

2010-07-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_generic_param_is_constraint_compatible): Don't
	fail a contraint check even if the candidate has no constraints.
	All constraints might resolve to the candidate itself so it can
	have none.

	Fixes #622225.

2010-07-25  Mark Probst  <mark.probst@gmail.com>

	* sgen-internal.c: Only compile this if HAVE_SGEN_GC is defined.

2010-07-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-internal.c, sgen-gc.h, sgen-major-copying.c: Make the
	internal allocator fast by keeping free-lists of chunks, not only
	within chunks.  Align the chunks, so that on freeing we can get
	the chunk without searching.

2010-07-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-internal.c, sgen-gc.c, sgen-gc.h, sgen-gray.c,
	sgen-major-copying.c, sgen-marksweep.c, sgen-pinning-stats.c,
	sgen-pinning.c: Allocate fixed-size structs without specifying the
	size, instead registering it once with its type.
	Dynamically-sized need their size specified when being freed.

2010-07-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-major-copying.c, sgen-internal.c, sgen-gc.c, sgen-gc.h,
	sgen-pinning.c: Copying major collector doesn't mess around with
	internals of the internal allocator anymore, instead using public
	functions.

2010-07-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-internal.c: Internal allocator in its own module.

	* sgen-gc.c, sgen-gc.h, sgen-gray.c, sgen-los.c,
	sgen-major-copying.c, sgen-marksweep.c, sgen-pinning.c,
	sgen-pinning-stats.c: Remove internal allocator and call the
	public functions now.

	* Makefile.am: Added new file.

2010-07-24  Zoltan Varga  <vargaz@gmail.com>

	* sgen-archdep.h (ARCH_COPY_SIGCTX_REGS): Fix warnings on amd64.

2010-07-24  Sanjoy Das <sanjoy@playingwithpointers.com>

	* sgen-gc.h: Removed 'foo defined but not used' warnings for the
	  *_signal_num variables.

2010-07-23  Zoltan Varga  <vargaz@gmail.com>

	* file-io.c (ves_icall_System_IO_MonoIO_Read): Add a null check.
	(ves_icall_System_IO_MonoIO_Write): Ditto.

	* loader.c (mono_loader_cleanup): Delete loader_mutex, the shutdown races should
	be fixed now.

2010-07-23  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_loader_lock_if_inited): New helper function which can be called
	during startup before the loader lock is initialized.
	(mono_loader_unlock_if_inited): Ditto.


2010-07-21  Geoff Norton  <gnorton@novell.com>

	* sgen-archdep.h: Fix the build on amd64-darwin.

2010-07-16  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_print_unhandled_exception): Fix a warning.

2010-07-15 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: use a monitor thread to start up new ones when needed.
	Fixes bug #622398.

Thu Jul 15 18:44:44 CEST 2010 Paolo Molaro <lupus@ximian.com>

	* reflection.c, class-internals.h, class.c, icall.c: support
	reflection of default constant value for Re.Emit properties.

2010-07-14  Miguel de Icaza  <miguel@novell.com>

	* reflection.c (load_cattr_value): Add support for encoding
	DateTime constants into the blob.    Turns out that this is
	required by .NET, it was only documented post 1.0.

	* icall.c (ves_icall_type_GetTypeCodeInternal): Guard test for
	System.Decimal and System.DateTime inside a mono_is_corlib_image
	call.   A sample program showed that we could return the wrong
	TypeCode just by creating a class with those names. 

	* class.c (mono_is_corlib_image): Exposed this to other metadata/
	code.

2010-07-14  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Don't abort (only warn) if we cannot find 
	a caller for relfecting code (transparent is assumed). Fix
	get_method_access_exception to accept a NULL caller.

2010-07-14  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Heavy statistics on the internal allocator.

2010-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c, sgen-gc.h: Keep track of num_empty_blocks
	properly and in a thread-safe way.

2010-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-marksweep.c: Make object marking thread-safe.

2010-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Versions of safe_object_get_size() and
	copy_object_no_checks() that work without the object's vtable
	intact, by passing the correct vtable as an argument.

2010-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c: Make allocation of major sections thread-safe.

2010-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-gc.h, sgen-los.c, sgen-major-copying.c,
	sgen-marksweep.c: Update the heap boundaries thread-safe and lock
	free if parallel mark is enabled.

2010-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-gc.h, sgen-major-copying.c: Lock the internal
	allocator if parallel mark (not committed yet) is enabled.

2010-07-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (inflate_mono_method): Handle dynamic
	generic instances that have method.count set but
	methods not. Fixes another crash from boo's test suite.

2010-07-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_MonoMethod_get_base_method): If
	the method slot is bigger than the class vtable, return
	the original method. Makes booc work again.

2010-07-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_generic_param_is_constraint_compatible):
	The candidate type itself might satisty the required
	constraints.

	Fixes #621599.

2010-07-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (fix_partial_generic_class): Inflate the
	generic instance parent in case it was changed after
	MonoGenericClass was instantiated.

	Fixes one of the issues from #389886.

2010-07-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gray.c: Store only a pointer to one end of the gray queue.

2010-07-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_signature_checked): Release the domain
	lock on failure.

2010-07-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Store the forwarding address in the first word of an
	object, where the forwarding bit is stored.

2010-07-10  Mark Probst  <mark.probst@gmail.com>

	* gc.c, gc-internal.h, sgen-gc.c, sgen-gc.h, sgen-os-mach.c: An
	interface to register our Mach exception thread which will not be
	suspended by stop-the-world.

2010-07-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_get_method_constrained): Properly unlock the
	domain lock on failure. Use checked variant of
	inflate_generic_signature.

2010-07-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_signature_checked): Use checked
	variant of inflate_generic_signature.

	Fixes #606353.

2010-07-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_parse_type_internal): Don't use
	cannonical types when a transient type was requested.

	Fixes #608626.

2010-07-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gray.c, sgen-gc.c, sgen-major-copying.c, sgen-marksweep.c:
	All functions that touch the gray queue directly or indirectly now
	take it as an argument.

2010-07-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gray.c, sgen-gc.c, sgen-major-copying.c, sgen-marksweep.c:
	Put the gray queue data into a struct and pass it around.

2010-07-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_method_can_access_method_full): Handle type
	accessibility with very deep nested types.

	* class.c (mono_method_can_access_field_full): Ditto.

	Fixes #619300.

2010-07-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-los.c, sgen-major-copying.c, sgen-marksweep.c,
	sgen-scan-object.h: Use a macro for rounding up sizes and
	addresses to ALLOC_ALIGN.

2010-07-09 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* file-io.c: fix GetFileSystemEntries for patterns containing
	directories.

2010-07-09  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c (major_finish_major_collection): Don't free
	major heap blocks on 32 bit platforms because it can lead to
	address space fragmentation.  We'll figure this out later.

2010-07-09  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c, sgen-gc.c, sgen-major-copying.c: Free major
	heap blocks for mark&sweep eventually.

2010-07-09  Mark Probst  <mark.probst@gmail.com>

	* sgen-protocol.c: Fix build when binary protocol is disabled.

2010-07-09  Mark Probst  <mark.probst@gmail.com>

	* sgen-protocol.c, sgen-gc.c: Make binary protocol lock-freely
	thread-safe.

2010-07-08 Neale Ferguson <neale@sinenomine.net>

	* sgen-archdep.h: Add support for s390x
	* domain.c: Use gsize so that 64-bit big endian systems produce 
	bitmap.

2010-07-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (verify_image_file): Initialize the vtable as well.

2010-07-07  Geoff Norton  <gnorton@novell.com>

	* sgen-gc.h:  Not every system has sys/signal.h.  Prefer the posix
	header.

2010-07-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* assembly.c (mono_assembly_load_reference): Replace a g_warning
	with a mono_trace calls. This makes compiling MD a lot less scary.

2010-07-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_stobj): Improve error message.

2010-07-08  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (OBJ_COMPLEX_ARR_FOREACH_PTR): Don't load the vtable
	from the object because it might have pinned/forwarding bits set.

2010-07-06  Zoltan Varga  <vargaz@gmail.com>

	* Makefile.am (sgen_sources): Add missing sgen files.

2010-06-07  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_get_thread_abort_signal):
	New helper function since mono_thread_get_abort_signal() is now
	internal.

2010-06-07  Martin Baulig  <martin@ximian.com>

	* mono-debug.h, debug-mono-symfile.h: Kill glib dependencies.

2010-07-02  Michael Hutchinson  <mhutchinson@novell.com>

	* object-internals.h, object.h: Make mono_string_to_utf_8_checked 
	public, as mono_string_to_utf_8 is deprecated.

	* object.(c|h): Added mono_object_to_string, a public helper function 
	that calls ToString on a MonoObject and returns a MonoString.

	* object.c (mono_print_unhandled_exception): Use mono_object_to_string.

2010-07-01  Zoltan Varga  <vargaz@gmail.com>

	* filewatcher.h filewatcher.h decimal.c threads-types.h: Applied patch
	from Elijah Taylor (elijahtaylor@google.com). Fix some definitions to
	match their declarations and vice-versa.


Wed Jun 30 12:08:36 CEST 2010 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, domain-internals.h: mark functions that are
	needed by the llvm module.

2010-06-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* assembly.c (framework_assemblies): Add 3.5 assemblies.

	* domain-internals.h (MonoRuntimeInfo): Increase version_sets
	by one to have room to remap 3.5 assemblies.

	* domain.c (supported_runtimes): Add 3.5 remapping information.

2010-06-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_create_token): Handle a
	FieldBuilder from a different assembly.

	Fixes #611836.

2010-06-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_store_static_field): Improve error
	message.

2010-06-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* assembly.c: Revert r159692 since it breaks loading 3.5
	assemblies under 2.0.

2010-06-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_make_array_type): Raise a TLE if a
	TypedByRef is passed.

	* icall.c (ves_icall_Type_make_byref_type): Ditto.

	* icall.c (ves_icall_Type_MakePointerType): Ditto.

	Fixes #612780.

2010-06-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* assembly.c: Add a few more assemblies to the list of framework
	assemblies.

	Fixes #617714.

2010-06-28  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_vtable_entry): Avoid a crash if mono_class_setup_vtable ()
	fails.

2010-06-25  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_class_inflate_generic_method_full_checked): Added
	a comment regarding a hack in mini-trampolines.c.

2010-06-26  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (mono_gc_wbarrier_value_copy_bitmap): Use SIZEOF_VOID_P instead of
	sizeof(SIZEOF_VOID_P) which is 4.

	* gc.c (mono_gc_init): Move the GC disabled check to *-gc.c.

2010-06-25  Zoltan Varga  <vargaz@gmail.com>

	* null-gc.c boehm-gc.c: Define the mono_gc_ pthread wrapper functions for these
	GCs too.

	* *-gc.c (mono_gc_wbarrier_value_copy_bitmap): Implement this for all GCs.

	* sgen-gc.c (mono_gc_is_moving): New function returning whenever this GC can move
	objects.

	* *-gc.c (mono_gc_set_desktop_mode): New function setting up the GC to work in
	desktop mode.

2010-06-25  Zoltan Varga  <vargaz@gmail.com>

	* *-gc.c (mono_gc_get_description): New function returning a human readable
	description of the current GC.

2010-06-24  Miguel de Icaza  <miguel@novell.com>

	* mono-hash.c: Moved here from mono/utils as this file is
	GC-aware, and the utils directory is not.

2010-06-23  Miguel de Icaza  <miguel@novell.com>

	* Makefile.am: Add support for building a sgen-aware versions of
	the libraries: libmonoruntimesgen.la libmonoruntimesgen-static.la,
	they share all the components of the default, but use a differen
	set of CFLAGS to enable SGEN instead.

	Put the BOEHM defines in the CFLAGS definition. 

	* domain-internals.h (MonoJitInfo): this structure used to have
	different sizes depending on the GC that was configured (Boehm vs
	SGen).   I have removed this difference for the sake of avoiding
	the complexity of dealing with the mono/arch directory requiring
	GC-specific changes to their Makefiles.

2010-06-23  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-los.c, sgen-marksweep.c: Fix warnings.

2010-06-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_type_hash): Don't hash
	the type kind for dynamic types since it can change.

2010-06-22 Geoff Norton  <gnorton@novell.com>

	* sgen-os-mach.c: We cannot call malloc from the gc, so we need to use
	alloca instead to prevent a deadlock.

2010-06-22  Geoff Norton  <gnorton@novell.com>

	* domain.c: Allow gettings the tls key, since we need it for
	cross thread tls poking in sgen-mach
	* sgen-gc.(c|h), gc-internal.h: Rework sgen into having some functions
	in external files for platform specific STW support.
	* sgen-os-mach.c: Add a new mach kernel backend implementation of STW.
	* sgen-os-posix.c: Move the existing posix signal based STW here.

2010-06-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_array_to_lparray): Allow MONO_TYPE_PTR. Fixes #615952.

2010-06-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Map new PropertyBuilder fields.

	* reflection.c (property_encode_signature): Emit an instance
	signature if property's callconv is hasthis.

	* appdomain.c: Bump corlib version.

2010-06-20  Jb Evain  <jbevain@novell.com>

	* metadata-verify.c: do not consider the assembly invalid if it
	doesn't have a #Blob stream as resource assemblies don't
	necessarily have one.

2010-06-17  Geoff Norton  <gnorton@novell.com>

	* sgen-archdep.h: sgen support for arm linux and darwin.

2010-06-17  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_get_header): Avoid a crash if the declaring method
	has a faulty header.

2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c (mono_gc_wbarrier_value_copy_bitmap): Work in a similar
	way to mono_gc_wbarrier_value_copy but takes a bitmap that
	indicates which slots need a write barrier.

2010-06-14  Jonathan Pryor <jpryor@novell.com>

	* Makefile.am (EXTRA_DIST): Add runtime.h.

2010-06-14  Zoltan Varga  <vargaz@gmail.com>

	* object.c (build_imt_slots): Don't crash if callbacks.get_imt_trampoline is not set.

2010-06-11  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_method_add_generic_virtual_invocation): Fix the computation of the
	IMT slot which is passed to callbacks.get_imt_trampoline.

2010-06-11  Zoltan Varga  <vargaz@gmail.com>

	* object.c: Use a callback to create IMT trampolines, allowing the usage of one
	imt trampoline per imt slot when using LLVM.

2010-06-10  Jonathan Pryor <jpryor@novell.com>

	* object.c (mono_runtime_run_main): Move fire_process_exit_event() into
	  runtime.c:mono_runtime_shutdown().
	* runtime.c: Added; adds mono_runtime_shutdown(), which invokes the
	  AppDomain.ProcessExit event in all AppDomains.

2010-06-06  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Don't set *exc to NULL, it is now
	done by the caller.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-los.c: Keep bitmaps on chunk usage in LOS sections to speed
	up freeing.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-los.c: New LOS allocator that allocates large
	segments of memory at once, to reduce the number of mmap/munmap
	calls.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-protocol.c, sgen-protocol.h: Protocol degraded
	allocations and distinguish between normal, degraded and pinned
	allocations.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-major-copying.c, sgen-marksweep.c: Make degraded
	allocations count toward major collections and trigger major
	collections from degraded allocations if appropriate.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c (ms_get_empty_block): Update heap boundaries.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Enable mark&sweep again.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Increase the maximum small object size to 8000 bytes.

2010-06-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-major-copying.c, sgen-marksweep.c: Have only one
	major heap allowance for minor collections, instead of two
	separate ones for small and large objects.  This reduces the
	number of major collections.

2010-06-04  Marek Habersack  <mhabersack@novell.com>

	* icall.c (ves_icall_MonoType_GetEvent): be case insensitive is
	the BFLAGS_IgnoreCase is raised

2010-06-03  Zoltan Varga  <vargaz@gmail.com>

	* debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Rewrite this so it returns
	all information in a single structure. Return information about scopes as well.

	* mono-debug.c (mono_debug_lookup_locals): Ditto.

2010-06-02  Geoff Norton  <gnorton@novell.com>

	* appdomain.c: If we are running with IOMAP we might
	have been provided a string that isn't case-aware for our file-
	system, so we need to use io-portability to check if the file 
	exists, rather than a simple glib test.

	Fixes #608849

2010-06-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_generic_parameters): Verify if
	there are not loops in constraints.

2010-06-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_compatible_boxed_valuetype): Constaints
	must be recursively checked if one generic argument
	has a constraint on another.

	Fixes #610625.

2010-05-31  Miguel de Icaza  <miguel@novell.com>

	* console-unix.c (terminal_get_dimensions): Fix my previous
	botched commit and return the actual value obtained from the ioctl.

2010-05-29  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Always use DESC_TYPE_RUN_LENGTH for objects without
	references so that we don't have to do the cache-cold fetch of the
	class in copy_object_no_checks().

2010-05-29  Robert Jordan  <robertj@gmx.net>

	* marshal.c (mono_marshal_asany): marshal LPWSTRs using
	mono_marshal_string_to_utf16_copy () to avoid memory allocation
	mismatches under Windows. Fixes pinvoke2:test_0_asany.

2010-05-28  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Change default nursery size to 4MB, because it
	improves performance on many applications and benchmarks.

2010-05-28  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-scan-object.h: Value types in arrays are not
	always aligned to ALLOC_ALIGN.  To handle this, shift the size in
	the GC descriptor by one bit, and don't encode the size for value
	types not containing references.  Also get rid of
	DESC_TYPE_STRING.

2010-05-28  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Don't depend on the size encoded in a GC descriptor
	other than for remset processing.

2010-05-28  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: More and better remset consistency checks.

2010-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c: Add a note about the int[] trick to avoid some
	memset.

2010-05-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c (sort_addresses): Use heap sort since it has better
	performance.

	This helps programs with lots of threads or thread with big stacks
	since the bottleneck the pin queue can get quite big.

2010-05-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c (search_fragment_for_size): Move fragment setup into
	a separate function called setup_fragment.

	* sgen-gc.c (search_fragment_for_size_range): Variant of
	search_fragment_for_size that does search for a secondary smaller
	size.

	* sgen-gc.c (mono_gc_alloc_obj_nolock): Use search_fragment_for_size_range
	for tlab allocation so small fragments are used.

	This patch uses small fragments for tlab allocation when possible in order
	to improve nursery utilization. With a fixed size tlab this patch is not very
	usefull but once size gets dynamically adjusted, this will be invaluable.

	Performance under pystone 500k is unchanged. Nursery utilization improves by
	3.5% and 18 more fragments are used per minor GC.

	Performance under modified binary-tree is unchanged. Nursery utilization
	improves by 0.5% and 3 more fragments are used per minor GC.

	These numbers make sense since as more pinning happens, more fragments are
	created and so are the chances of having a bunch of small ones.

2010-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
	* sgen-gc.c (mono_gc_alloc_obj_nolock): Avoid wasting space	from
	the current fragment when allocating a TLAB.

	Reduces number of pystone 500k minor collections by 7%.

2010-05-25  Martin Baulig  <martin@ximian.com>

	Applying a patch from Lucas Meijer <lucas@lucasmeijer.com>.

	* debug-mono-symfile.c: Release memory from symfiles that were
	loaded from memory.

2010-05-24  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_free_dynamic_wrappers): Avoid an assert when this is called
	during shutdown.

2010-05-22  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Simplify the code computing the
	target class and remove some dead code.

2010-05-22  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c: Add a 'transient' argument to the MonoType creation functions, so
	the MonoTypes inside method headers can be freed when the header is freed.

2010-05-21  Zoltan Varga  <vargaz@gmail.com>

	* threadpool.c: Fix the DISABLE_SOCKETS build.

2010-05-19 Martin Baulig  <martin@novell.com>

	Fix #604911.

	* threads.c (wait_for_tids_or_state_change): Use an
	alertable WaitForMultipleObjectsEx().
	(wait_for_tids): Likewise.

2010-05-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_marshal_init): Register mono_gchandle_get_target
	icall.

	* marshal.c (mono_delegate_to_ftnptr): Use a gchandle instead of
	gc tracked memory.

	* marshal.c (mono_marshal_emit_managed_wrapper): Retrieve the first
	argument from a gchandle.

	* marshal.c: Get rid of the delegate_target_locations hash table.

	Fixes #605295.

2010-05-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c: Use _fast variants	for string and array length.

2010-05-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c: Fix counters to be 64 bits.

	* sgen-gc.c (dump_heap): Fix formating strings.

2010-05-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c (global_remset_location_was_not_added): New
	function that implements a 2 element LRU cache for just
	added remsets. It is used to avoid adding duplicate ones.

	* sgen-gc.c (add_to_global_remset): Check cache	before
	adding new entry.

	* sgen-gc.c (scan_from_remsets): Don't process global remsets
	that fail the cache test.

	* sgen-gc.c (scan_from_remsets): Simplify the global remset
	loop removing one condtion that is not possible.

	A 2 element LRU cache was chosen by profiling IronPython 2.6
	pytones with 1M passes and corlib compilation.

	For the ipy test duplication was originally 940.92, measured
	by "Store remsets" divided by "Unique store remsets".

	With a 2-element LRU, duplication went to 1.007. Without the
	check in scan_from_remsets 1.438.

	With a 16-elements LRU, duplication reduction was negligibe.
	A single element cache was basically of no use.

	With corlib compilation duplication went from  1.4 to 1.02.

	Performance results is a 20% time decrease for ipy and 2%
	with corlib.
2010-05-16  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c (mono_debug_cleanup): Fix a crash in the previous change.

2010-05-15  Geoff Norton  <gnorton@novell.com>

	* mono-debug.c: Fix a leak of the global table on shutdown.

2010-05-15  Geoff Norton  <gnorton@novell.com>

	* debug-mono-symfile.(c|h): Add mono_debug_symfile_free_location
	to clean up MonoDebugSourceLocation's.

2010-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Fail a class
	if there is a loop with its parent.

	Fixes #598239.

2010-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_loader_set_error_type_load): Convert
	a g_warninig to mono_trace_warning.

2010-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_get_full): Release strings on failure
	to avoid leaking them.

2010-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Only return
	the class if no exceptions were detected.

	* class.c (mono_class_create_from_typedef): Don't remove
	broken classes from class_cache. Just set failure and
	bail out.

	This fixes a memory a memory leak where resolving the same
	broken class multiple times resulted in a memory leak.

	The right behavior would be to actually return the class
	a let the caller figure it out.

2010-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* mono-ptr-array.h: Add mono_ptr_array_sort.

	* reflection.c (mono_image_build_metadata): Replace that ugly
	qsort call with mono_ptr_array_sort.

2010-05-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Switch to the copying major collector, because
	Mark&Sweep is still buggy.

2010-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_build_metadata): Don't put managed
	references on non-tracked memory.

2010-05-13  Zoltan Varga  <vargaz@gmail.com>

	* sgen-archdep.h (ARCH_COPY_SIGCTX_REGS): Fix this for amd64.

2010-05-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Switch to mono-ptr-array.h.

2010-05-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* Makefile.am: Add mono-ptr-array.h.

	* mono-ptr-array.h: New header that implements
	a GC tracked equivalent of g_ptr_array.	

2010-05-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetInterfaces): Rewrite this
	method to avoid initializing the class.

	Fixes #605115.

2010-05-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_System_MonoType_getFullName): It
	doesn't require to init the class.

2010-05-11  Miguel de Icaza  <miguel@novell.com>

	* console-unix.c: Signal handlers now save and restore errno.   We
	have never had a bug report about this, ioctl does change errno. 

	Hide the unused method.   

	Remove internal declarations from public headers.

	Document what the signal handler is doing

2010-05-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c (clear_unreachable_ephemerons): Clear
	unreachable keys with a tombstone.

	* sgen-gc.c (mark_ephemerons_in_range): Ignore
	tombstone keys.

2010-05-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h:
	* gc-internals.h:
	* gc.c: New GC:get_ephemeron_tombstone.

2010-05-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (create_exceptions): Rename to
	create_domain_objects. Create the ephemeron tombstone object.

	* domains-internals.h (MonoDomain): Add new field for the
	ephemeron tombstone.

	* domain.c (mono_domain_free): Set ephemeron_tombstone to
	NULL.

2010-05-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* sgen-gc.c (mono_gc_clear_domain): Both ephemerons
	and dislinks must be processed before LOS since they
	could end up with pointers to memory returned to the
	OS.

2010-05-11  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_alloc): New helper function to centralize memory allocation
	for classes, allocates either from the image mempool or from the heap.

	* class.c: Use mono_class_alloc to allocate memory owned by classes.

	* metadata.c (free_generic_class_dependents): Free more items belonging to
	generic classes.

2010-05-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_method_get_handle): Handle MonoGenericMethod
	as well. Fixes #604054.

2010-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: MS doesn't mind duplicates in the
	typeref table. Move it to full verification.

	Fixes #600508.

2010-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* image.c (do_mono_image_load): Report verification
	errors when loading an image fails.

2010-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_type_get_object): Remove chunk of code
	no longer in use.

2010-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h
	* icall.c: Delete some unused icalls.

2010-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (mono_domain_has_type_resolve): Check for
	NULL domain objects to make pedump happy.

	* object.c (mono_field_get_value): Assert on NULL object.
	It's the caller resposibility to check for this.

	* object.c (mono_field_get_value_object): Ditto.

	Fixes #601384.

2010-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_type_is_subtype_of): Non iface subtype
	checks can avoid doing a mono_class_init.

	* icall.c: Remove mono_class_init from a bunch of icalls that
	don't need it.

	Hopefully we're now lazy enough to fix most victims of #601431.

2010-05-07  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Remove REMSET_ROOT_LOCATION.

2010-05-07  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Remove unnecessary checks in domain clearing code.

2010-05-07  Marek Habersack  <mhabersack@novell.com>

	* culture-info-tables.h: updated to include en-TT culture. Fixes
	bug #594035

2010-05-06 Rodrigo Kumpera  <rkumpera@novell.com>

	Move mono_class_init from mono_type_get_object to icalls.
	This causes massive memory savings for Assembly::GetTypes () and
	make it fail a lot less due to missing dependencies.

	This is a conservative, naive change as it doesn't remove some
	mono_class_init from places that might not need them. Carefull
	review of those should follow.

	* reflection.c (mono_type_get_object): Don't mono_class_init the
	returning type.

	* reflection.c:
	* cominterop.c:
	* icall.c:
	* marshal.c: Call mono_class_init in functions receiving a MonoType
	object.

	First step into fixing #601431.

2010-05-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* gc-internal.h: Add new functions required for ephemeron support.

	* gc.c: Implement ves_icall_System_GC_register_ephemeron_array.

	* icall-def.h: Add GC::register_ephemeron_array.

	* object.c (compute_class_bitmap): sys.rt.cs.Ephemeronis an opaque type
	under sgen. Its fields must not be marked.

	* sgen-gc.c (mono_gc_clear_domain): Call cleanup function for ephemerons.

	* sgen-gc.c (finish_gray_stack): Mark all reachable ephemerons before
	handling finalizable objects. Clean dead ones after all finalizable
	handling.

	* sgen-gc.c (dump_heap): Add new kind of internal memory.

	* sgen-gc.c (null_ephemerons_for_domain): Remove from the list ephemeron
	arrays from the dead domain.

	* sgen-gc.c (clear_unreachable_ephemerons): Clear dead ephemerons entries.

	* sgen-gc.c (mark_ephemerons_in_range): Mark/Copy all ephemeron values
	whose keys are reachable.

	* sgen-gc.c (mono_gc_ephemeron_array_add): Register the array into the
	list of live ephemeron arrays.

2010-05-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_layout_fields): Don't perform alignment
	if align is zero.

	* class.c (mono_class_layout_fields): Init field related information
	to sane defaults.

2010-05-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_verifier_verify_class): Verify the constraint
	of generic type definitions.

2010-05-04  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c: Simplify free list maintenance in sweep.

2010-05-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-marksweep.c, sgen-major-copying.c: Unify
	major_do_collection() across the two major collectors.

2010-05-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Add heavy statistics counter for re-added global
	remsets.

2010-05-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c, sgen-gc.c: Use one mark bit per ALLOC_ALIGN to
	get rid of a division in critical code.

2010-04-29  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-marksweep.c, sgen-major-copying.c: Have separate
	blocks for objects without references in mark&sweep, to improve
	performance.

2010-04-28  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-marksweep.c, sgen-major-copying.c: Bring heavy
	statistics up-to-date.

2010-04-27  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-marksweep.c, sgen-major-copying.c: Support
	heap-dump for mark&sweep.

2010-04-27  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_get_header): Move the is_inflated case before the
	wrapper case, as a method can be both.

2010-04-27  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-marksweep.c, sgen-major-copying.c: Don't do a
	separate pass to scan pinned and large object but use the gray
	queue like for regular objects.

2010-04-26  Zoltan Varga  <vargaz@gmail.com>

	* boehm-gc.c: Applied patch from Robert Nagy (robert@openbsd.org). Include
	string.h for memmove.

	socket-io.c: Applied patch from Robert Nagy (robert@openbsd.org).
	ipaddress_to_struct_in6_addr() is only needed when
	defined(HAVE_STRUCT_IP_MREQN) || defined(HAVE_STRUCT_IP_MREQ).

2010-04-25  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-marksweep.c, sgen-major-copying.c: Properly
	separate copy_object functions for major vs nursery.  Allows us to
	get rid of a few checks and the start and end parameters for many
	functions.

2010-04-25  Mark Probst  <mark.probst@gmail.com>

	* sgen-marksweep.c, sgen-gc.c, sgen-major-copying.c,
	sgen-protocol.c, sgen-protocol.h, Makefile.am: Major Mark&Sweep
	collector.

2010-04-25  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_create_from_typedef): Initialize class->nested_in after
	calling setup_mono_type () since the nested parent could recursively reference
	the nested class using generic constraints. Fixes #599469.

2010-04-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-pinning.c, sgen-major-copying.c: Major collector
	abstraction.

2010-04-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Remove more unneeded code.

2010-04-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Disable managed allocator and wbarrier when the
	binary protocol is enabled.

2010-04-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Put nursery-fragment-cleaning into its own function.

2010-04-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Remove a few commented out and unneeded bits.

2010-04-23 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: patch from Robert Nagy that fixes a nullref and
	uses mono_sem_wait instead of mono_sem_timedwait for openbsd.

2010-04-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_type_is_assignable_from): Properly handle byref
	types.

	Fixes #331126

2010-04-21  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Turn off semi-precise stack mark.

2010-04-20  Sebastien Pouliot  <sebastien@ximian.com>

	* reflection.c (mono_custom_attrs_from_index): Use right function
	to free 'list' (i.e. g_list_free) if the verifier fails.

2010-04-19 Rodrigo Kumpera  <rkumpera@novell.com>

		* verify.c: Handle the case where mono_type_get_underlying_type_any
		returns NULL. Remove duplicated code between MONO_TYPE_GENERICINST
	 	and MONO_TYPE_VALUETYPE in those case.

		Based on a slightly modified patch by Sebastien Pouliot  <sebastien@ximian.com>

		Hopefully Fixes #564253.

2010-04-19 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* domain-internals.h: made threadpool_jobs volatile.
	* mono-wsq.c: add an assert to verify that the threadpool cleaned up
	all local jobs.
	* threadpool.c:
		-When two threads try to initialize the socket IO pool,
		the second one waits until the intialization is finished
		instead of continuing right away.
		-Add checks for domain unload: no items added in this case.
		-Only measure the time every 10 elements added to the queue.
		This is an experiment since linux x86 gettimeofday() sucks.
		-Create new thread if there are none waiting for work items.
		-There was a missing decrement of the busy threads.
		-Make sure the local queue is cleaned up before exiting the
		thread when the program ends.

2010-04-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_type_get_object): Normalize generics types
	as to how managed code expect them to be. A generic instance over
	the GTD arguments must have the same mirror as the GTD itself.

	Fixes #473289.

2010-04-19  Zoltan Varga  <vargaz@gmail.com>

	* locales.c: Implement support for DISABLE_NORMALIZATION.

2010-04-16  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_native_func_wrapper): Set the marshal info to NULL,
	since it is not a MonoMethod.

2010-04-16  Sebastien Pouliot  <sebastien@ximian.com>

	* icall-def.h: Add get_RequiresElevatedPermissions icall to
	System.Security.SecurityManager - used only by Moonlight
	* security-core-clr.c|h: Add Elevated Trust/Permission support
	for CoreCLR / Moonlight

2010-04-16  Zoltan Varga  <vargaz@gmail.com>

	* boehm-gc.c (mono_gc_base_init): Applied patch from Robert Nagy
	(robert@openbsd.org). Fix GC_stackbottom calculation on OpenBSD.

2010-04-16  Marek Habersack  <mhabersack@novell.com>

	* mono-perfcounters.c: added code for the "Mono
	Memory/Total Physical Memory" performance counter.

	* mono-perfcounters-def.h: added definition of the "Mono
	Memory/Total Physical Memory" performance counter.

2010-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_get_method_by_index): Return NULL
	on type load failures.

2010-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_from_typeref): Check if the supplied
	image has an assembly bound to it.

	Fixes #567884.

2010-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_get_signature_full): Use new function
	inflate_generic_signature_checked to check for errors.

	Fixes #560839.

2010-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (inflate_generic_signature): Add _checked variant
	and move this function to use it.

2010-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_vtable_general): Use error checking
	version of mono_class_inflate_generic_method_full.

	Fixes #596975.

2010-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_inflate_generic_type_no_copy): Do proper
	error handling passing MonoError around.

	Fixes #560336.

2010-04-14 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: make GetHostByName ("") work on windows.
	Fixes bug #456723.

2010-04-14 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* object-internals.h:
	* threads.c: use a spin lock when accesing the per-thread appdomain
	list.

2010-04-14 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threads.c: no need to take the threads lock in push/pop appdomain.

2010-04-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (_mono_reflection_parse_type): MS supports
	non-assembly-qualified types in a generic type parameter list
	when enclosed in '[]' (which signals that they should be a fqn).

	This breaks ECMA specs for how type names are encoded in cattr
	blobs but F# does it.

	Fixes #576342.

2010-04-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_InternalInvoke): Check if the vtable is sane
	for instance methods/ctors.

	Fixes #422113.

2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Use the new verifier support for checking
	custom attributes.

	Fixes #595306.

2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Implement structural verification
	of custom attributes. This check requires access to the
	loader since to resolve the size of an enum we have to
	look it up.
	We don't check if named argumenments are encoded in a
	compatible fashion to their underlying field/prop.
	Maybe we should?

	* verify-internals.h: Add two new cattr verification API.

2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (decode_signature_header): Fix signature.

2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_verifier_is_enabled_for_method): Handle
	assembly less images.

	* verify.c (mono_verifier_is_class_full_trust): Ditto.

2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_signature_checked): Properly
	init MonoError.

	* loader.c (mono_method_signature): It's the calee
	resposibility to init the error object.

2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (decode_signature_header): Do proper
	overflow checking.

Tue Apr 13 12:36:29 CEST 2010 Paolo Molaro <lupus@ximian.com>

	* reflection.c: maintain the invariants required by
	mono_class_layout_fields() also in typebuilder_setup_fields ().

2010-04-11  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Call mono_class_setup_methods in 
	get_default_ctor before checking klass->methods. Fix typo in
	comment

2010-04-10  Jb Evain  <jbevain@novell.com>

	* domain.c (supported_runtimes): remove .net 4.0 beta 2 and
	add .net 4.0 RTM version.

2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (resolve_object): Properly inflate generic
	methods when a context is supplied.

	Fixes #591226.

2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): A switch op don't empty
	the stack for the next one. Fixes a bug when running fsi
	under --verify-all.

2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_standalonesig_blob): Accept
	fields as valid standalone sig too. F# does generate them.

	* metadata-verify.c (verify_typedef_table_full): Ignore
	what <module> extends.

2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): It's ok to do use call with
	virtual, non-final methods if their class is sealed.

2010-04-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_MonoField_GetValueInternal): This function
	is a near identical copy of mono_field_get_value_object. So simply
	call it.

	* object.c (mono_field_get_value_object): Handle literal fields
	on open generic classes.

	Fixes #594942.

2010-04-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_create_runtime_class): Setup
	parent/supertype information again since it can be changed
	without notice.

2010-04-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_type_compatibility_full): Properly handle
	stores between arrays of primitives.

	Fixes the verifier side of #555950.

2010-04-07 Rodrigo Kumpera  <rkumpera@novell.com>

	class.c (mono_bounded_array_class_get): Properly init
	cast_class to take the fact that uint[] and int[] can be
	casted between each other.

	Fixes #555950.

2010-04-07  Geoff Norton  <gnorton@novell.com>

	* domain.c: Avoid a deadlock on osx.  Fixes #565765

2010-04-08  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Enum_ToObject): Avoid a crash for unfinished type
	builders. Fixes #594464.

2010-04-08  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Environment_Exit): Shutdown the threadpool before
	waiting for all threads to suspend, as those threads can't be suspended.

2010-04-08  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_suspend_all_other_threads): Call ensure_synch_cs_set ()
	to avoid crashes on newly created threads.

2010-04-07 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* file-io.c: reset the MonoIOStat structure in case of error.
	Fixes bug #582667.

2010-04-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (print_implemented_interfaces): Print proper type name.

	* class.c (mono_class_setup_vtable): Don't try that hard to produce
	the override map for generic instances since it later ignored.

	* class.c (mono_class_implement_interface_slow): Don't break for
	dynamic generic instances.

	* object.c (mono_runtime_invoke_array): Add an assert for allocation.

	* reflection.c (mono_reflection_method_get_handle): New method that
	resolves a method handle.

	* reflection.c (mono_reflection_get_dynamic_overrides): Handle the
	case when we override methods from a dynamic generic instance interface.

	Fixes #575941.

2010-04-05 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: don't attempt to close the pipe when it has not been
	created.

2010-04-05 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: if there are no waiting threads, try to start a new
	one. This fixes the not-so-random hangs in System.ServiceModel tests.
	No need to use InterlockedCompareExchange to read volatile variables.

2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_type_compatibility_full): Fail mixed valuetype
	and reference types that point to the same class.

	Fixes #565598.

2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_stack_type_compatibility_full): Ignore constraints
	when verifying compatibility between a generic instance and a generic
	parameter.

	* verify.c (check_is_valid_type_for_field_ops): Improve error message.

	* verify.c (stack_slot_stack_type_full_name): Improve verification type
	name.

	Fixes #587849.

2010-04-04  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Remove superfluous scanning of alloc-pinned objects.

2010-04-04  Zoltan Varga  <vargaz@gmail.com>

	* threads.c Applied some openbsd changes from Robert Nagy <robert@openbsd.org>.

2010-04-03  Marek Habersack  <mhabersack@novell.com>

	* process.c: when cross-compiling with MinGW, force GetProcessId
	lookup using GetProcAddress.

2010-04-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: parse_environment_string_extract_number() must be
	static.

2010-04-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-gray.c: Macros for gray_object_enqueue() and
	gray_object_dequeue(), to make sure they're inlined.

2010-04-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-gray.c: Fix a few debug levels, put a few
	asserts in inner loops into DEBUG and lower MAX_DEBUG_LEVEL.

2010-04-02  Jb Evain  <jbevain@novell.com>

	* exception.c: remove dead code.

2010-04-02  Zoltan Varga  <vargaz@gmail.com>

	* *-gc.c: Fix the signature of mono_gc_get_used/heap_size () to be consistent
	with mono-gc.h.

2010-04-01  Sanjoy Das <sanjoy@playingwithpointers.com>

	* sgen-gc.c: Make the nursery size adjustable by the
	MONO_GC_PARAMS environment variable.

	Code is contributed under MIT/X11 license.

2010-04-01 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: threadpool threads wait is alertable.
	Fixes bug #592964.
	Reduced the stack size of the *poll_wait thread.

2010-04-01  Sebastien Pouliot  <sebastien@ximian.com>

	* exception.c|metadata-internals.h: Add new mono_get_exception_
	field_access_msg and mono_get_exception_method_access_msg 
	functions that accept a const char* parameter to provide more 
	details when the exception is thrown.
	* security-core-clr.c|h: Rework code to allow logging exceptions
	(export MONO_LOG_MASK="security") and to supply more details in
	[TypeLoad|MethodAccess|FieldAccess]Exception thrown. Also added
	mono_security_core_clr_is_field_access_allowed and 
	mono_security_core_clr_is_call_allowed to return an exception,
	with messages and logging, that can be emitted by method-to-ir.c

2010-04-01  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-pinning-stats.c: In the heap-dump, dump each
	pinned object.

2010-04-01  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (mono_domain_assembly_postload_search): Avoid a crash/assert if
	the assembly name is not well formed utf8. Fixes #567882.

2010-04-01  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_create_generic_class): Set the flags field of
	the generic parameters from the builder. Fixes #473298.

2010-03-31  Miguel de Icaza  <miguel@novell.com>

	* object.c (mono_class_proxy_vtable): Eliminate warning. 

	* marshal.c (emit_marshal_boolean): Eliminate possible
	uninitialized local warning. 

2010-03-30  Sebastien Pouliot  <sebastien@ximian.com>

	* class.c (mono_class_init): Postpone coreclr inheritance check
	until the end of the initialization (so we can check up the 
	default ctor manually for the core-clr inheritance rules).
	* security-core-clr.c: Add the missing (undocumented) checks on
	default constructors when verifying inheritance rules.

2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* domain-internals.h (MonoJitExceptionInfo): Add new field
	handler_end to the data union. To be used to point the end
	of a finally block.

2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Add support for new v4 type
	System.Reflection.MonoModule that is the concrete version
	of Module which is abstract unver v4.

2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_init): Don't set class failure after
	inited = 1 is set. It must be done before.

2010-03-30  Andreas Färber  <andreas.faerber@web.de>

	* mono-config.c: Add support for OS "haiku"
	* ChangeLog: Fix UTF-8 encoding

	Code is contributed under MIT/X11 license.

Tue Mar 30 15:53:06 CEST 2010 Paolo Molaro <lupus@ximian.com>

	* console-unix.c: fixed include logic for sys/ioctl.h.

2010-03-30  Mark Probst  <mark.probst@gmail.com>

	* threads.c: Fix bitmap generation for TLS marking on 64 bit
	systems.

2010-03-30  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Enum_get_underlying_type): Don't crash on
	unfinished/broken typebuilders.

2010-03-29  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Use the same heuristic for the LOS target that we use
	for the minor section allowance.

2010-03-29  Raja R Harinath  <harinath@hurrynot.org>

	* metadata-verify.c (INVALID_METHOD_IMPLFLAG_BITS): Allow bit 6
	"NoOptimization".

2010-03-29  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Count bytes allocated with heavy statistics.

2010-03-29  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: More detailed time statistics.

Mon Mar 29 11:52:34 CEST 2010 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, sgen-gc.c, threads.c, utils/mono-hash.c:
	fix the user defined mark interface to pass a pointer
	to the object location and not the object itself.

2010-03-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_method_body_get_object): Release
	the method header before the call to CACHE_OBJECT since
	this is a macro that returns.

2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (inflate_generic_type): mono_metadata_type_dup
	already dupes array information, the g_memdup was just
	leaking memory.

2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Add stack_peek function. Fix CEE_DUP
	to not read from invalid memory if push did expand
	the stack.

2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Remove old table verification code that has
	been superseeded by the new metadata verifier.

	* verify.h: Remove mono_image_verify_tables from the public
	API.

	* pedump.c: Fix for removed bits.

2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Allocate stack slows lazily to reduce stack usage
	in case of methods with huge stacks. Reduces memory consumption
	for mcs yyparse from 459Mb to 1.8Mb.

2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: don't try executing items from domains being
	unloaded. Fixes appdomain-async-invoke test.

2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: spin while the threadpool initializes.
	* mono-wsq.c: if the WSQ has not been initialized or has been shut
	down, don't do anything.

2010-03-26  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_create_internal): Set the GC type of the
	threads_starting_up hash table.

2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: reset 'state' to avoid returning non-null when the
	event type is not found.

Fri Mar 26 19:03:09 CET 2010 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: make copy_object () take the address of the
	slot holding the reference. This allows saving memory stores
	when not needed and it allows keeping track of oldspace->nursery
	references for the card table code.

2010-03-26  Andreas Färber  <andreas.faerber@web.de>

	* null-gc.c (mono_gc_invoke_with_gc_lock): Fix function name.

	Code is contributed under MIT/X11 license.

Fri Mar 26 11:33:17 CET 2010 Paolo Molaro <lupus@ximian.com>

	* object.c, threads.c, threads-types.h, threads.h: make the
	managed thread local storage references precisely tracked.

2010-03-25 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.[ch]: reworked the threadpool:
		-Threadpool threads use a work-stealing queue. Adding a work
		item from a threadpool thread will queue it in the thread
		local queue without locking (in most cases).
		-epoll events are coalesced before being added to the IO
		queue.
		-Dynamically change the number of active threads
		-Changed the global queue to be more GC friendly

	* class-internals.h: add 2 new performance counters for the number of
	threads in the threadpool and the IO threadpool.

	* object-internals.h: new field in MonoAsyncResult.
	* icall-def.h: new internal call for queueing work items.

	* Makefile.am: add 2 new files.

	* appdomain.c: bump up corlib version.

	* mono-wsq.[ch]: an implementation of a work-stealing queue.

	* mono-perfcounters-def.h:
	* mono-perfcounters.c: added 2 new performance counters.

2010-03-26  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: More FIXME/TODO updates.

2010-03-25  Mark Probst  <mark.probst@gmail.com>

	* gc-internal.h, sgen-gc.c, sgen-gc.h, boehm-gc.c, null-gc.c: New
	function mono_gc_invoke_with_gc_lock() which invokes a function
	with the guarantee that no collection will occur during its execution.

2010-03-25  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Update a few comments.

2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Add support for new v4 type
	System.Reflection.MonoAssembly that is the concrete version
	of Assembly which is abstract unver v4.

2010-03-24  U-anarquia\miguel  <miguel@anarquia>

	* reflection.c (mono_reflection_get_custom_attrs_info): Protect
	code that uses System.Reflection.Emit in DISABLE_REFLECTION_EMIT.

	Expose a few macros that are needed for SR but not SRE to the
	world (previous inside the SRE ifdef)

2010-03-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (gc_register_current_thread): We need
	stack_start_limit as well in the non-attribute pthread case.

2010-03-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* threads.c: Fix windows build.

2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* thread-types.h: Add mono_thread_resume_interruption.

	* threads.c: Add mono_thread_resume_interruption, this
	function should be called after the last protected handler
	found at interruption time has finished.

2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* threads.c (ves_icall_System_Threading_Thread_ResetAbort):
	Check MonoInternalThread's ::state instead of ::abort_exc
	since the later can be lazily created.

	This is specially problematic when running a finally block
	under AbortRequested state. ResetAbort must work, but the
	abort_exc object has not been created because interruption
	has not began.

2010-03-22  Geoff Norton  <gnorton@novell.com>

	* locales.c: Its possible for CFStringGetCStringPtr
	to return null and not convert encodings.  Use
	CFStringGetCString instead.

Mon Mar 22 18:06:38 CET 2010 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, class.c, object.c: introduce compressed
	interface bitmaps (for now only under small config): this saves
	about 600 KB of runtime memory on gmcs bootstraps or monodevelop
	startups.

Mon Mar 22 16:03:34 CET 2010 Paolo Molaro <lupus@ximian.com>

	* mono-debug.c: don't try to get the method header, it causes a
	deadlock and it is not used for anything anymore.

2010-03-22  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_get_marshal_info): Fix the handling of dynamic methods
	broken by the last change.

2010-03-21  Andreas Färber  <andreas.faerber@web.de>

	* socket-io.c: Don't depend on AF_SNA, AF_DECnet,
	SOCK_RDM.
	
	Code is contributed under MIT/X11 license.

2010-03-20  Sanjoy Das <sanjoy@playingwithpointers.com>

	* sgen-gc.c (mono_gc_get_write_barrier): Handle non-aligned
	nursery.

	Code is contributed under MIT/X11 license.

2010-03-19  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (MonoDebugWrapperData): Replace `cil_code' with a
	dummy field, containing an empty string.
	(mono_debug_add_method): Don't call mono_disasm_code() for wrappers.


Fri Mar 19 17:26:43 CET 2010 Paolo Molaro <lupus@ximian.com>

	* class.c: setup_interface_offsets() refactor to not call
	mono_class_get_implemented_interfaces () more times than needed and
	to reduce the runtime memory requirements to be O(num_interfaces)
	instead of O(max_interface_id).

2010-03-18 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* mono-mlist.[ch]: add mono_mlist_set_next ().

2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* domain-internals.h: Add MonoTryBlockHoleJitInfo struct and
	associated changes to support holes in the protected range of a
	try block.

	* domain.c: Add mono_jit_info_get_try_block_hole_table_info, which
	retrieves the holes table from a given MonoJitInfo.

Tue Mar 16 13:11:15 CET 2010 Paolo Molaro <lupus@ximian.com>

	* object.h, object-internals.h, object.c, icall.c, gc-internal.h,
	debug-helpers.c, cominterop.c, process.c, sgen-gc.c, socket-io.c:
	hide the contents of the MonoString and MonoArray structs from the
	public API. Change the accessor macros to accessors functions where
	needed. Adjusted the array API to allow for pointer-sized lengths and
	starting positions, so 64 bit arrays can be optionally provided in an
	API compatible way if needed on 64 bit systems.

Tue Mar 16 10:18:07 CET 2010 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, class.c, loader.c, marshal.c, metadata.c,
	reflection.c: the MonoMethodNormal struct is now unused, so remove it.

Mon Mar 15 18:28:00 CET 2010 Paolo Molaro <lupus@ximian.com>

	* class-internals.h: remove the method header from MonoMethod since
	from now on it will be transient. We have a header pointer for method
	wrappers, since in that case we need to keep track of it. For this
	reason, all the Reflection.Emit generated methods use MonoMethodWrapper
	structs now. The same happens with MonoMethodInflated.
	* class.c: reset the sre_method flag for inflated method structures:
	this makes the code that cares look at the header in the MonoMethodInflated
	structure.
	* loader.c: lookup the method header in the appropriate field now that
	it is removed from MonoMethod.
	* metadata-internals.h: add a flag to the method header to know if it
	can be freed inside mono_metadata_free_mh ().
	* method-builder.c: updates after moving the header field from
	MonoMethod to MonoMethodWrapper.
	* reflection.c: MonoMethods generated from Reflection.Emit use
	MonoMethodWrapper structs if they need a method header now (later take
	advantage of this and remove all the current unsafe uses of method_aux_hash).
	* metadata.c: make method header parsing not leak when verification
	fails. Alloc it with g_malloc() and free it in mono_metadata_free_mh().
	These changes save a few hundred KB of runtime memory in a mcs
	bootstrap or a monodevelop startup.

2010-03-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Improve error message.

2010-03-12  Jb Evain  <jbevain@novell.com>

	* reflection.c (add_exported_type): populate the exported
	table with the type's nested type.

2010-03-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (STRING_SIZE): Semi-revert r153342.  I'm an idiot who
	can't read parentheses.

2010-03-10  Mark Probst  <mark.probst@gmail.com>

	* threads.c (thread_cleanup): Add a guard to dereferencing
	"thread" to avoid an unlikely race condition.

2010-03-09  Sebastien Pouliot  <sebastien@ximian.com>

	* assembly.c: Fix crash in moon-unit when aname->culture is NULL
	instead of an empty string.

2010-03-09  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h (_G_BOOLEAN_EXPR): Fix the definition of this to explicitly
	convert to a boolean, recent gcc versions compile this differently.

2010-03-09  Zoltan Varga  <vargaz@gmail.com>

       * sgen-gc.c (safe_object_get_size): Avoid a function call so this can really be
       inlined.

2010-03-09  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (STRING_SIZE): Off by one.

2010-03-09  Mark Probst  <mark.probst@gmail.com>

	* sgen-archdep.h: Fix the signal context register access for
	AMD64.

2010-03-09  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gray.c: Get rid of the unused 'start' field in GrayQueueSection.

2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Store the initial basic block returned by mono_basic_block_split
	so we can release the whole list and not just the first one.

Mon Mar 8 17:30:44 CET 2010 Paolo Molaro <lupus@ximian.com>

	* verify.c, debug-helpers.c, profiler.c, loader.c,
	mono-basic-block.c, mono-debug.c, reflection.c: prepare to make
	MonoMethodHeader a transient entity.

2010-03-08  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (scan_needed_big_objects): Call drain_gray_stack () to avoid
	uncontrolled growth of the gray stack.

	* sgen-gray.c: Rewrite this so it behaves like a stack, not a queue, so recently
	added items are removed first, improving cache locality. Avoid freeing queue
	segments in the fast path, use the list of segments as the free list, truncate
	it to its max size at the start of collection.

Mon Mar 8 10:13:52 CET 2010 Paolo Molaro <lupus@ximian.com>

	* metadata-internals.h: more memory savings, both with small config and without.


Sat Mar 6 19:12:12 CET 2010 Paolo Molaro <lupus@ximian.com>

	* appdomain.c, domain-internals.h, domain.c, object.c:
	make class_vtable_hash into an array to reduce memory usage.

Sat Mar 6 18:16:35 CET 2010 Paolo Molaro <lupus@ximian.com>

	* mempool.c, class-internals.h, class.c, icall.c, metadata.c,
	object-internals.h, object.c, reflection.c, threadpool.c:
	reduce resource usage when the small config is selected.
	In particular, up to 64K of methods/fields/properties/events
	are allowed and "other" methods in events are ignored.

Fri Mar 5 19:05:47 CET 2010 Paolo Molaro <lupus@ximian.com>

	* threads.c: reduce resource usage when compiled for a small config.

2010-03-05  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Also collect number of degraded-alloced objects with
	heavy statistics.

2010-03-04  Geoff Norton  <gnorton@novell.com>

	* assembly.c: Only support OSX bundling if the bundle is 
	actually detectable.

2010-03-04  Geoff Norton  <gnorton@novell.com>

	* loader.c: The marshal specs are freed at the end of the call
	but it explicitly frees the strings as well as the container,
	so we need to dup them too to avoid referencing free'd memory.

2010-03-04  Geoff Norton  <gnorton@novell.com>

	* icall-def.h:
	* icall.c: Add a new private internal icall to construct
	an object from its type without running the ctor.

Thu Mar 4 15:37:09 CET 2010 Paolo Molaro <lupus@ximian.com>

	* profiler.c: allow multiple profiler engines to be loaded
	at the same time.

Wed Mar 3 20:19:45 CET 2010 Paolo Molaro <lupus@ximian.com>

	* profiler-private.h, profiler.c, profiler.h, sgen-gc.c: introduce
	profiler event to track object moves.

Wed Mar 3 19:20:39 CET 2010 Paolo Molaro <lupus@ximian.com>

	* object.c, profiler.c, profiler.h, string-icalls.c:
	remove the reduntant MONO_PROFILE_STRING_ALLOC profiler event.

2010-03-03  Miguel de Icaza  <miguel@novell.com>

	* decimal.c (mono_double2decimal): Add support for reducing the
	scale of a decimal.  It turns the 0.6000000000000 into 0.6 as
	expected.

2010-03-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h:
	* icall.c: Implement System.MonoType::get_core_clr_security_level icall.

2010-03-03  Marek Habersack  <mhabersack@novell.com>

	* mono-config.c (mono_config_parse_assembly_bindings): added -
	parses assembly binding redirections from appdomain's config
	file.

	* metadata-internals.h: added definition of a new function -
	mono_config_parse_assembly_bindings - to support parsing assembly
	binding redirections defined in appdomain's config file.

	* domain-internals.h: added two new fields to _MonoDomain - a list
	of assembly bindings and a flag to parse the config file only
	once.

	* assembly.c (assembly_binding_maps_name): empty culture name and
	NULL culture name are considered equal.
	(mono_assembly_apply_binding): added support for domain specific
	assembly binding redirections, read from the appdomain's
	configuration file. Fixes bug #580185

Wed Mar 3 11:46:06 CET 2010 Paolo Molaro <lupus@ximian.com>

	* appdomain.c, domain.c, icall.c, image.c, marshal.c, object.c,
	reflection.c, socket-io.c, threadpool.c, threads.c: removed 1.1/1.0
	support.

2010-03-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_memberref_token): Extract mono_image_add_memberef_row
	from this function. The new function receive the parent token instead of a type.

	* reflection.c (mono_image_get_methodref_token_for_methodbuilder):
	* reflection.c (mono_image_get_ctorbuilder_token): Use new function to encode
	typebuilders. This make it possible to properly encode generic type builders since
	their unmanaged type don't have generics data while unfinished.

	Fixes #583655.

2010-03-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-protocol.c, sgen-protocol.h: New facility for
	writing binary log files (can be enabled by #define'ing
	BINARY_PROTOCOL) for better debugging of timing-dependent bugs or
	bugs in longer running programs.

Mon Mar 1 19:35:32 CET 2010 Paolo Molaro <lupus@ximian.com>

	* metadata.c: added some API documentation.

2010-03-01  Robert Jordan  <robertj@gmx.net>

	* filewatcher.h: Include glib.h to fix the MSVC build.

2010-03-01  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h (MonoClass): Get rid of the reflection_info field, add
	a GC handle instead. This is a bit slower to access, but avoids burdening the
	GC with 100s of individual roots.

	* reflection.c (mono_class_get_ref_info):
	(mono_class_set_ref_info):
	(mono_class_free_ref_info): New internal helper fuctions.

	* reflection.c appdomain.c icall.c class.c: Use the new helper functions instead
	of accessing klass->reflection_info directly.

	* sgen-gc.c (alloc_complex_descriptor): Fix the computation of the number of
	words.

	* gc.c (alloc_handle): Create a GC descriptor for the 'entries' array, free
	the previous array.

2010-02-28  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (get_runtime_invoke_type): Avoid sharing byref with I, as the latter
	needs an indirection.

2010-02-26  Zoltan Varga  <vargaz@gmail.com>

	* generic-sharing.c: Removed, moved its contents to mini/mini-generic-sharing.c,
	so all generic sharing code is in one place.

	* class.c (get_implicit_generic_array_interfaces): Fix the last change so
	we don't call setup_interface_offsets () for unfinished types.

2010-02-26  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Move this to
	generic-sharing.c.

	* image.c: Add an unload hook which is called before an image is unloaded.

	* generic-sharing.c: Use the unload hook to unregister per-image data, to avoid
	metadata.c having to depend on generic sharing.

Fri Feb 26 19:23:18 CET 2010 Paolo Molaro <lupus@ximian.com>

	* class.c: reduce size of ridiculously large cache.

2010-02-26  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(MONO_DEBUGGER_MINOR_VERSION): Bump to 5.

	* threads.c (mono_thread_internal_reset_abort): New method; resets
	the abort, but doesn't throw any exception if no abort was requested.

2010-02-26  Zoltan Varga  <vargaz@gmail.com>

	* class.c (get_implicit_generic_array_interfaces): Call
	mono_class_setup_interface_offsets () before accessing
	eclass->interface_offsets_count. This only shows up on platforms without IMT for
	some reason.

Thu Feb 25 12:12:44 CET 2010 Paolo Molaro <lupus@ximian.com>

	* environment.c, environment.h, icall.c: make the GetOSVersionString()
	icall internal.

Thu Feb 25 11:37:50 CET 2010 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h: make MONO_TYPE_IS* functional without
	direct access to the MonoType fields.

2010-02-25  Zoltan Varga  <vargaz@gmail.com>

	* threads.h: Move some internal functions which were added to this header by
	mistake to threads-types.h.

	* class.c (mono_class_init): Get rid of mono_setup_vtable_in_class_init.

Wed Feb 24 17:45:27 CET 2010 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, class.h, object.h: make MonoRemoteClass
	and mono_remote_class() internal.

Wed Feb 24 17:05:18 CET 2010 Paolo Molaro <lupus@ximian.com>

	* metadata-internals.h, class-internals.h, metadata.h: make the
	MonoType guts internal as well.

Wed Feb 24 16:02:42 CET 2010 Paolo Molaro <lupus@ximian.com>

	* reflection.h: the MonoTypeNameParse guts are internal now.
	* assembly.c, assembly.h, image.h: the MonoAssemblyName guts
	are internal now, provide accessors as needed.
	* metadata.h, metadata-internals.h: the MonoMethodSignature
	guts are internal now.
	* Makefile.am: mempool.h is an internal header now.
	* *.h, *.c: remove glib.h usage from the public headers.

2010-02-24  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c: Add mono_method_get_header_summary which returns minimal
	information about the header of a method. This is the information used
	by the inline oracle to reject methods.

	This method doesn't decode local variables and doesn't cache it's result,
	so it should cause a minimal reduction in memory usage.

	* metadata-internals.h: Add MonoMethodHeaderSummary structure and
	mono_method_get_header_summary.

2010-02-22  Jeffrey Stedfast  <fejj@novell.com>

	* threads.c (mono_thread_exit): Make sure that the main thread is
	non-null before dereferencing it.

2010-02-21  Geoff Norton  <gnorton@novell.com>

	* Makefile.am: Add CoreFoundation linkage on darwin to properly get the current
	locale.
	* locaes.c: When running on darwin, try to get the local from CoreFoundation 
	before falling back to the posix lookup.

2010-02-19  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_suspend_all_other_threads): Ignore threads which have
	the DONT_MANAGE flag set.

2010-02-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* domain.c: Remove old v1 version strings. Let the runtime
	default to 2.0 instead of failing because it can't find a
	working 1.0 instalation.

2010-02-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* domain.c: Add v4 RC version string.

2010-02-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* mono-basic-block.c (mono_opcode_value_and_size): Use pointer variant
	of overflow checking function.

2010-02-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_method_on_tb_inst_get_handle): Handle non
	generic methods.

	* reflection.c (mono_reflection_get_custom_attrs_info): Handle compiler context
	cases for ParameterInfo.

	Fixes #579493.

2010-02-18  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_cctor): Fix support for dynamic classes, which doesn't
	have has_cctor set. Fixes #575946.

2010-02-16 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: display a warning if the parsing the config file
	produces any error.
	Skip the BOM in UTF-8 files.
	Copy the AppDomainSetup before setting the privateBinPath so that the
	correct configuration file is read.

2010-02-15  Zoltan Varga  <vargaz@gmail.com>

	* object.c: Instead of using one vtable trampoline, allow the JIT to use one
	vtable trampoline per vtable slot index. Not used yet.

2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* icall-def.h:
	* icall.c: add internal call that returns the system page size.

2010-02-13  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (mono_method_desc_search_in_image): Handle short names like
	'int' for system classes.

Fri Feb 12 18:36:02 CET 2010 Paolo Molaro <lupus@ximian.com>

	* icall.c, icall-def.h: new icall to check for sufficient
	stack space.

2010-02-12  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (ensure_complete_type): Check that reflection_info
	is set, too.  Fixes crash of corlib testsuite with -O=-all.

2010-02-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* attrdefs.h:
	* tabledefs.h: Add NoOptimization flag.

2010-02-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Don't consider it a missing remset if the target
	object is pinned - we might have done the store but not added the
	remset yet.

2010-02-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: When checking for missing remsets, don't assert on
	the first one, but print them all and then assert.

2010-02-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (find_in_remset_loc): Handle the small bitmap case.

2010-02-09  Miguel de Icaza  <miguel@novell.com>

	* console-unix.c: On OSX Control-Y is assigned to
	VDSUSP (non-Posix), the
	suspend-program-next-time-it-tries-to-read-input command (this is
	different than C-z, which suspends immediately).

	Do the same thing that bash does and ignore this setting,
	making our repl/getline support pasting.

2010-02-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Simple plausibility check for scan_starts.

2010-02-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Round up when calculating the number of scan starts.

2010-02-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Export mono_get_object_from_blob.

	* object-internals.h: Ditto.

	* icall.c: New icall property_info_get_default_value to get the default
	value of a property. Since using this is not common, no caching is done.

	* icall-def.h: Add new icall.

2010-02-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Add mono_class_get_property_default_value.

	* class-internal.h: Export mono_class_get_property_default_value.

2010-02-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_property_info): Encode the default value of a property.

Wed Feb 10 14:48:45 CET 2010 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: introduced critical regions to allow some lockless
	operations and increase scalability.

2010-02-10  Geoff Norton  <gnorton@novell.com>

	* reflection.c: Support building with DISABLE_REFLECTION

2010-02-09 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: Fixes for SetMinThreads and SetMaxThreads.
	Closes bug #566057.

	* exception.c: fix typo in comment.

2010-02-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (param_info_get_type_modifiers): Handle the case when the member object is a
	property. This happens which instances returned by PropertyInfo::GetIndexParameters ().

	* reflection.c (mono_reflection_get_custom_attrs_info): Ditto.

	* object-internals.h: Export mono_class_is_reflection_method_or_constructor as part of
	the internal API.

	Fixes #574434.

2010-02-09  Mark Probst  <mark.probst@gmail.com>

	* threads.c: Removed two assertions that were too strict.  Added a
	clarifying comment.  Fixes #577090.

2010-02-08  Zoltan Varga  <vargaz@gmail.com>

	* domain.c (mono_jit_info_table_find): Avoid looking in the root domain, since
	the caller has no way of knowing the domain which owns the returned MonoJitInfo.

	* appdomain.c (create_exceptions): Call mono_thread_push/popappdomain_ref ().

	* verify.c (mono_type_get_stack_name): Fix a warning.

2010-02-07  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_wrapper_info): Rename from
	mono_marshal_wrapper_info_from_wrapper.

	* marshal.c (mono_marshal_set_wrapper_info): Rename from
	mono_marshal_method_set_wrapper_data, and export.

	* boehm-gc.c sgen-gc.c null-gc.c: Get rid of mono_gc_get_allocator_type, store
	the allocator type in a AllocatorWrapperInfo structure instead, which is accesible
	by calling mono_marshal_get_wrapper_info ().

	* sgen-gc.c (mono_gc_get_managed_allocator): Add a specialized allocator for
	small objects which does no size checks.

2010-02-05  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h: Rename get_MetadataToken to GetMetadataToken.

2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Use the new basic block formation pass
	to avoid verifying dead basic blocks. This is the same behavior as the
	runtime MS verifier.

2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* mono-basic-block.c:
	* mono-basic-block.h: New implementation of a basic block formation pass.
	The formation pass does static liveness analysis as well to detect dead
	basic blocks.

2010-02-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_native_wrapper): Emit a null check for the
	'this' argument in icalls.

2010-02-02  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (resolve_object): Handle MonoArrayMethod. Fixes #575955.

2010-02-01  Mark Probst  <mark.probst@gmail.com>

	* object.c, domain.c: When using SGen, we must register
	vtable->type as a root if it's not a MonoType, because then it
	wasn't pin-alloced.

2010-02-01  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Reset to_space_bumper to to_space_section->next_data
	at the start of nursery collections, because we might have had
	degraded allocations which changed next_data.

2010-01-30  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_managed_wrapper): Avoid constructing the
	custom attr so this function works in cross-compiling mode.

2010-01-29  Zoltan Varga  <vargaz@gmail.com>

	* class.c (make_generic_param_class): Initialize interface offsets since we
	set klass->inited. Fixes #574819.

2010-01-28  Zoltan Varga  <vargaz@gmail.com>

	* domain.c (mono_domain_free): Send the END_UNLOAD profiler event before
	calling the JIT domain cleanup hook.

2010-01-28  Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (main): Properly set the verifier mode when running the metadata
	verifier.

2010-01-28  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_class_for_overlapping_reference_fields): Properly verify
	overlapping fields now that we're called before has_references is set.

	* pedump.c (dump_verify_info): Clear any loader error before verifying another
	method. Otherwise all sort of weird stuff happens.

2010-01-27  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_field_get_value_object): Handle nullable types correctly.
	Fixes #572874.

2010-01-25  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Array_SetValueImpl): Handle nullable types correctly.
	Fixes #573322.

2010-01-23  Mark Probst  <mark.probst@gmail.com>

	* sgen-pinning.c (evacuate_pin_staging_area): Don't assume
	pin_staging_area_index is greater than 0.

2010-01-22 Miguel de Icaza (miguel@novell.com)

	* loader.c: Since we do nothing with the error returned, pass NULL
	to ignore the error.

2010-01-21  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (typebuilder_setup_fields): Pretend field setup already
	happened before starting to encode the actual fields. This avoid ciclic
	dependencies and eventual crashes.

	Fixes #572660.

2010-01-21  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, gc-internal.h, object.c: Make string allocation
	atomic and remove the half-constructed hack in SGen.

2010-01-21  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_generic_inst): Fail a type signature if it 
	has a recursive reference to itself.

	Fixes #571863.

2010-01-21  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_signature): Fix error message.

2010-01-21  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Reuse to-space sections between nursery collections.

2010-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* icall.c: don't raise AppDomain.TypeResolve when the type is loaded
	from the current assembly or mscorlib. Fixes bug #322957.

2010-01-20  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Calculate the target class of the delegete invoke wrappers using
	get_wrapper_target_class.

2010-01-19  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Fix warnings.

2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (store_local): Better error message.

2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_object_get_virtual_method): Handle generic interfaces with variant
	arguments.

2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Remoting_RemotingServices_GetVirtualMethod): This
	function is generics variance aware.

2010-01-19  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c (mono_security_core_clr_can_access_internals):
	Handle the case where 'basedir' can be NULL (e.g. SRE assemblies)

2010-01-19  Sylvain Dupont <duposyl@gmail.com>

	* cominterop.c marshal.c: Added support for marshalling in, in/byref,
	  in/out, in/out/byref parameters of type SAFEARRAY[VARIANT].

	Code is contributed under MIT/X11 license.

2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Handle inflated generic methods
	on a GTD.

2010-01-19  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_wrapper_info_from_wrapper): New helper function to
	return a point to a wrapper specific info structure describing the wrapper.
	(mono_marshal_get_array_address): Store the rank+elem_size in the wrapper info.
 
2010-01-18  Mark Probst  <mark.probst@gmail.com>
 
	* sgen-gc.c: Make minor collection section allowance adaptive,
	depending on the amount of memory reclaimed in the last major
	collection.  If more memory was reclaimed (i.e. more garbage
	produced), do the next collection earlier.

2010-01-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_type): Fail a type signature if it has a recursive reference
	to itself.

	* metadata-verify.c (mono_verifier_verify_typespec_signature): Change signature to take
	the token as parameter.

	* verify-internals.h: Ditto.

	* metadata.c (mono_type_create_from_typespec): Pass token to verifier.

	Fixes #571460.

2010-01-18  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Make store_remset_buffer_index long.

2010-01-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_from_typeref): Fail loading of self-referencing typeref tokens.

	Fixes #569579.

2010-01-18  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (mono_gc_base_init): Add 'conservative_stack_mark' option to turn
	off precise marking if it is available.
	(mono_gc_get_bitmap_for_descr): Fix the handling of run length descriptors.

2010-01-17  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (mono_gc_conservatively_scan_area): Resurrect this.

	* sgen-pinning.c (evacuate_pin_staging_area): Don't assert if there are no
	pinned objects.

	* sgen-gc.c (create_allocator): Add the missing n > MONO_ARRAY_MAX_INDEX check
	to the array allocator.

2010-01-16  Zoltan Varga  <vargaz@gmail.com>

        * generic-sharing.c (instantiate_other_info): Don't create ftnptr's from the
        result of mono_compile_method (), it already includes an ftnptr.

2010-01-16  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (get_image_set): Remove an assert which can happen in normal use.

2010-01-15  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_str_hash): New helper function to compute a stable
	hash value which doesn't depend on glib/eglib versions.
	(mono_metadata_type_hash): Use it.

	* object.c (mono_method_get_imt_slot): Ditto.

2010-01-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_has_exceptions): Check the generic instance. It can fail
	independently of the GTD.

	* class.c (mono_class_setup_fields): Fail if field has negative offset.

	* class.c (mono_class_setup_fields): Fail if valuetype has zero size. Add sizeof(MonoObject)
	to the upper limit since instance_size includes this amount.

	* class.c (mono_class_layout_fields): Check if the types of the static fields have failed.

	Fixes #569544.

2010-01-14  Zoltan Varga  <vargaz@gmail.com>

	* object.c (build_imt_slots): Compute the vtable slot correctly for interfaces
	with static methods.

	* object.c (build_imt_slots): Avoid asserting when static methods are
	encountered in an interface.

2010-01-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (to_space_expand): Fix assertion.

Wed Jan 13 15:42:28 CET 2010 Paolo Molaro <lupus@ximian.com>

	* string-icalls.c: missing declaration fixes.
	* sgen-gc.c: portability fixes.

2010-01-12  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_get_implemented_interfaces): Now take a MonoError argument.

	* class.c:
	* cominterop.c:
	* icall.c:
	* object.c: 
	* class-internals.h: Adjust for new signature of mono_class_get_implemented_interfaces.

2010-01-12  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_interfaces): Now take a MonoError argument and
	it can fail loading the type.

	* class.c: Add mono_class_inflate_generic_class_checked.

	* class.c:
	* verify.c:
	* class-internals.h: Adjust for new signature of mono_class_setup_interfaces.

2010-01-11  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_signature_checked): New internal function taking an
	MonoError argument.

	* socket-io.c (AI_ADDRCONFIG): Applied patch from John Lightsey (jd@cpanel.net).
	Fixes build on rh 7.3.

2010-01-10  Aaron Bockover  <abockover@novell.com>

	* assembly.c (mono_set_rootdir): Support finding the mono paths on OS X
	at runtime in the same way as on Windows, which yields a relocatable
	Mono. Uses dyld's _NSGetExecutablePath and realpath to resolve the path
	of the running mono process.

	On TARGET_ARM, fallback () will always be executed.

2010-01-08  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetInterfaceMapData): This function is generics variance aware.

2010-01-08  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_is_assignable_from_slow): Support variant
	generic delegates.

	* class.c (mono_class_implement_interface_slow): Support types with
	variant generic arguments.

2010-01-08  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Remove some code duplication.

2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c: Update docs.

2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (add_imt_builder_entry): Improve DEBUG_IMT spew.

	* object.c (build_imt_slots): Interfaces with variant generic arguments use the
	fallback trampoline as well.

	* class.c (mono_class_interface_offset_with_variance): Add new non_exact_match
	out argument that is set to TRUE if the match was direct. 

	* class.c (mono_class_is_assignable_from): Delegates require variance testing as well.

	* class-internal.h: Update prototype of mono_class_interface_offset_with_variance.

2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Add mono_class_interface_offset_with_variance function that does same
	as mono_class_interface_offset but takes variance into account.

	* class-internal.h: Export mono_class_interface_offset_with_variance.

	* object.c: Fix and improve DEBUG_IMT. Added an assert for IMT thunk building.

2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c:
	* icall.c:
	* class.c: Add some FIXME for due to variant generic arguments.

	object.c (mono_object_isinst_mbyref): Interfaces with variant generic arguments
	can't use the simple bitfield check, so call mono_class_is_assignable_from if
	the bitfield check fails.

2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_is_assignable_from): Rework the generics variance code
	to be easier to read and fix bugs in the case a non generic type implements a variant
	interface.

	* class.c (mono_class_has_variant_generic_params): Make non static.

	* class-internals.h: Export mono_class_has_variant_generic_params as part of
	the private API.

2010-01-07 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* assembly.c: fix MONO_PATH debug output.

2010-01-06  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_verifier_verify_class): Properly check for broken parent. Ignore
	types that are meant to not have a parent.

2010-01-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Make a copy of the signature
	from the image mempool, so it is not leaked.

2010-01-04  Zoltan Varga  <vargaz@gmail.com>

	* metadata-internals.h (_MonoImage): Remove unused generic_class_cache field.

2010-01-04  Sebastien Pouliot  <sebastien@ximian.com>

	* verify.c (verify_valuetype_layout_with_target): Fix case
	that can lead to infinite recursion. Fix bug #567861

2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Run code verifier even if image verification fails
	due to a failed type we. This allows more errors to be shown.

2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (count_virtual_methods): Remove the assert and now
	fail properly.
	
	* class.c (setup_interface_offsets): This can fail now.

	* class.c (mono_class_setup_vtable_general): Check for parent vtable
	errors. Check setup_interface_offsets errors.

	* class.c (setup_interface_offsets): Simplify the return error logic
	and remove class_init_ok.

	Fixes #560327.

2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_init): Do class verification at the beginning. Add
	some asserts to avoid tripping into invalid memory.

	* object.c (compute_class_bitmap): Replace a g_assert_not_reached with a
	g_error and a decent message.

	* verify.c (mono_verifier_verify_class): Verify for invalid super type.

	Fixes #567548.

2010-01-03  Zoltan Varga  <vargaz@gmail.com>

	* mempool-internals.h (g_list_prepend_mempool): Define this and related functions
	as inline functions instead of defining them in mempool.c.

	* metadata-internals.h (MonoImageSet): New structure representing a set of
	MonoImages, which own a collection of generic instances.

	* metadata.c: Get rid of the global generic caches, instead assign each generic
	instance to the image set which consists of all the images referenced by the
	instance. This greatly speeds up mono_metadata_clean_for_image (), and allows
	the memory used by generic instances to be allocated from a per image-set mempool
	later.

2010-01-03  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Fix a memory leak.

2010-01-03  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (zero_static_data): Fix a warning.

	* locales.c (construct_culture_from_specific_name): Applied patch from
	José Antonio Sánchez Lázaro <jasl@darcysoft.es>. Fix a crash if a culture was
	not found. Fixes #567900.

2009-12-31  Sebastien Pouliot  <sebastien@ximian.com>

	* loader.c (mono_method_get_signature_full): Remove two asserts.
	Return NULL instead so that the verifier can handle both cases 
	gracefully.

2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_methods): Use checked version of mono_class_inflate_generic_method_full
	so we can properly fail types instead of crashing.

	Fixes #567676.

2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (reflection_methodbuilder_to_mono_method): Assert in case of a broken
	generic method.

2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_mb_emit_restore_result): Properly handle generic enums.

2009-12-26  Zoltan Varga  <vargaz@gmail.com>

	* monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait): Don't close the
	wait handle if the wait is interrupted, since it is still in mon->wait_list, and
	we can't remove it from it since we don't hold the lock.
	(mon_new): Free the orphaned events here when a mon structure is added to the
	freelist. Fixes #561239. Thanks to Mike Rieker <wmrieker@nii.net> for tracking
	this down.

2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (init_stack_with_value_at_exception_boundary): Do stack overflow checking here
	as max stack might be zero.

	Fixes #562320.

2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>

	Rework all uses of mono_class_setup_methods to accept that it can fail now.

	* class.c (mono_class_setup_methods): This function now can fail the class. Do so for generic
	instances if the GTD did.

	* class.c (mono_class_setup_properties): Ditto.

	* class.c (mono_class_setup_events): Ditto.

	* class.c (mono_class_setup_vtable): Fail early if the type is already broken.

	* class.c (mono_class_setup_vtable_general): Add a few more missing broken type checks.	Sanitize
	error setting.

	* class.c (mono_class_init): Fail if GTD did.

	* cominterop.c:
	* generic-sharing.c:
	* icall.c:
	* loader.c:
	* object.c:
	* verify.c: Properly handle failure of mono_class_setup_methods.

2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.c: Add mono_class_inflate_generic_method_full_checked and make
	mono_class_inflate_generic_method_full internal.

	* class.c (inflate_generic_context): Now takes a MonoError argument.

	* class.c (mono_class_inflate_generic_method_full): Now calls the _checked and abort on
	errors.

2009-12-26  Zoltan Varga  <vargaz@gmail.com>

	* generic-sharing.c (instantiate_other_info): Avoid creating jump trampolines since
	they cannot be patched. Partly fixes #564408.

2009-12-24  Mark Probst  <mark.probst@gmail.com>

	* metadata-internals.h, reflection.c: Use the
	MonoDynamicImage.handleref hash table only with unmanaged keys,
	and add a managed hash table handleref_managed for managed keys.

2009-12-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Unset to-space bumper between collections.  It might
	become invalid due to degraded allocations.

2009-12-21  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_get_signature_full): Check if the returned signature is compatible
	with the one from the original method.

	* metadata-verify.c (mono_verifier_is_sig_compatible): New function to verify signature
	compatibility.

	* verify-internals.h: Add new function to the internal API.

2009-12-18  Dimitar Dobrev  <dpldobrev@yahoo.com>

	* culture-info-tables.h: regenerated it to include the Georgian culture.

2009-12-18  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c: Include mono/utils/memcheck.h.

	* reflection.c (mono_reflection_get_type_internal_dynamic): Use assembly->domain
	instead of the current domain, since the two might not match if this is called
	from the debugger.

	* metadata-internals.h (MonoDynamicAssembly): Add a 'domain' field to specify the
	domain which created this assembly.

2009-12-18  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (dis_one): Avoid a glib assert on empty strings.

2009-12-17  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Managed implementation of the specialized generic
	store write barrier.

2009-12-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Don't pin virtual methods if they are newslot.
	A private virtual newslot method is used to implement an interface method without exposing
	it to users. When querying for public instance methods, such method would hide a public one
	on a parent type.

	Fixes #564379.

2009-12-17  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (resolve_object): Fix the encoding of unmanaged calling
	conventions.

2009-12-16  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_type_get_object): Guard against NULL generic param owner.

2009-12-16  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h (MonoDynamicGenericClass): Kill property and event related fields
	as they are no longer used.
	
	 * metadata.c (free_generic_class_dependents): Remove reference to previous fields

	* reflection.c (mono_reflection_generic_class_initialize): Ditto.

2009-12-16  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_type_get_object): If the type is VAR or MVAR check
	if the owner class has not been finished before returning reflection_info.	

	Fixes #565127.

2009-12-16  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
	param doesn't have custom attributes. Fixes #565117.

	* class.c (mono_bounded_array_class_get): Make these classes PUBLIC. Fixes
	#565120.

2009-12-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_fields): Fail valuetypes that are bigger than 1Mb.

2009-12-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Add partial-md mode that doesn't perform full metadata verification. It does the
	same amount done by a core-clr enabled runtime.

2009-12-15  Marek Habersack  <mhabersack@novell.com>

	* appdomain.c (mono_make_shadow_copy): make sure access mode of
	the target files is reset to writable by owner and readable by
	everyone else to prevent problems when updating shadow copies of
	files whose source is read-only. Fixes bug #556884

2009-12-15  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_generic_class_get_class): Allocate the generic
	class via malloc again, so that it can be freed when any one of
	the images of its constituent types is closed.

	* metadata.c: When closing an image, don't free generic insts and
	generic classes right away, but put them into a list for later
	freeing.

	* image.c, metadata-internals.h: Store the free list and in the
	second pass of closing an image, free it.

2009-12-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_generic_class_get_object): Assert if this is ever called.

	* reflection.c (mono_reflection_register_with_runtime): Only register dynamic
	types in type_hash.

	* reflection.c (resolve_object): Call ensure_complete_type on the inflated field.

2009-12-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_type_get_handle): Properly fail in case of a broken
	user type.

	* reflection.c (mono_reflection_register_with_runtime): Throws in case a bad user type
	is used.

2009-12-14  Miguel de Icaza  <miguel@novell.com>

	* verify.c (mono_method_verify): The Unused opcodes produce an
	InvalidProgramException on .NET

2009-12-14  Sebastien Pouliot  <sebastien@ximian.com>

	* loader.c (mono_method_get_header): Move assert after the verifier
	has been called on the method header.

2009-12-12  Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Remove useless field from MonoReflectionGenericClass.

	* appdomain.c: Bump corlib version.

2009-12-12  Rodrigo Kumpera  <rkumpera@novell.com>

	To properly support user types, MonoGenericClass has to be used for regular, non SRE,
	types as well since otherwise generic instances would not return UT as arguments but
	their undelying system type.

	* object-internals.h: Change field types of MonoGenericClass and *OnTypeBuilderInst
	to reflect the fact that they can have now multiple different types.

	* reflection.c (mono_image_get_field_on_inst_token): Handle MonoField.

	* reflection.c (mono_image_get_ctor_on_inst_token): Handle MonoCMethod.

	* reflection.c (mono_image_get_method_on_inst_token): Handle MonoMethod.

	* reflection.c (mono_reflection_register_with_runtime): Init super types
	if the image is not dynamic.

	* reflection.c (mono_reflection_bind_generic_parameters): In case of a MonoGenericClass,
	check if the generic type definition is a TypeBuilder.

	* reflection.c (mono_reflection_generic_class_initialize): If the generic type definition
	doesn't belong to a dynamic image, skip initialization.

	* reflection.c (resolve_object): Properly handle *OnTypeBuilderInst types where their
	base definition is not a dynamic type.

2009-12-11  Marek Habersack  <mhabersack@novell.com>

	* object.c (mono_ldstr, mono_ldstr_metadata_sig): added calls to
	mono_profiler_string_allocation

	* string-icalls.c (ves_icall_System_String_InternalAllocateStr):
	if string profiling is enabled, call
	mono_profiler_string_allocation

	* profiler.h: added two MonoProfileFlags -
	MONO_PROFILE_IOMAP_EVENTS and MONO_PROFILE_STRING_ALLOC as well as
	installation functions for the hooks below.

	* profiler-private.h, profiler.c: added two hooks:
	mono_profiler_string_allocation called whenever a string is
	allocated by InternalAllocateStr and mono_profiler_iomap called
	whenever IOMAP code performs an adjustement on a file path.

Fri Dec 11 18:24:04 CET 2009 Paolo Molaro <lupus@ximian.com>

	* boehm-gc.c: fixed race condition while getting the target of a
	disappearing link (bug #522233).

2009-12-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_get_full): Produce warning instead of simply swallowing
	the error.

2009-12-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Add mono_reflection_register_with_runtime icall to
	allow a MonoGenericClass to register itself as the managed mirror of
	a given generic instance.
	This is a temporary workaround until all MGC instantiation happens in
	managed code.

	* object-internals.h: Ditto.

	* icall-def.h: Ditto.

2009-12-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (find_in_remsets): Also search the generic store
	remsets.

2009-12-10  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Don't access class names in debugging code when
	unloading a domain, because they might not be valid anymore.

2009-12-10  Mark Probst  <mark.probst@gmail.com>

	* domain.c, domain-internals.h: New function mono_domain_unset().

	* appdomain.c (unload_thread_main): Detach the thread again at the
	end.

	* threads.c: When a thread exists or is detached, unset its domain
	so that it's NULL when, for example, a pthread destructor runs.

	* sgen-gc.c: Assert that there is no domain set after a thread is
	done.

2009-12-10  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_generic_class_get_class),
	metadata.c (free_generic_class): Allocate generic MonoClass's from
	the image mempool, not via malloc.  The problem with malloc is
	that when unloading a domain those classes are freed before
	clearing the heap and SGen needs the classes.  Rewriting the
	unloading code to do the free later would be more work and there's
	no point in using malloc anyway.

2009-12-09  Sebastien Pouliot  <sebastien@ximian.com>

	* loader.c (mono_method_signature): Always call mono_loader_unlock 
	before returning.

2009-12-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add mono_verifier_verify_string_signature to check
	user string blobs.

	* verify-internals.h: Add new function to the internal API.

	* verify.c (do_ldstr): Call into mono_verifier_verify_string_signature to
	check if it's a valid string.

	* object.c (mono_ldstr): Ditto.

	Fixes #561943.

2009-12-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_GetCurrentMethod): Drop all generic arguments
	from a method before returning it. This is the expected behavior.

2009-12-08  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (inflate_method): Handle the case of a regular system type.

2009-12-08  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-pinning-stats.c, sgen-gray.c: More statistics
	gathering code.

	* mempool.c, mempool-internals.h: New function
	mono_mempool_get_bytes_allocated().

	* Makefile.am: sgen-pinning-stats.c added.

2009-12-08  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (create_allocator): Only use the fast path if the
	object size is within the small object size limit.

2009-12-07  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Make sure section->data is aligned to 8 bytes by
	possibly adding padding to sizeof (GCMemSection).

2009-12-07  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (mono_gc_wbarrier_nostore): Skip the remset if the
	reference is not in the nursery.

2009-12-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_from_typeref): Bounds check idx against the 
	assemblyref table.

2009-12-07  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-pinning.c: When pinning, make only one pass
	through the potential roots, then sort the results and find the
	pinned objects from there.

	* Makefile.am: sgen-pinning.c added.

2009-12-07  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Record generic stores in specialized remset buffers.

2009-12-06  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Make pinned chunks the same size as major heap
	sections, and align them as well, so that we can check whether an
	object is in a pinned chunk or a major section in constant time.

2009-12-06  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (build_nursery_fragments): Don't leak fragments.

2009-12-06  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Make all major heap sections the same size (currently
	128k) and allocate them on aligned addresses.  Small heap sections
	give us better granularity with pinned objects - we can free up
	much more memory.

2009-12-06  Mark Probst  <mark.probst@gmail.com>

	* string-icalls.c (ves_icall_System_String_GetLOSLimit): Debug
	output removed.

2009-12-05  Zoltan Varga  <vargaz@gmail.com>

	Applied patch from Laurent Etiemble (laurent.etiemble@gmail.com).

	* mono/metadata/assembly.c: When opening an assembly image, pass the real
	names in addition to the runtime generated one.

	* mono/metadata/image.h: Add a function to take the real name of the assembly
	image.

	* mono/metadata/image.c: If a real name has been passed to load an assembly,
	use it instead of the runtime generated one.

	Code is contributed under MIT/X11 license.

2009-12-05  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_vtype): Do the klass == date_time_class checks
	before the other checks to prevent problems if the DateTime class is blittable.
	Hopefully fixes #559600.

2009-12-05  Mark Probst  <mark.probst@gmail.com>

	* string-icalls.c, string-icalls.h, icall-def.h: New icall that
	returns the largest string length that will not be put into the
	LOS.

	* sgen-gc.c, gc-internal.h: New function that returns the largest
	object size that will not be put into the LOS.

	* appdomain.c: Bump corlib version.

2009-12-05  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h: Add MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.

	* generic-sharing.c: Handle MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.

2009-12-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (inflate_method): Fix signature.

	* object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Reflect change
	in managed code.

2009-12-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (inflate_method): Make this method work with TypeBuilder as well.

2009-12-03  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Abstract to-space handling.

2009-12-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (find_method_in_class): Ignore methods with broken signatures.

	Fixes #559906.

2009-12-03  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Only add references from outside the nursery to
	within the nursery to the global remset list.

2009-12-03  Mark Probst  <mark.probst@gmail.com>

	* appdomain.c (create_exceptions): Set the domain temporarily if
	necessary to avoid cross-domain references.

2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (get_stack_type): Return that the type is invalid instead of
	asserting.

	* verify.c (mono_method_verify): Verify that all locals and arguments
	have valid stack types.

	Fixes #559913.

2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Bounds check the filter offset. Make all
	bounds checking overflow aware.

	Fixes #559910.

2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): Check for invalid method signatures.

	Fixes #553450.

2009-12-02  Jb Evain  <jbevain@novell.com>

	* appdomain.c (MONO_CORLIB_VERSION): bump.
	* icall-def.h (get_base_definition): renamed to get_base_method
	and add a boolean argument indicating we want the original
	method definition, or the immediate base method.
	* icall.c: apply the get_base_definition to get_base_method change.

2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_fields): Fail an enum without an instance field.

	Fixes #558042.

Wed Dec 2 16:35:49 CET 2009 Paolo Molaro <lupus@ximian.com>

	* class.c: remove asserts for invalid type token in
	mono_class_name_from_token(), mono_assembly_name_from_token() and
	mono_class_create_from_typedef () (fixes bug #553318).

Wed Dec 2 15:48:19 CET 2009 Paolo Molaro <lupus@ximian.com>

	* metadata.c, class.c, loader.c: remove assert after bsearch() for
	incorrect assemblies (bug #553322).

2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_inflate_generic_inst): Add MonoError parameter.

	* metadata-internals.h: Change signature of mono_metadata_inflate_generic_inst. 

	* class.c (inflate_generic_type): Use new version of mono_metadata_inflate_generic_inst.

	* class.c (inflate_generic_context): Ditto.

	* loader.c (method_from_methodspec): Ditto.

	Fixes #558230.

2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_retrieve_from_typespec): Use MonoError machinery to report errors.

	* class.c (mono_class_create_from_typespec): Ditto.

	* class.c (mono_class_get_full): Fix for change on the above 2 functions.

	* class.c (mono_type_get_full): Fix for change on the above 2 functions.

	Fixes #558184.

2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_class_has_default_constructor): Check fror broken signatures.

	* verify.c (verify_delegate_compatibility): Ditto.

	* verify.c (do_newobj): Ditto.

	Fixes #558046.

2009-12-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Use a gray queue instead of requiring that gray
	objects are in a contiguous region.

	* sgen-gray.c: The gray queue implementation.

	* Makefile.am: sgen-gray.c added.

2009-12-02  Mark Probst  <mark.probst@gmail.com>

	* appdomain.c: When unloading a domain, zero its static data and
	perform a minor collection when using SGen.  That will get rid of
	all the remsets pointing into that domain's static data.

	* sgen-gc.c: Allow remsets into static data.  By doing this we
	need less checks so we're more efficient.

2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Check for catch clauses with broken
	types.

	Fixes #558465.

2009-12-01  Jb Evain  <jbevain@novell.com>

	* class.c (make_generic_param_class): set the namespace of
	the generic parameter class from its owner, if available.

2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (code_bounds_check): Do proper overflow checking.

	* verify.c (mono_method_verify): The number of switch entries is
	an unsigned int. Properly bounds check it.

	Fixes #558594.

2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c: Kill mono_metadata_get_param_attrs_checked. Add
	mono_metadata_method_has_param_attrs which only checks if a given param
	list has a non zero flags entry.

	* metadata.c (mono_metadata_get_param_attrs): Add param_count parameter
	to inform how many params should we expect to decode.

	* loader.c (mono_method_signature): Use mono_metadata_method_has_param_attrs
	as it's faster than mono_metadata_get_param_attrs.

	* metadata-internals.h: Fix mono_metadata_get_param_attrs signature and
	add mono_metadata_method_has_param_attrs.

2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_vtable_general): Check for mono_method_get_vtable_slot
	failures.

	* class.c (mono_method_get_vtable_slot): Don't assert if the computed method slot
	is -1 but its class is broken.

	Fixes #558522.

2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c: Introduce mono_metadata_get_param_attrs_checked which checks
	for parameter overflow.

	* metadata.c (mono_metadata_parse_method_signature_full): Use checked version
	of mono_metadata_get_param_attrs.

	* metadata-internals.h: Add mono_metadata_get_param_attrs_checked to the internal
	API.

	* loader.c (mono_method_signature): Use checked version of mono_metadata_get_param_attrs.

2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_fields): Check for fields with broken types.

	Fixes #558741.

2009-11-28  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (ensure_generic_class_runtime_vtable): Split this function in 2
	so we can avoid calling ensure_runtime_vtable multiple times for the GTD during
	its TypeBuilder::CreateType ().

	* reflection.c (ensure_generic_class_runtime_vtable): Avoid initializing interfaces
	if not needed.

	* reflection.c: Every time we change the interface array, set interfaces_packed to NULL
	to make setup_interface_offsets happy.

	* reflection.c (remove_instantiations_of_and_ensure_contents): Fix instances again as corlib
	compilation now works.

2009-11-28  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (create_exceptions): New helper function extracted from
	mono_runtime_init () to precreate objects used during exception handling.
	(mono_runtime_init): Call it.
	(mono_domain_create_appdomain_internal): Ditto. Fixes #555264.

2009-11-27  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (remove_instantiations_of_and_ensure_contents): Temp hack to fix corlib
	compilation until the proper one is found.

2009-11-27  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable_general): Cache the result of
	get_virtual_methods () since it can be slow because of the metadata
	optimization.

	* metadata-internals.h (_MonoImage): Change 'method_cache' to a GHashTable
	from a MonoValueHashTable for now, since the later is based on an earlier
	version of hpj's internal probing code and seems to have serious collision
	issues.

	* loader.c (mono_get_method_full): Update after the change above.

2009-11-26  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h (MonoCachedClassInfo): Add 'is_generic_container' field.

2009-11-26  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (get_field_on_inst_generic_type): Try to fallback using the field from
	the GTD instead of the DGC instead of crashing.

	* reflection.c (ensure_generic_class_runtime_vtable): Only reinflate stuff that is
	required. Inflate fields if needed.

	* reflection.c (remove_instantiations_of): Ensure generic instances are properly
	finished. Renamed.

2009-11-26  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (check_interface_method_override): Check for NULL signatures and fail
	the type.

	* debug-helpers.c (mono_signature_get_desc): Return a fixed string for NULL signatures.

	Fixes #553428.

2009-11-26  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_virtual_methods): Call decode_row_col to obtain
	the MONO_METHOD_FLAGS column instead of decoding the whole row.

2009-11-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (field_from_memberref): Resolve the class first then the field
	signature. Remove a lot of duplicated code and make sure we don't pass valid
	values to mono_loader_set_error_field_load.

	Fixes #553306.

2009-11-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (inflate_generic_type): Change code to use new signature of
	mono_error_set_bad_image.

	Fixes #558124.

2009-11-25  Sebastien Pouliot  <sebastien@ximian.com> 

	* verify.c (mono_method_verify): Don't free ctx.params items if 
	we aborted while inflating the ctx.locals. Complete previous fix

2009-11-25  Sebastien Pouliot  <sebastien@ximian.com>

	* verify.c (mono_method_verify): Use the uninflated type name, 
	when the inflated is null, to report errors. Also take care when
	freeing, not to free everything since, in case of an error, some
	stuff would be copies (i.e. not allocated by the function itself)
	Fix bug #558145

2009-11-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (stack_push, stack_pop, stack_pop_safe): Assert if we underflow
	or overflow. The caller must have done this check explicitly. This guard us
	from accessing invalid memory.

	* verify.c (do_push_static_field): Check for stack overflow.

	Fixes #553333.

2009-11-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (find_method_in_class): Don't crash if the signature cannot
	be resolved.

	* metadata.c (mono_metadata_parse_generic_param): Return NULL instead
	of asserting for the case of invalid params.

	Fixes #553304.

2009-11-24  Sebastien Pouliot  <sebastien@ximian.com>

	* image.c (mono_image_load_module): Fix crash when a bad assembly
	has no module at all (fix bug #553412) and also replace the 
	g_assert with a return NULL (documented return value for failure)

2009-11-23  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (mono_type_get_desc): Handle typedbyref.

2009-11-23  Miguel de Icaza  <miguel@novell.com>

	* file-io.c: Change FindFirst/FindNext/FindClose API to return the
	file attribute to managed code and avoid doing the mask/attribute
	checks here. 

2009-11-22  Miguel de Icaza  <miguel@novell.com>

	* file-io.c: Surface a smart FindFirst/FindNext/FindClose API to
	the managed world.

	* icall-def.h: New entry points.
	
2009-11-19  Mark Probst  <mark.probst@gmail.com>

	* process.c: Don't put references to managed objects into a
	g_ptr_array.

2009-11-18  Sebastien Pouliot  <sebastien@ximian.com>

	* class.c (can_access_internals): Allow CoreCLR to participate in
	allowing (or not) [InternalsVisibleTo] between assemblies.
	* security-core-clr.c|h: Make sure that only trusted code (a 
	superset of platform code) can access the internals of platform
	code.

Mon Nov 16 16:28:11 CET 2009 Paolo Molaro <lupus@ximian.com>

	* reflection.c: use the correct base class to get the virtual method
	"get_UnderlyingSystemType" and speed up the icall. Fixes bug #555013.

2009-11-16  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c (get_caller_no_reflection_related): 
	[Mono]Type.InvokeMember is outside System.Reflection[.Emit] but
	it's still reflection and must be filtered correctly.

2009-11-16  Mark Probst  <mark.probst@gmail.com>

	* object.c (compute_class_bitmap): Fix for large bitmaps.

2009-11-15  Zoltan Varga  <vargaz@gmail.com>

	(mono_gc_get_suspend_signal): Fix the build with a system libgc.

	* boehm-gc.c (mono_gc_base_init): Applied patch from DKoushik K. Dutta (
	koush@koushikdutta.com). Disable GC_no_dls on android.

2009-11-12  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (find_tlab_next_from_address): Handle the case where
	tlab_next points outside the TLAB because the allocator was
	interrupted.

2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_module_basic_init): Handle exceptions correctly.

2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Change signature for mono_string_to_utf8_image.

	* object.c (mono_string_to_utf8_image): Change signature to take a MonoError
	argument.

	* reflection.c: Take care of mono_string_to_utf8_image change and avoid raising
	exceptions due to mono_string_to_utf8.

2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Change signature for mono_string_to_utf8_mp.

	* object.c (mono_remote_class): Make sure all resources are released before
	raising an exception.

	* object.c (mono_print_unhandled_exception): Avoid raising an exception.

2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* mono-perfcounters.c (network_get_impl): Change variable initialization
	ordering to fix potential memory leak in case of exceptions.

	* mono-perfcounters.c (mono_perfcounter_create): Properly handle badly
	encoded strings.
	
2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): Change
	variable initialization ordering to fix potential memory leak in case
	of exceptions.

2009-11-09  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (mono_ArgIterator_Setup): Remove the MONO_ARCH_REGPARMS stuff, its not
	needed.

2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c: Fix shadow path code to better deal with exceptions.

2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c: Use checked version of mono_string_to_utf8 to avoid raising an
	exception in the middle of the runtime code.

2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): Don't
	leak memory with broken envvar value.

2009-11-06  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (mono_reflection_setup_internal_class): Because
	nested classes are not added to the name cache, we must put them
	in the reflection_info_unregister_classes list.

2009-11-05  Sebastien Pouliot  <sebastien@ximian.com>

	* class.c: When CoreCLR is enabled don't call mono_init_com_types
	if MONO_CLASS_IS_IMPORT return true unless the type reside in 
	platform (trusted) code. Instead we return a TypeLoadException to
	be thrown later. This is the exception thrown by Silverlight 2 if
	a type, inside application (user) code is marked with [ComImport]

2009-11-05  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
	mono_is_debugger_attached () too.

	* mono-debug.c (mono_is_debugger_attached): New helper function.
	(mono_set_is_debugger_attached): Ditto.

2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Add mono_string_to_utf8_checked.

	* object.c: Implement mono_string_to_utf8_checked.

2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Add missing check for load errors after every
	call to mono_class_setup_fields

	Fixes #552282.

2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>

	metadata-verify.c (verify_tables_schema): Fix the error message.

2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c: Change event table schema to use TDOR for event type
	as this is what it's meant to be.

	* metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
	to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
	entry.

	* metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
	longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
	rows in MONO_TABLE_GENERICPARAM.

	Fixes #552289.

2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_image_add_to_name_cache): Assert on duplicate
	insertion.

	* reflection.c (mono_reflection_setup_internal_class): Avoid
	registering a gc root the same MonoClass multiple times.
	Don't register nested types on the global scope as they should
	not be available there.

2009-11-05  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* culture-info-tables.h: regenerated.

2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* debug-helpers.c: avoid g_strdup() in mono_type_full_name().

2009-11-04  Sebastien Pouliot  <sebastien@ximian.com>

	* string-icalls.c|h: Remove string internal calls that are not 
	used anymore by the class libraries.
	* icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
	which is not used in the class librairies.
	* icall-def.h: Update tables.

2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.h: Move mono_class_inflate_generic_type_checked...

	* class-internals.h: to here and make it internal. We don't want to
	further expose MonoGenericContext. 

2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Improve error message.

2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (fieldref_encode_signature): If field_image is NULL then
	the token is already properly encoded. Fixs 4.0 build.

2009-11-04  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* locales.c (construct_number_format): Check if the number index is
	valid before trying to use it, if not, just return.
	
2009-11-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
	since that loses the abort state. Fixes #539394.

2009-11-03  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
	explicit this argument to the call signature.
	(mono_marshal_get_icall_wrapper): Ditto.

2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (fieldref_encode_signature): Add new field_image parameter
	to indicate which assembly to use when resolving a custom-mod.

	Fixes handling of volatile fields used across assemblies as reported in #551513.

2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c: Improve error messages.

2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_methods): Only give a slot for virtual methods
	of interfaces. Fixes IKVM.

	* class.c (mono_class_setup_vtable_general): Improve debug spew.

2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verifier_inflate_type): Return the inflated type on success.

2009-11-02  Zoltan Varga  <vargaz@gmail.com>

	* debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.

	* threads.c (mono_thread_attach): Call the profiler thread start callback.

	* object-internals.h (_MonoThreadInternal): Add a 'flags' field.

	* threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
	flag set.

	* profiler.c: Add new profiler callbacks for runtime invoke.

	* object.c (mono_runtime_invoke): Call the runtime invoke callbacks.

2009-11-01  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Keep track of the reason for a major collection and
	write it to the heap-dump file.

2009-10-31  Miguel de Icaza  <miguel@novell.com>

	* threads.c: refactor the code that initializes the
	thread_start_args into a reusable function and use this in the two
	methods that start up threads.

2009-10-31  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
	Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.

2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* mono-perfcounters.c: add the "_Total" instance for CPU counters.
	Until now, we only had the per-cpu(core) counters.

2009-10-28  Mark Probst  <mark.probst@gmail.com>

	* gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
	mono_gc_get_suspend_signal(), which returns the suspend signal
	number used by the GC.

2009-10-25  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.

	* threads.c (start_wrapper): Call mono_profiler_thread_start () later after
	signalling start_notify.

2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: do not test the st_mode field for shadow-copies.
	Fixes bug #545276.

2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.[ch]: added hooks for thread start/finish and item
	processing begin/end. For monotouch use only.

2009-10-24  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_get_name): New helper function.

	* reflection.c (resolve_object): Set handle_class for strings too.
	(mono_reflection_create_custom_attr_data_args): New helper function to decode
	a cattr blob into a set of arrays and structures without creating the custom
	attributes themselves.
	(create_custom_attr_data): Simplify using create_custom_attr_data_args.

	* mono-debug.c (mono_debug_il_offset_from_address): New helper function.

	* debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
	function.

2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Replace calls to mono_class_inflate_generic_type with
	mono_class_inflate_generic_type_checked. Fixes #480005.

2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
	object since not all paths lead to callees initing it.

2009-10-23  Alp Toker  <alp@nuanti.com>

	Fix embedding API breakage from r144688. mono-compiler.h is an internal
	header and should not be shipped:

	* class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
	which is specific to the mono build. Not going to work.

2009-10-23  Sebastien Pouliot  <sebastien@ximian.com>

	* security-manager.c: Report if core-clr is active from
	ves_icall_System_Security_SecurityManager_get_SecurityEnabled
	to allow Moonlight BCL to behave appropriately (both in browser
	and outside, e.g. smcs)

2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* mono-config.c: ignore UTF-8 BOM and report parser errors.
	Fixes bug #549108.

2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* class.c: fix typo.

2009-10-22  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
	a MonoError parameter.

	* class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
	version that can does proper error handling.

	* class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.

	* class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.

	* class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.

2009-10-20  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (dis_one): Fix the disassembly of empty strings when
	NO_UNALIGNED_ACCESS is defined.

2009-10-22  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_string_builder_to_utf16): Applied patch from
	Hib Eris  <hib@hiberis.nl>. Return empty string for empty string builders.
	Fixes #549173.

2009-10-22  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Shorten sections whenever possible.

2009-10-22  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Use our portable semaphore #defines.

2009-10-22  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: A debug option for dumping the heap layout to a file
	after each collection.

2009-10-21  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Make managed write barriers atomic via
	thread-restarts.

2009-10-21  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
	methods. Fixes #543021.

2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.[ch]: fix VS build.

2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* icall-def.h:
	* socket-io.[ch]: implemented SendFile.

2009-10-20  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_create_from_typedef): Initialize class->element_class
	before the interfaces to avoid crashes later if class initialization fails.
	Fixes #548417.

	* marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
	Fixes #548276.

2009-10-20  Marek Safar  <marek.safar@gmail.com>

	* domain.c: Bump 4.0 version.

2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>

	* assembly.c (mono_assembly_load_reference): Fix leak when 'status'
	code is known. (parse_public_key) Remove duplicate (unneeded) NULL
	check since 'pubkey' can't be NULL at this stage
	* icall.c (ves_icall_System_Array_FastCopy): Add comment about
	the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
	initialization of 'iter'

2009-10-16  Bill Holmes  <billholmes54@gmail.com>

	* cominterop.c : Search the interface parts of vtable to find 
	  method matches.  Fixes 547030.

	Code is contributed under MIT/X11 license.

2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* marshal.c: BeginInvoke cannot be called on multicast delegates with
	multiple targets. Fixes bug #574426.

2009-10-14  Massimiliano Mantione  <massi@ximian.com>

	* profiler.h: Put here the definition of
	MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
	(and fix the build...).

2009-10-14  Massimiliano Mantione  <massi@ximian.com>

	* profiler.c, profiler.h, profiler-private.h:
	Added support for different ways of getting call chains in stat mode.

2009-10-12  Mark Probst  <mark.probst@gmail.com>

	* object.c, object-internals.h: New function for computing the
	size of an array, factored out of mono_array_new_full().  Use
	SGen's functions for allocating arrays and vectors.

	* sgen-gc.c, gc-internal.h: Special functions for allocating
	arrays and vectors without race conditions.  A managed array
	allocator method.

	* boehm-gc.c, null-gc.c: Don't provide a managed array allocator.

2009-10-12  Mark Probst  <mark.probst@gmail.com>

	* object.c, object.h, icall.c: Write barriers do the copying now,
	as well, so no need for an additional memcpy.

	* sgen-gc.c: Lock when storing remsets.  Do the memory
	copying/moving in the write barriers.

	* null-gc.c, boehm-gc.c: Write barriers must copy here, too.

	* reflection.c: Added an assert.

2009-10-12  Mark Probst  <mark.probst@gmail.com>

	* threads.c, process.c: A few missing write barriers.

2009-10-12  Joel W. Reed <joelwreed@gmail.com>

	* mono-perfcounters.c, mono-perfcounters-def.h: Add
	network performance counters for bytes sent per second, bytes
	received per second, and bytes total per second.

	Code is contributed under MIT/X11 license.

2009-10-09  Mark Probst  <mark.probst@gmail.com>

	* threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
	Fix warning.

2009-10-09  Mark Probst  <mark.probst@gmail.com>

	* threads.c, object-internals.h, object.c: Move code for
	transferring an object to a different domain (via
	serialization/remoting) to object.c.

	* object.c (call_unhandled_exception_delegate): If the exception
	is in a different domain than the delegate, transfer the exception
	to that domain.

2009-10-07  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
	Fixes #322934.

2009-10-06  Zoltan Varga  <vargaz@gmail.com>

	* domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.

2009-10-06  Mark Probst  <mark.probst@gmail.com>

	* object.c (mono_method_return_message_restore): Handle the case
	where the argument is an instance of a generic type.  Fixes
	#544446.

2009-10-06  Mark Probst  <mark.probst@gmail.com>

	* object.c (set_value): Write barrier fix - we must pass the
	count, not the size.

2009-10-05  Zoltan Varga  <vargaz@gmail.com>

	* domain.c (mono_init_internal): Print a useful error message when encountering
	an old mscorlib, instead of crashing. Fixes #544307.

2009-10-04  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (copy_app_domain_setup): Fix a warning.

	* debug-helpers.c (dis_one): Ditto.

2009-10-04  Mark Probst  <mark.probst@gmail.com>

	* domain-internals.h, appdomain.c: The AppDomainSetup is copied
	into the new domain, instead of referencing the original one.

	* marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
	non-static.

	* appdomain.c: Corlib version bump.

2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: one more...

2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: forgot a LeaveCriticalSection when telling the idle
	threads to die because we're shutting down. delgate5.exe works again.

2009-10-01  Bill Holmes  <billholmes54@gmail.com>

	* cominterop.c (mono_marshal_free_ccw_entry): Updating the
	  ccw_interface_hash table when a ccw is finalized.

	Code is contributed under MIT/X11 license.

2009-09-30  Mark Probst  <mark.probst@gmail.com>

	* assembly.c, domain.c, image.c, metadata-internals.h: Split
	domain and image unloading into two steps.  We must do this
	because clearing the domain in SGen requires the class metadata to
	be intact, but we need to free the mono_g_hash_tables in case a
	collection occurs during domain unloading and the roots would trip
	up the GC.

2009-09-30  Mark Probst  <mark.probst@gmail.com>

	* object-internals.h: Remove serialized culture fields from
	MonoInternalThread.

	* icall-def.h, thread-types.h, threads.c: Remove serialized
	culture icalls.

	* appdomain.c: Corlib version bump.

2009-09-30  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
	Fixes #543133.

2009-09-30  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Try to shorten the new section after a major
	allocation to avoid ever-growing sections.

2009-10-13  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerEvent): Renamed
	`MONO_DEBUGGER_EVENT_TRAMPOLINE' into
	`MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
	`MONO_DEBUGGER_EVENT_TRAMPOLINE'.

	* mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.

2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: fixed the order in which 'completed' and the wait
	handle, if any, are set.  Fixes bug #542933 and delegate2.exe
	No need to use the wait_handle field of ASyncCall. Make sure the
	threadpool is active when adding a job or queueing an idle thread.

2009-09-29  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_unhandled_exception): Fix a crash if there is no main thread.

	* threads.c (build_wait_tids): Fix a crash if there is no main thread, like
	when using --compile-all.

2009-09-27  Mark Probst  <mark.probst@gmail.com>

	* metadata.c (free_generic_class): Unregister the field_objects
	roots if we're using SGen.

2009-09-27  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (mono_dynamic_image_free): Deregister the GC root
	for GenericParamTableEntry.gparam.

2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* marshal.c: don't create the handle when calling. It is created later
	if needed.

2009-09-26  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Warning fixes.

2009-09-26  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: New debug option "xdomain-checks", which scans the
	whole heap for cross-domain references before each collection.

	* sgen-scan-object.h: The scan action can now use SCAN to scan the
	object.

	* threadpool-internals.h, threadpool.c: New function
	mono_thread_pool_is_queue_array() for checking whether a given
	array is used as a (cross-domain) queue by the thread pool code.

2009-09-26  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
	searches the whole heap for objects containing a specific
	reference.  Only for debugging.

2009-09-26  Mark Probst  <mark.probst@gmail.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bumped.

	* icall-def.h, threads.c, threads-types.h: New icalls for copying
	byte arrays between domains.

2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c:
	* class-internals.h:
	* mono-perfcounters-def.h:
	* mono-perfcounters.c:
	-There is a list of idle threads
	-Each of those idle threads wait on their own WaitHandle instead
	of all of them using the same semaphore. When a new work item is
	added, the job is assigned directly to an idle thread or a newly
	created one if possible and then the handle for that thread is
	signaled. Compare that to the current approach where all the
	threads in the pool compete to dequeue a job from the same
	queue.
	-New struct ThreadPool that brings together the bunch of static
	variable for each threadpool (IO and regular).
	-New performance counters: # of items added and its rate per
	threadpool. The rate will be used later, perhaps together with
	other perf. counters, to decide when idle threads should exit.

2009-09-25  Jonathan Chambers  <joncham@gmail.com>

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal): 
	Fix typo on Windows build.	
	(ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
	
	Code is contributed under MIT/X11 license.

2009-09-25  Mark Probst  <mark.probst@gmail.com>

	* object-internals.h: The Thread class is split up into Thread and
	InternalThread now.  We have exactly one InternalThread per
	thread, and at most one Thread per appdomain per thread.  Most
	data is stored in InternalThread.  All InternalThread objects live
	in the root domain.

	* class-internals.h: Add internal_thread_class to MonoDefaults.

	* appdomain.c (mono_domain_unload), attach.c (receiver_thread),
	domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
	socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
	resulting from the split of the Thread class.

	* gc-internal.h: Prototype for new function for checking whether a
	thread is the finalizer thread.

	* appdomain.c: Corlib version bump.

2009-09-25  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* appdomain.c|h: Add a mono_domain_try_unload method which is
	equivalent to mono_domain_unload, except that it returns an exception
	instead of throwing it. Make mono_domain_unload use the
	mono_domain_try_unload method to avoid code-duplication.

2009-09-25  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
	a problem.

2009-09-24  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
	aborting when a conversion is not implemented.

2009-09-23  Miguel de Icaza  <miguel@novell.com>

	* verify.c: when comparing culture strings, use g_ascii_strcmp

	* assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
	when comparing public key tokens to use memcmp on 16 bytes.   I do
	not believe this ever worked as advertised in the past.

	The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
	which would have always failed earlier.

2009-06-25  Miguel de Icaza  <miguel@novell.com>

	* gc.c: Raise a NullArgumentException if the object passed is
	null.

2009-09-22  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_close): Atomically decrement the reference count and
	remove the image from the hash tables, to prevent another thread from seeing a
	dying MonoImage. Fixes #541194.

2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: actually use the minimum number of 'completion ports'
	(for us is just a potential worker thread).

2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: remove ares_htable. It does not make sense any more
	since the same objects are now stored in GC-tracked arrays while they are
	in the queue.

2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: increase the minimum length of the queues to 128.
	Remove warning.

2009-09-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
	return the modified signature used by string ctors.

2009-09-20  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
	to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
	method, to be used by full-aot.

2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>

	Since the runtime supports lazy initialization of a type's vtable and this can cause a type
	to fail, we need to ensure that the vtable is properly initialized at spots were the type must
	be known to be good.

	* class.c (mono_class_init): Fail array types if their element type fails initialization
	as well.

	* object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
	initialization, additionally we request the element_type vtable to be initialized as well.

	This is fine and should not increase the working set in any meaningful way since it's reasonable
	to assume	that most code will create an array and eventually populate it, which will require the
	type's vtable to be initialized.

	* loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.

2009-09-17  Atsushi Enomoto  <atsushi@ximian.com>

	* normalization-tables.h : regenerated.

2009-09-16  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
	a leb128 encoding can take up to 5 bytes.

2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (verify_class_overrides): Remove useless argument.

	* class.c (mono_class_setup_vtable_general): Move the overrides check to happen
	before interface enumeration as this is no longer required.

2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: New function mono_class_is_assignable_from_slow that is safe to be
	used under mono_class_init context. This functions avoid any code path that
	calls mono_class_init, which leads it to be slow as some things like the interface
	bitmap are not available.

	* class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
	of it's own broken version. Fixes the verifier part of #538588.

	* class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
	API.

2009-09-15  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_class_init): Always set an exception in a class if
	vtable setup fails.  Fixes #538577.

	* generic-sharing.c: Raise an exception if mono_class_vtable()
	returns NULL.

2009-09-13  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Don't share instance 
	methods of vtypes, as they could be incorrectly shared with static methods
	taking an IntPtr argument.

2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* domain.c:
	* object.c:
	* class-internals.h: renamed waithandle_class to
	manualresetevent_class.
	* marshal.c: propagate the exception if a remoting BeginInvoke call
	fails.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c: Properly handle vtable failures.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* socket-io.c: Assert on vtable failure.

	* mono-mlist.c: Assert on vtable failure.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c: Assert on vtable failure.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Properly handle vtable failures.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.

	* console-unix.c (do_console_cancel_event): Same.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h: Add mono_class_vtable_full function that allows control
	if an exception should be raised or not.

	* object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
	to do what its documentation say, that is to return NULL and set exception_type on
	failure.

	* object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
	and change the code to honor it.

2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Fix typo in error message.

2009-09-10  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Fix default_platform_check so it can run
	the runtime coreclr tests (without an infinite recursion when
	throwing an exception).

2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>

	object.c (mono_delegate_ctor_with_method): Guard against null method.

2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
	that should be replaced with error handling later.

2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_delegate_end_invoke): Fix warning.

2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_field_from_token): Properly handle invalid
	dynamic tokens.

2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (verify_image_file): Skip types that can't be
	decoded.

2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Look for recursive valuetypes only against the
	type been initialized as this is a lot simpler and works.

2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Ensure that fields are properly loaded before
	checking them.

2009-09-10  Bill Holmes  <billholmes54@gmail.com>

	* object.c (mono_object_get_virtual_method) : Call 
	  mono_cominterop_get_invoke if the object is a COM object.

	Code is contributed under MIT/X11 license.

2009-09-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Check for recursive valuetype definitions.

2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>

	Use inheritance-aware interface offsets. Inherited types use the same offsets
	of their parents. This reduce offset duplication in case more than one type in
	the inheritance tree explicitly implements the same interface.

	This also removes a source of vtable bubbles found in #532409. An abstract type
	isn't required to provide abstract methods to all interfaces it implements, which
	resulted in a bubble with the previous scheme as the child would get a non-full
	vtable from its parent. We fail all concrete types with vtable bubbles, so this
	should be fixed.

	This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
	it's expected to not cause any significant increase beyond that.

	* class.c (setup_interface_offsets): Compute super class iface offsets
	first to force sharing.

	* class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
	dumping only the relevant ones.

	* class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
	methods a new slot regardless if they belong to an interface or not. This allows
	an inherited type to override the iface method separately from the class one.

2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: make the Sleep() alertable to prevent delays exiting
	applications that take less than 2s to execute.
	Bug #524984 fixed.

2009-09-04  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.

	* object.c (mono_get_runtime_callbacks): New helper function to return
	the runtime callbacks.

	* icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
	mono_get_runtime_build_info () as the display name.
	
2009-09-03  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
	argument, since NEWARR expects a native int. Fixes #481559.

2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
	against broken SRE methods.

2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_get_full): Don't call mono_metadata_free_type on
	a NULL variable. Abort early on failure.

2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (can_access_type): Fail visibility test for non nested
	types with nested visibility.

2009-09-02  Sebastien Pouliot  <sebastien@ximian.com>

	* assembly.c (parse_public_key): Avoid allocating (and not 
	freeing) the public key array when it's not requested by the 
	caller.
	* threads.c (mono_thread_manage, mono_thread_create_internal, 
	ves_icall_System_Threading_Thread_Thread_internal): Free 
	allocated memory on error.

2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c, icall-def.h: Remove some dead code from early SRE changes.

2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_fields): Remove duplicated local variable
	named gklass.
	Rename gklass to gtd to reflect the fact that it points to the generic
	type definition.
	Remove the duplicated call to mono_class_setup_fields on gtd and move
	the error check to the beginning.

2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
	Remove cruft of the previous patch.

2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_method_table): Check for abstract + final.
	Fixes #534175.

2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_class_fields): Check for duplicate fields.

2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the typeref table for duplicates.

2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>

	This reverts r140936 and properly handles interfaces with static methods. The
	right fix is to ensure vtables without bubles which is an easier to verify
	constraint. We should avoid such special cases as of the reverted patch as those
	only make the runtime more brittle.

	* class.c (mono_class_setup_vtable_general): Revert previous change that handle
	static methods on interfaces.

	* class.c (setup_interface_offsets): Use the number of virtual methods when
	calculating interface offsets instead of the number of methods. This way we
	avoid bubles on the layout.

2009-08-31  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_metadata_header): Some very smart
	obfuscators like to add extra stream headers. Ignore them.

2009-08-30  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable_general): Verify interfaces with static
	methods correctly.

2009-08-29  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify for duplicated types.

2009-08-28  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Verify for nested types
	without an entry on the nested class table.

2009-08-28  Zoltan Varga  <vargaz@gmail.com>

	* cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
	<tom_hindle@sil.org>. Add locking around hash table accesses.

2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_verifier_verify_class): Verify all interface if
	really are interfaces. Fixes #534184.

2009-08-27  Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Initialize all types during metadata validation so we report
	errors only detected as part of class initialization.

2009-08-26  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_method_table): PInvoke requires method to
	be static. Fixes #534189

2009-08-26  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
	being NULL.

2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_vtable_general): Verify the resulting vtable
	for holes or bad methods. Fixes #525314.

2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (setup_interface_offsets): Don't allocate slot
	for the same interface multiple times. This creates bubbles
	that waster space and make vtable verification harder.

	The same interface get a slot multiple times since we need
	to get the closure of all implemented interfaces, which means
	the same interface is reported multiple times.

2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_verifier_verify_class): Don't check the fields
	of generic instances since the context on which they got expanded
	might lead to false positives.

	Such thing happens when a generic type is inflated in the context
	of a generic method and the inflated type of a field turns into a
	generic method argument, which causes the checking code to think
	it's an invalid class when it's not.

2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_type_is_valid_in_context): Verify if type
	is NULL and remove duplicate test.

2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_verifier_verify_class): Check fields for
	invalid generic arguments.

2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (verify_class_overrides): Verify if for static
	and non virtual methods.

2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
	Check for errors after retrieving the vtable.

2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_vtable_general): Verify
	if method overrides are valid before processing them.

2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_array_to_lparray): Fix minimal build with
	cominterop disabled.

	* marshal.c (mono_free_lparray): Same.

2009-08-21  Mark Probst  <mark.probst@gmail.com>

	* threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
	the hash function for the ares_htable.

2009-08-20  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
	bit for assembly flags. MS is ok with it but there is no spec anywhere
	on its mean

2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Emit profiler events
	in all cases.

2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
	Release memory on failure.

2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h: Add mono_metadata_load_generic_param_constraints_full
	to the internal API.

	* metadata.c (get_constraints): Use a single-linked table as we don't
	traverse it backward. Fail and return FALSE if only of the contraint types
	is not found.

	* metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
	to mono_metadata_load_generic_param_constraints except for having a return value.
	This has to be done since the later is part of the public API.

	* class.c (mono_class_create_from_typedef): Properly check the loading of constrains
	and fail the type.

	* loader.c (mono_get_method_from_token): Properly check the loading of constraints
	and fail the method.

2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_method_header): Add work-around to deal
	with MS broken behavior of emmitting EH section sizes without the
	header size added.

2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_type_create_from_typespec): Don't allocate image
	memory until we're sure that we'll need it. This avoids leaking for
	broken types or duplicated instantiation.

2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_method_header): Fix stupid formating
	mistake.

2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_method_header): Fix number of clauses
	and expected size calculation.

2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_get_field_idx): Add fixme for broken
	behavior for types with multiple fields with the same name.
	I would rather fix it, but have no idea on how to generate
	such artifact for testing.

2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verifier_load_field): We should allow references to
	fields to be made using the generic type definition. It's up to
	the loader system to fail invalid ops.

	* verify.c (get_boxable_mono_type): Only uninstantiated GTDs
	are invalid.

2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.

	* metadata-internals.h: Fix declaration of 
	mono_metadata_interfaces_from_typedef_full.

	* metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
	heap_alloc_result parameter that controls if the result should be
	g_malloc'd.

	* metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
	array be g_malloc'd and properly document this public API function.

2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
	remove METHOD_HEADER_TINY_FORMAT1.

	* reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.

	* metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.

	Both spec and MS uses only 2 bits to enumerate the kind of header.
	So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
	is superfluous, only used for tiny headers with odd code lengths.

	This change also make sure that mono doesn't wronly interpret bit 2
	of fat header flags, which is currently reserved.

2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (do_mono_metadata_parse_type): Do error
	checking for element types. Don't abort if presented
	with a broken type kind.

2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_parse_method_signature_full):
	Gracefully fail bad vararg signatures.

2009-08-18  Christian Hergert  <chris@dronelabs.com>

	* profiler.c:
	* class.c: Fix warnings for uninitialized variables.

2009-08-18  Christian Hergert  <chris@dronelabs.com>

	* icall.c: Fix _NSGetEnviron method declaration warning.

2009-08-18  Christian Hergert  <chris@dronelabs.com>

	* icall.c:
	* reflection.c: Make bitwise checks explicit.

2009-08-18  Christian Hergert  <chris@dronelabs.com>

	* debug-helpers.c:
	* marshal.c: Fix printf warnings.

2009-08-18  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (encode_cattr_value): Fix a warning.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_parse_array_full): Fix memory leak
	of array bounds.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_signature): Don't assert on broken
	signature. Print a more useful error message.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_get_marshal_info): Assert if
	signature is invalid. Bounds check stores to the
	mspecs array;

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (field_from_memberref): Fix warning.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_get_param_names): Check if signature
	is null. Don't store beyond the size of the name array.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_get_method_constrained): Check if signature
	is null.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_loader_set_error_bad_image): Improve
	error messages.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_get_method_full): Convert an assertion
	into a loader error.

2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h, class.c: Better naming and documentation.

2009-08-17  Zoltan Varga  <vargaz@gmail.com>

	* boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
	obj is NULL.

2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_get_signature_full): Fail gracefully if signature
	parsing fails.

2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_loader_error_prepare_exception): Handle missing field
	errors with no class set.

	* loader.c (field_from_memberref): If the field signature is of the wrong
	type fail with a MissingFieldException instead of a BadImageException as
	this is the behavior observed on MS. 

2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (field_from_memberref): Don't crash if either the field
	signature or the typespec class are invalid.

2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verifier_load_field): Don't allow field related
	ops to reference fields on generic type definition.

2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add new warning level for errors specified
	by ECMA 335 but that MS ignores.

	* metadata-verify.c (verify_method_table): Make compiler controled
	visibility + (rt)specialname error a warning as MS ignores this. Ignoring
	this check is safe because the end result will only be some visibility
	exceptions been thrown.

2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (get_boxable_mono_type): Don't allow the
	use of the generic type definition on boxed type positions.

	Fixes #531237.

2009-08-14  Mark Probst  <mark.probst@gmail.com>

	* threadpool.c: Make sure no cross-domain references remain in
	ares_htable or the arrays that are thrown away when resizing.

2009-08-14  Mark Probst  <mark.probst@gmail.com>

	* appdomain.c, metadata-internals.h, image.c: In MonoImage add a
	list of classes for which we have to unregister reflection_info
	with the GC and which are not in the namespace cache.

	* reflection.c (mono_reflection_initialize_generic_parameter): Add
	the class to the list.

2009-08-14  Mark Probst  <mark.probst@gmail.com>

	* domain.c (mono_domain_free): Unregister the GC roots in
	MonoDomain.

2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_type_get_handle): Fix typo.

2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Add mono_class_get_field_from_name_full which does
	the same as mono_class_get_field_from_name but does check field
	signature as well.

	* class-internals.h: Export mono_class_get_field_from_name_full as
	part of the internal API.

	* loader.c (field_from_memberref): Search fields by name and signature
	as it's valid to have two fields with same name but different types.

	Fixes #528055.

2009-08-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.

	* reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.

	* reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
	System.Type.

2009-08-13  Zoltan Varga  <vargaz@gmail.com>

	* gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.

	* boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.

2009-08-12  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
	to sgen-scan-object.h, which can be included and parameterized via
	macros.

	* Makefile.am: sgen-scan-object.h added.

2009-08-12  Mark Probst  <mark.probst@gmail.com>

	* gc.c: #define GC_dont_gc if we're compiling with SGen.

2009-08-12  Mark Probst  <mark.probst@gmail.com>

	* domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
	before clearing a domain in the GC.

2009-08-12  Mark Probst  <mark.probst@gmail.com>

	* exception.c (mono_exception_from_name_domain): Actually create
	the exception in the specified domain.

	* appdomain.c (mono_domain_create_appdomain_internal): Create the
	OutOfMemoryException a bit later so that the domain is inialized
	"enough" that it works.

2009-08-12  Mark Probst  <mark.probst@gmail.com>

	* threads.c (thread_cleanup): Clean up the cached_culture_info
	array to prevent cross-domain references.

Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>

	* metadata.c: more documentation for MonoType accessors.

2009-08-11  Raja R Harinath  <harinath@hurrynot.org>

	Fix incorrect size definitions where the tail array isn't a list
	of pointers
	* class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
	define size.
	* domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
	* metadata.h (MONO_SIZEOF_TYPE): Likewise.
	* reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.

2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* reflection.h:
	* reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.

2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* metadata.c:
	* loader.c:
	* metadata-internals.h:
	* method-builder.c:
	* reflection.c: use MONO_SIZEOF_METHOD_HEADER.

2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* cominterop.c:
	* metadata.c:
	* metadata.h:
	* loader.c:
	* marshal.c:
	* reflection.c: #define for sizeof in MonoType and
	MonoMethodSignature.

2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* domain.c:
	* domain-internals.h: add and use #define's instead of sizeof()
	for MonoJitInfo and MonoJitInfoTable.

2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* object.c:
	* class.h: use #define instead of sizeof() for MonoRemoteClass.

2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* metadata.c:
	* metadata.h:
	* object.c:
	* class-internals.h:
	* generic-sharing.c:
	* marshal.c: use a #define instead of sizeof() for a few
	structures that use a zero-length array.

2009-08-06  Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
	to handle inflated generic methods.

	* appdomain.c: Bump corlib version.

	* reflection.c (mono_image_get_method_on_inst_token): Handle generic method
	instances.

	* reflection.c (fixup_method): Same

	* reflection.c (resolve_object): Same.

	* reflection.c (inflate_method): Replace a g_assert_not_reached with a
	g_error and a decent message.

2009-08-06  Massimiliano Mantione  <massi@ximian.com>

	* bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
	from the object because it could not yet be available globally
	(it happens if the profiler tries to create a gchandle on the
	MonoThread object of a thread that is still registering itself
	with the runtime).

2009-08-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_generic_class_get_object): Initialized the
	managed type arguments array.

	* object-internals.h (MonoReflectionGenericClass): Add type_arguments field.

	* appdomain.c: Bump corlib version.

2009-08-04  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
	#527902.

2009-08-03  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
	Avoid a crash if synch_cs is not set.
	
	* threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
	Handle the case when the handle is 0.

	* appdomain.c: Bump corlib version.

2009-08-02  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_type_get_object): Fix a warning.

2009-08-01  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
	descriptor here.  We assume it's already been computed.

	* generic-sharing.c (instantiate_other_info): Compute the GC
	descriptor for info type MONO_RGCTX_INFO_KLASS.

2009-08-01  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (mono_type_get_object): MonoDomain is an unmanaged
	type, so don't use MONO_OBJECT_SETREF to set a field.

2009-08-01  Mark Probst  <mark.probst@gmail.com>

	* gc.c: We were missing one case where invoking a finalizer would
	not reset the domain.  Also, in the finalizer thread loop, assert
	that we're in the root domain.

2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
	if the type is not an array.

2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
	method bound to the declaring type of the method. Raise an exception
	if the type is not a generic param.

2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (print_unimplemented_interface_method_info): Print the
	full type name.

	* class.c (mono_class_setup_vtable_general): When dealing with a
	generic instance first check if the generic type definition is
	not broken.

2009-02-11 Tom Hindke <tom_hindle@sil.org>

	* marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.

	* marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray

	* marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.

	* marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case

	* metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY

	Code is contributed under MIT/X11 license

2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Fix naming of stelem and ldelem.

2009-07-30  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Replace the templates lock with the loader
	lock because of very hard to resolve deadlock issues.

2009-07-30  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Use 
	mono_class_get_vtable_size () instead of accessing klass->vtable_size
	directly. Fixes #525338.

	* class.c (mono_class_get_vtable_size): New helper function.

	* icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
	the field belongs to the type. Fixes #525733.

2009-07-30  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: When we stop a thread and its stack top is not within
	its allocated stack (because it's in an altstack signal handler),
	restart it and stop it again, until it is.

2009-07-30  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Take a thread's stack top and registers from the
	sigcontext in the suspend signal handler.

	* sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
	stuff to sgen-archdep.h.

	* gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
	caller, because have code in sgen-archdep.h to acquire that data.

2009-07-29  Massimiliano Mantione  <massi@ximian.com>

	* profiler.c, profiler.h, profiler-private.h:
	Added support for keeping track of code chunks and buffers.

2009-07-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Fix endianness problems on decoding functions.
	Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>

2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_make_array_type): Handle the new encoding
	schema for vectors and one dimension SZARRAY.

2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_type_get_handle): Handle the new encoding
	schema for vectors and one dimension SZARRAY.

2009-07-27  Mark Probst  <mark.probst@gmail.com>

	* icall-def.h, thread-types.h, threads.c: New separate icalls for
	Interlocked.(Compare)Exchange with object arguments, which invoke
	write barriers.

2009-07-26  Miguel de Icaza  <miguel@novell.com>

	* icall.c (ves_icall_Type_GetNestedType): Throw an exception when
	passed invalid arguments.   Fixes another crasher in the
	Silverlight test suite.

	* class.c (mono_class_array_element_size): Return 0 for the size
	of the class;  This fixes the crasher exposed by :

	typeof (void).MakeArrayType ();

	* icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
	if there is no method to dereference.    Put all the code that
	depends on this inside the if (method) block.

	This fixes the crasher exposed by Microsoft's Silvelright CLR test
	suite  ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe

	With this change, we pass the test.
	
	* reflection.c (mono_reflection_sighelper_get_signature_local):
	Only dereference the assembly if it has been set.    Fixes a
	crasher exposed by #525328

2009-07-25  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
	don't perform the store in mono_gc_wbarrier_generic_nostore().
	Remove the second argument (value), which is not needed.

2009-07-24  Zoltan Varga  <vargaz@gmail.com>

	* null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
	the build.

	* boehm-gc.c: Ditto.
	
2009-07-24  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c, marshal.c, object.h: Make the managed write barrier
	not perform the store itself.  Introduce
	mono_gc_wbarrier_generic_nostore(), which is the same as
	mono_gc_wbarrier_generic_store(), except it doesn't perform the
	store.

2009-07-24  Mark Probst  <mark.probst@gmail.com>

	* icall.c (ves_icall_System_Array_SetGenericValueImpl):
	mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
	we still need the memcpy().

2009-07-22  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Align array bounds calculation to mono_array_size_t
	so that big arrays are handled correctly.  Always use
	safe_object_get_size() to calculate array object sizes, which
	takes bounds into account.

2009-07-22  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
	GC descriptor is computed before we use it.

2009-07-22  Mark Probst  <mark.probst@gmail.com>

	* icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
	write barrier if necessary.

2009-07-22  Mark Probst  <mark.probst@gmail.com>

	* icall-def.h, icall.c, thread-types.h: New separate icall for
	VolatileWrite(object&,object) that uses a write barrier.

	* console-unix.c, file-io.c, icall.c, threads.c: Use write
	barriers in icalls which write to "ref" or "out" arguments.

2009-07-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
	handler in a separate icall, to reduce the size of the wrappers.

2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_typespec_blob): Fix error message.

2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_field): Allow byref field.

	* metadata-verify.c (parse_locals_signature): Allow byref locals.

	* metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.

2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_cast): Fail for any non reference type that isn't boxed.
	Fixes #522784.

2009-07-20  Robert Jordan  <robertj@gmx.net>

	* cominterop.c (cominterop_get_managed_wrapper_adjusted):
	Fix invalid IL in valuetype handling (STOBJ must push the
	corresponding class). Fixes bug #523149.

	Code is contributed under MIT/X11 license.

2009-07-20  Geoff Norton  <gnorton@novell.com>

	* gc.c: Use proper semaphores where available on posix and darwin.

2009-07-19  Geoff Norton  <gnorton@novell.com>

	* gc.c: Unnamed posix semaphores are broken on darwin-arm too.

2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* refletion.c (is_sre_usertype): Change name to is_usertype and
	invert it's result so it returns true if the type is an user type
	and not the opposite.

	* reflection.c (is_*_type): Change all of those to use new macro
	check_corlib_type_cached that cached the type lookup so we don't
	need to do string comparisons all the type. Changed the signature
	to take a MonoClass instead.

	* reflection.c: Change mono_image_create_token and resolve_object
	to use is_sre_* functions.

2009-07-18  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Check for writes to the stack in the managed
	wbarrier as well.

2009-07-18  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: When a thread is unregistered, don't free its remsets
	but put them on a list which is processed with the other thread's
	remsets.

2009-07-18  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Fix and enable the internal allocator instead of
	using malloc/free (which causes deadlocks).

2009-07-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* refletion.c: Fix builds with SRE disabled by adding a minimal
	implementation of mono_reflection_type_get_handle.

2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* refletion.c: Make mono_reflection_type_get_handle non static.

	* object-internals.h: Export mono_reflection_type_get_handle.

	* icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
	unmanaged handle using mono_reflection_type_get_handle.

2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* refletion.c: Replace all reads of MonoReflectionType::type with
	calls to mono_reflection_type_get_handle. Only the functions that
	deal with constructing TypeBuilder::type have not been changed
	because they have to deal with NULL values.

	This is a first step into supporting reflection types that don't
	map directly into their unmanaged counterpart.

2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_locals_signature): Don't complain
	on signature with zero locals since MS generates it and doesn't
	bother with.

2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_array_token): Resolve return
	type using mono_reflection_type_get_handle.

	* reflection.c (mono_image_get_array_token): Resolve array method
	parent type using mono_reflection_type_get_handle.

2009-07-14  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_image_basic_init): Applied patch from
	<Dax@daxxfiles.net>. Set the public key token from the assembly
	builder. Fixes #518909.

	* appdomain.c: Bump corlib version.

2009-07-13  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_needs_cctor_run): Make this return false if
	the class has no cctor.

2009-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: When the minor GC needs to allocate a new section,
	invoke the major GC afterwards.

2009-07-14  Bill Holmes  <billholmes54@gmail.com>

	* process.c  (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
	  Applying the window_style field to the SHELLEXECUTEINFO struct.

	Code is contributed under MIT/X11 license.

2009-07-13  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Fix the race condition in the unmanaged allocator by
	locking earlier.  Fix it in the managed allocator by making sure
	that no thread is stopped there before the GC runs.  If we do stop
	a thread there, we restart it and let it run a but, until it stops
	somewhere else.

	* gc-internal.h, gc.c: Function for getting the IP from a signal
	context via a function registered by mini.

2009-07-11  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h (MonoIntPtr): New structure describing a boxed
	IntPtr.

	* object.c (mono_runtime_invoke_array): Handle ptr arguments and
	returns. Fixes #519953.

	* marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.

2009-07-09  Mark Probst  <mark.probst@gmail.com>

	* class-internals.h, generic-sharing.c: New RGCTX info type for
	getting a remoting invoke with check wrapper.

2009-07-07  Geoff Norton  <gnorton@novell.com>

	* icall-def.h: Fix the enable-minimal build.

2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Add MonoReflectionDerivedType.

	* reflection.c: Implement support for PointerType.
	Fixed tons of warnings.

2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Add MonoReflectionByRefType.

	* reflection.c: Implement support for ByRefType.

2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.

	* object-internals.h: Add MonoReflectionArrayType and
	mono_reflection_create_unmanaged_type.

	* reflection.c: Implement support for ArrayType.

2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_method_header): Parse EH block
	flags correctly.

2009-07-03  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (finish_gray_stack): Set the to_space pointer after
	processing the disappearing links, and process disappearing links
	in a loop until no new objects are copied.

2009-07-03  Mark Probst  <mark.probst@gmail.com>

	* object.c (handle_enum): Invoke the write barrier when copying
	value type instances.

	* sgen-gc.c: Register remsets for unmanaged write barriers only
	when the address written to is actually on the heap.  This makes
	set_value() in object.c work without requiring that the result be
	on the heap.

2009-07-02 Rodrigo Kumpera  <rkumpera@novell.com>

	The runtime wrappers are all bound to a given type that must
	exist in the same image. For regular images we use the <Module>
	type, which is required to exist for all images.

	The <Module> type can't be used for dynamic images because it
	might not exist at the time the wrapper is required, so we create
	a synthetic type to use instead.

	The current code works because of the 2 stage setup of MonoClass,
	but once this is gone it will no longer work.

	* icall-def.h: Add ModuleBuilder::set_wrappers_type.

	* metadata-internals.h (MonoDynamicImage): Add wrappers_type.

	* object-internals.h: Export mono_image_set_wrappers_type icall
	as part of the internal API.

	* marshal.c (get_wrapper_target_class): If the image is dynamic,
	use MonoDynamicImage::wrappers_type instead of the <Module> type.

	reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
	image wrappers_type to the provided value.

2009-07-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (deregister_reflection_info_roots): No need
	to use the image lock here.

2009-07-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (collect_nursery): Also scan from write-barrier roots.

2009-06-29  Zoltan Varga  <vargaz@gmail.com>

	* threads.c: Store the thread start argument in a hash table instead of
	registering it as a root, as libgc doesn't support unregistering roots
	under windows, leading to 'too many root sets' errors when many threads
	are created.

	* gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
	shutdown, they can still be referenced by the other dying objects.
	Fixes #514506.

2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: DontLinger does not allow LingerOptions.

2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: The spec doesn't mention that it's possible to add
	custom attribute to a generic parameter. Fixed.

2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (inflate_generic_type): Don't crash while trying to output a message
	on why we're aborting.

2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: DontLinger can take an int or a boolean too.

Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>

	* gc.c: check for a null argument to SuppressFinalize () and
	ReRegisterForFinalize ().

2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (method_from_methodspec): Call into the verifier to check
	the signature.

	* metadata-verify.c: Addmono_verifier_verify_methodspec_signature.

	* verify-internals.h: Export mono_verifier_verify_methodspec_signature as
	part of the internal API.

2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_type_create_from_typespec): Call into the verifier to check
	the signature.

	* metadata-verify.c: Add mono_verifier_verify_typespec_signature.

	* verify-internals.h: Export mono_verifier_verify_typespec_signature as
	part of the internal API.

2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
	the signature.

	* metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
	blob verification.

	* verify-internals.h: Export mono_verifier_verify_memberref_signature as
	part of the internal API.

2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Use is_valid_blob_object to verify blob validity
	when doing basic verification. 

	This check must be done since the runtime peeks into signatures in much
	more places than it does decoding so it makes sense to ensure that all
	pointers to blob objects are well formed.

2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
	Use proper overflow dectection. Fix usage of it.

2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (field_from_memberref): Call into the verifier to check
	the signature.

	* loader.c (mono_method_get_signature_full): Same.

	* loader.c (method_from_memberref): Same.

	* metadata-verify.c: Add mono_verifier_verify_memberref_signature.

	* verify-internals.h: Export mono_verifier_verify_memberref_signature as
	part of the internal API.

2009-06-25  Mark Probst  <mark.probst@gmail.com>

	* threadpool.c (mono_thread_pool_add): If the domain is unloading
	or unloaded, still return an AsyncResult, but don't add it to the
	threadpool.

2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threads.c: fix missing colon when DEBUG is defined.

2009-06-25  Mark Probst  <mark.probst@gmail.com>

	* threadpool.c: Don't add new calls to a threadpool if the domain
	of the call is unloading or unloaded.  When dequeuing a job, null
	the reference in the queue.

2009-06-25  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (null_link_in_range): Add the dislink for the old
	generation if an object was moved.

2009-06-25  Sylvain Dupont <duposyl@gmail.com>

	* cominterop.h cominterop.c marshal.c: Added support for marshalling out 
	  parameters of type SAFEARRAY[VARIANT].

	* reflection.c (encode_marshal_blob): Properly generate element type
	  (SafeArraySubType marshal attribute option).

	Code is contributed under MIT/X11 license.

Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>

	* reflection.c: in mono_method_clear_object () really ensure all the
	objects are removed.

2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_signature): Call into the verifier to check
	the method signature.

	* metadata-verify.c (verify_method_table): Move signature verification
	to verify_method_table_full.

	* metadata-verify.c: Add mono_verifier_verify_method_signature.

	* verify-internals.h: Export mono_verifier_verify_method_signature as
	part of the internal API.

2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_get_header): Call into the verifier to
	check the method header.

	* metadata-verify.c: Add mono_verifier_verify_method_header.

	* verify-internals.h: Export mono_verifier_verify_method_header as
	part of the internal API.

2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_find_enum_basetype): Call into the verifier to
	check the field signature. Replace an assert with an explicit check.

	* class.c (mono_class_setup_fields): Call into the verifier to check
	the field signature.

	* metadata-verify.c: Add mono_verifier_verify_field_signature.

	* verify-internals.h: Export mono_verifier_verify_field_signature as
	part of the internal API.

2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_find_enum_basetype): Simplify this function
	by moving code outside of the loop and not decoding static fields.

2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Check the extends
	token here. Move to here a flags check from verify_typedef_table_full.

2009-06-24  Zoltan Varga  <vargaz@gmail.com>

	* metadata-verify.c (is_valid_method_header): Fix a warning.

	* metadata-internals.h (MonoImage): Remove the unused 
	static_rgctx_invoke_wrapper_cache.

	* image.c marshal.c: Ditto.

2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* image.c (do_mono_image_load): Enable table data verification.

2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_constant): Fix nullref check.

2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_constant): Fix string bounds check.

2009-06-22  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Managed allocation with pthreads TLS.

	* threads.c, threads-types.h: Functions for the JIT to tell the
	runtime whether it supports the MONO_TLS opcode.

2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_param_table): Fix a crash for assemblies
	without methods.

2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_constant): Fix the string length check.
	Use safe overflow checking. Add decent error messages.

2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Move remaininh blob checks to the offline
	verification path.

2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Move more blob checks to the offline verification
	path.

2009-06-22  Bill Holmes  <billholmes54@gmail.com>

	* object-internals.h : Adding interrupt_on_stop field.

	* threads.c (mono_thread_request_interruption) : On Windows exit the
	  thread if interrupt_on_stop is set.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
	 Removing old interrupt logic and setting the interrupt_on_stop for the
	 thread when calling accept.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
	 setting the interrupt_on_stop for the thread when calling accept.

	Contributed under MIT/X11 license.

2009-06-20  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.

2009-06-21  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (mono_try_assembly_resolve): Don't call managed code when
	running in no-exec mode.

2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_method_table): Move header
	checking to verify_method_table_full.

	* metata-verify.c (mono_verifier_verify_full_table_data):
	Call verify_method_table_full.

2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_field_table): Move signature
	checking to verify_field_table_full.

	* metata-verify.c (mono_verifier_verify_full_table_data):
	Call verify_field_table_full.

2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Move remaining
	stuff to verify_typedef_table_full.

2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Kill is_corlib from VerifyContext.
	It is only used by the offline mode.
	So we better remove it from the runtime path.

2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add new mono_verifier_verify_full_table_data
	function that perform the offline metadata verification steps.

	* metadata-verify.c (verify_typedef_table): Move some checks to
	verify_typedef_table_full and make it been called by new function
	mono_verifier_verify_full_table_data.

	* pedump.c: Call mono_verifier_verify_full_table_data.

	* verify-internals.h: Export mono_verifier_verify_full_table_data as
	part of the internal API.

2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (typedef_is_system_object): Fix System.Object
	check.

	* metadata-verify.c (verify_implmap_table): Fix implmap invalid
	flags bits. SupportLastError was confused as bit 7 instead of 6.

	* metadata-verify.c (verify_implmap_table): Fix import scope verification
	to check against the module ref table instead of module.

	* metadata-verify.c (verify_implmap_table): Fix corlib check.

	* pedump.c: Call mono_image_load_names.

2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* image.c: Extract mono_image_load_names from do_mono_image_load.

	* metadata-internals.h: Export mono_image_load_names as part of
	the internal API.
	
2009-06-19  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_cleanup): Free the generic method cache
	first, as it could reference data in the other caches.

2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Finished with method header verification.

2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Added more header verification code.
	Now only EH clauses are missing.

2009-06-17  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (get_runtime_invoke_type): Don't share primitive types
	for return values.

2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Initial method header verification.

2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_import_table): The IAT contents
	might end been patched by the windows DL when running with
	coree enabled.

2009-06-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_from_typeref): If the enclosing type is not
	found return null instead of crashing. Fixes #508487.

2009-06-15  Atsushi Enomoto  <atsushi@ximian.com>

	* normalization-tables.h : updated to the latest unicode charcter
	  data.
	* appdomain.c : bump corlib version.

2009-06-14  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_from_name): Fix support for assembly references
	in the EXPORTEDTYPE table. Fixes #511704.

2009-06-13  Geoff Norton  <gnorton@novell.com>

	* domain.c: Ensure that mono_domain_assembly_open actually opens the
	assembly in the target domain.

2009-06-12  Robert Jordan  <robertj@gmx.net>

	* cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
	because "this" of the managed signature has become an
	ordinary parameter in the unmanaged signature.

2009-06-12  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h (struct _MonoGenericContainer): Add an 'image'
	field for owner-less generic containers.

	* reflection.c (mono_reflection_initialize_generic_parameter): Set the
	image field of the owner-less generic containers created here.

	* metadata.c (mono_metadata_load_generic_params): Ditto, the
	contain is ownerless until the caller sets its owner.

	* metadata.c (type_in_image): Handle owner-less generic containers
	correctly.
	
2009-06-11  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_close): Support debug_assembly_unload for
	dynamic images too.

2009-06-11 Andrés G. Aragoneses  <aaragoneses@novell.com>

	* class.c: Fix some typos in comments.

2009-06-11  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (add_custom_modifiers): Avoid reading invalid memory.

	* threads.c (mono_thread_execute_interruption): Avoid creating the
	abort exception object while holding the synch_cs lock.

2009-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify basic cattr content.

2009-06-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (add_exported_type): Don't set the FORWARDER flag on
	nested types.
	
	* reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
	support for nested types. Fixes #511704.

2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify methodspec signatures.

2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify typespec signatures.

2009-06-09  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (free_inflated_method): Call 
	mono_marshal_free_inflated_wrappers (), which was missed earlier.

2009-06-08  Miguel de Icaza  <miguel@novell.com>

	* mono-config.c: Small change to report the PPC64/ILP32 model.

2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_type): Check szarray.

2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_type): Check fnptr.

2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_type): Check generic instances.

2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_type): Check array shape.

2009-06-05  Robert Jordan  <robertj@gmx.net>

	* class.c (mono_class_create_from_typedef): Check only for
	mscorlib's System.Array.

2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_type): Check pointer, class/valuetype
	and generic params. 

	* metadata-verify.c (parse_field): Check the signature.

2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Implement locals signature check.

2009-06-04  Marek Safar  <marek.safar@gmail.com>

	* domain.c: Add .NET 4.0 Beta 1 version.

2009-06-04  Bill Holmes  <billholmes54@gmail.com>

	* cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
	  For QueryInterface on CCWs consider the base class
	  interfaces as well.

	Code is contributed under MIT/X11 license.

2009-06-04  Zoltan Varga  <vargaz@gmail.com>

	* wrapper-types.h: Delete STATIC_RGCTX_INVOKE.

	* marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
	used.

	* icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
	adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.

	* generic-sharing.c (inflate_other_data): Ditto.
	
2009-06-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Implement property signature check.

2009-06-04  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.h: Register saving support for PPC.

2009-06-04  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Fixed a pthread TLS screwup.

2009-06-04  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Do TLS using pthread API if __thread keyword is not
	supported.

2009-06-04  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Disable TLA and managed allocation if the __thread
	keyword is not supported.

2009-06-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c metadata.c: Applied patch from Ulrich Weigand 
	<uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
	the inflated method is freed. Fixes #508389.

	The code is contributed under the MIT/X11 license.
	
2009-06-03  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (get_wrapper_target_class): New helper function.
	(mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
	the <Module> class of the image. Fixes #509049.

2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
	Check if the thread was interrupted and proccess it straight away.
	Makes abortion much more responsive.

2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* threads.c (mono_thread_execute_interruption): Use atomic cas with
	MonoThread::interruption_requested to match it's counterpart.

	Fixes a hang in abort-stress-1 on a 2 core x86.

	* threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
	Fix warning.

2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>

	Change MonoImage::name_cache to be protected by the image lock
	instead of the loader lock.

	* appdomain.c (deregister_reflection_info_roots): Protect access
	to name_cache.

	* class.c (mono_image_init_name_cache): Change from the loader lock
	to the image lock. Check if the cache wasn't already created.

	* class.c: Change from the loader to the image lock.

	* icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
	the code to hold the image lock while iterating over name_cache and
	not go into mono_array_new holding it.

	* metadata-internals.h: Add a comment about this change.

2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
	Under the 2.0 profile raise the loader error.

	Fixes #508532.

2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
	of ldind opcode for generic instances so we don't fail for direct wrappers.
	This only affect direct calls.

2009-05-31  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (create_dynamic_mono_image): Fix warnings.

	* generic-sharing.c (other_info_equal): Ditto.
	
2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Implement field signature check.

2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Implement standalone signature check.

2009-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Implement methodref signature check.

2009-05-28  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h (MonoRuntimeCallbacks): New structure containing
	callbacks supplied by the runtime.

	* object.c (mono_install_callbacks): New internal function to install
	the callbacks.

	* object.c (mono_create_ftnptr): Move the implementation of this to
	mini/.

	* object.c (mono_get_addr_from_ftnptr): Ditto.	

2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (parse_return_type): Proper byref check.
	* metadata-verify.c (is_valid_method_signature): Check for zero arity
	generic signatures and method params.

2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (decode_signature_header): Fix bounds check.

	* metadata-verify.c (parse_custom_mods): Check custom mods.

	* metadata-verify.c (parse_type): Do initial basic verification
	of valid values.
	
	* metadata-verify.c (is_valid_method_signature): Parse the generic
	param count.

2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
	discarded based on their most specific definition so we set the method_slots
	array before checking if the method is acceptable or not.

	Fixes #506757.

2009-05-26  Mark Probst  <mark.probst@gmail.com>

	* icall.c: Free the old array when resizing a mono_ptr_array.

2009-05-26  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (create_dynamic_mono_image): Use mono_object_hash()
	for the hashes whose keys are managed objects.

2009-05-26  Mark Probst  <mark.probst@gmail.com>

	* object-internals.h, threads.c: Set the execution context on
	thread start here, not in corlib.

	* appdomain.c: Bump corlib version.

2009-05-27  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
	if `_mono_debug_using_mono_debugger' is set to make things work
	properly when embedding Mono.

2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_fields): Don't mark simd types as having
	16 bytes alignment as the whole runtime doesn't support.

2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (safe_read): Use endian safe read macros.

2009-05-25  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_create_ftnptr): Don't allocate from the code mempool since
	it is read-only when using full aot.

2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_method_signature): Verify parts
	of the return type. Provide an error message in case of failure.

2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (is_valid_method_signature): Verify the call conv.

2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Include the size prefix in the bounds check.

2009-05-22  Miguel de Icaza  <miguel@novell.com>

	* icall.c: Remove warnings.

	* mono-config.c: Allow for CONFIG_CPU to be set in config.h and
	prevent auto-detection based on GCC defines.

	Add PS3

	* metadata-verify.c: Do not include signal.h

	* generic-sharing.c, marshal.c: Add returns to avoid some warning
	messages.  Not sure why the g_assert_not_reached is not enough to
	quiet the compiler.
	

	* appdomain.c: Remove code that is not used when
	DISABLE_SHADOW_COPY is set.

	* image.c: use g_getenv

2009-05-21  Miguel de Icaza  <miguel@novell.com>

	* reflection.c: Remove code that it not used with
	DISABLE_REFLECTION_EMIT is defined.

2009-05-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
	invoke wrappers.

2009-05-20  Miguel de Icaza  <miguel@novell.com>

	* socket-io.c
	(ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
	the ifdef here and instead put that on io-layer

2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the generic param constraint table.

2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_generic_param_table): Fix
	thinko on the valid flags bits for generic params.

2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the methodspec table.

2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the generic param table.

2009-05-19  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Store and use the count with REMSET_VTYPE.

2009-05-19  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Use generation enum more consistently and use the
	correct generation in mono_gc_register_for_finalization().

2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the nested class table.

2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the manifest resource table.

2009-05-17  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (dis_one): Add little-endian support for ldstr.

2009-05-16  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
	wrappers, this is now done in the JIT.
	
	* class.c (mono_set_generic_sharing_supported): New internal function.
	(mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.

2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the exported type table.

2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (main): Fake an assembly for netmodules to make the verifier happy.

2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the file table.

2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_assembly_table): Fix an error message.

	* metadata-verify.c: Verify the assemblyref table.

2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_assembly_table): Fix the valid
	bits mask for flags.

2009-05-15  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (mono_method_full_name): Print generic parameters of
	generic methods as well.

2009-05-15  Geoff Norton  <gnorton@novell.com>

	* gc.c: MachO/Darwin supports and uses semaphores fine for this 
	use-case and is significantly more performant than the wapi layer.

2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the assembly table.

2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Fix rows limit check.

2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the fieldrva table.

2009-05-13  Mark Probst  <mark.probst@gmail.com>

	* sgen.c: Speed up weak links and finalizers by grouping them by
	generation.

2009-05-13  Mark Probst  <mark.probst@gmail.com>

	* marshal.c (delegate_hash_table_add): When overwriting an entry,
	free the old GCHandle (only applies to SGen).

2009-05-13  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_get_method_from_token): Avoid the expensive call to
	mono_metadata_load_generic_params () for non-generic methods.

2009-05-12  Mark Probst  <mark.probst@gmail.com>

	* monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
	New function for returning a monitor's weak link if it has one.

	* sgen-gc.c: Remove an object's monitor's weak link (if it has
	one) when clearing a domain.  These can still be around because
	the object might not have been collected.

2009-05-12  Zoltan Varga  <vargaz@gmail.com>

	* gc.c: Fix a warning.

2009-05-12  Kornél Pál  <kornelpal@gmail.com>

	* gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
	prevous wait that resulted in a deadlock on Windows when initializing
	the runtime form DllMain. Also results in improved startup time.
	(finalizer_thread): Get rid of thread_started_event.
	* threads.c, threads-types.h (mono_thread_create_internal): Return the
	resulting MonoThread.

	Contributed under MIT/X11 license.

2009-05-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the implmap table.
	Don't require that #US and #Strings be present.

2009-05-11  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Delegate checks are done at creation time,
	not a invocation time. Fix exception for Telerik Silverlight demo

2009-05-11  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c (need_remove_object_for_domain): Remove the special
	case for the Thread class.

	* threads.c: Do clean-up of abort exception/state in
	thread_cleanup() instead of Thread.free_internal().  Also clean up
	current_appcontext.  The reason we have to do that is because
	those references might point into another domain and if that
	domain is unloaded before the thread is finalized, they point to
	invalid data.

2009-05-10  Andreas Faerber  <andreas.faerber@web.de>

	* null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
	stub signatures.
	
	Contributed unter MIT/X11 license.

2009-05-09  Miguel de Icaza  <miguel@novell.com>

	* verify.c, metadata-verifier.c: Add support for disabling the
	verifier in some builds.

	[ Sorry, my previous commit accidentally commited some work in
	progress ]

2009-05-08  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_fields): Set class->field.first for
	generic instances.

2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the typespec table.

2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the module table.

2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the methodimpl table.

2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the property table.

2009-05-06  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (mono_method_desc_match): Add support for generic
	glob patterns.

2009-05-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the propertymap table.

2009-05-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the event table.

	* metadata-verify.c (search_sorted_table): Fix offset
	calculation.

2009-05-02  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.

2009-05-01  Mark Probst  <mark.probst@gmail.com>

	* gc.c (mono_gc_run_finalize): Don't set the domain too late,
	because mono_delegate_free_ftnptr() needs it.

2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the eventmap table.

2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the standalonesig table.

2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the field layout table.

2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_get_name_recurse): Don't crash
	for ownerless generic params.

	* debug-helpers.c (mono_type_get_desc): Correct the format
	for ownerless generic params.

2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the class layout table.

2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the decl security table.

2009-04-30  Mark Probst  <mark.probst@gmail.com>

	* domain.c (mono_domain_set_internal_with_options): Don't do
	anything if the old domain is the same as the old one.  Fixes
	#499326.

2009-04-30  Mark Probst  <mark.probst@gmail.com>

	* appdomain.c: Deregister the reflection_info roots when unloading
	a domain.

	* sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
	memory allocated by a domain and frees its disappearing links.

	* boehm-gc.c, null-gc.c: Empty implementation of
	mono_gc_clear_domain().

2009-04-30  Mark Probst  <mark.probst@gmail.com>

	* appdomain.c (clear_cached_vtable): Free the static fields memory
	block.

2009-04-30  Mark Probst  <mark.probst@gmail.com>

	* gc.c: Set the correct domain when invoking finalizers.

	* appdomain.c: Set the correct domain when creating threads.

2009-04-30  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Fix skip size for vectors.

2009-05-03  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_check_breakpoints): Check class init handlers even
	if we don't have any method load handers.

2009-04-30  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid 
	returning refonly assemblies if refonly is FALSE. Fixes #499013.

2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the field marshal table.

2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the custom attribute table.

2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the constant table.

2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the memberef table.

2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (get_coded_index_token): Remove
	dead argument.

2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the interfaceimpl table.

2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Improve error message.

	* debug-helpers.c (mono_type_get_desc): Harden the code that
	deals with VAR and MVAR.

2009-04-28  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes 
	part of #498692.

2009-04-23 Tom Hindle <tom_hindle@sil.org>

	* cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
	changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.

2009-04-28  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Avoid redundant checks for platform code, 
	e.g. check for method and for class (very common) and check
	for class and outer class (less common)...

2009-04-27  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c: Avoid returning random cattrs for synthetic methods.
	Fixes #498545.

2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* assembly.c: assemblies in the GAC should never be shadow-copied.

2009-04-26  Mark Probst  <mark.probst@gmail.com>

	* domain.c, domain-internals.h: Disable
	track_resurrection_{objects,handles}_hash in MonoDomain if using
	SGen.

2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the param table.

2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Range check FieldList and
	MethodList.

	* metadata-verify.c (verify_method_table): Proper check the ParamList
	field.

2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_method_table): Check for runtime
	implemented functions such as delegate .ctors. Remove spurious
	printf.
	
2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Proper initialize the runtime forcing the 2.0 profile.

2009-04-24  Raja R Harinath  <harinath@hurrynot.org>

	Don't allocate MonoGenericInfo for ownerless generic params.
	* class-internals.h (MonoGenericParam::info): Move field to ...
	(MonoGenericParamFull): ... this.  New struct.
	(MonoGenericContainer::type_params): Change type to
	MonoGenericParamFull.
	(MonoGenericParam, MonoGenericContainer): Update accessors.
	* metadata.c (mono_metadata_parse_generic_param): Don't initialize
	'info' field for ownerless generic param.
	(mono_metadata_load_generic_params): Update to changes.
	* reflection.c (mono_reflection_create_generic_class): Likewise.
	(reflection_methodbuilder_to_mono_method): Likewise.
	(mono_reflection_initialize_generic_parameter): Likewise.

2009-04-24  Raja R Harinath  <harinath@hurrynot.org>

	Don't use MonoGenericParamInfo for ownerless generic params.
	* class.c (get_anon_gparam_class, set_anon_gparam_class): New.  Don't
	use ParamInfo class at all.
	(mono_class_from_generic_parameter): Use them.
	(make_generic_param_class): Fix a couple of instances where 'pinfo
	== NULL' wasn't handle.

2009-04-24  Raja R Harinath  <harinath@hurrynot.org>

	* class.c (make_generic_param_class): Carve out of ...
	(mono_class_from_generic_parameter): ... here.

2009-04-24  Raja R Harinath  <harinath@hurrynot.org>

	Simplify mono_class_from_generic_parameter
	* class-internals.h (MonoGenericParamInfo::token): New field.
	* metadata.c (mono_metadata_load_generic_params): Initialize it
	from metadata.
	* class.c (mono_class_from_generic_parameter): Use it instead of
	searching through metadata.

2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add verification of the method table.

2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
	Delegate::Invoke optimization.

2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (mono_domain_create_appdomain_internal): Free the
	string returned by get_shadow_assembly_location_base.

	* appdomain.c (get_shadow_assembly_location_base): Add a comment
	about caller's ownership.

2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Add mono_reflection_cleanup_domain to cleanup
	reflection memory on domain unload.

	* domain.c (mono_domain_free): Don't free refobject_hash, let the
	reflection cleanup code do it.

	* domain-internals.h: Add mono_reflection_cleanup_domain.

	This fixes a memory leak for managed mirrors of reflection objects
	on domain unload. 

2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Implement more verification of the field table.

2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
	doesn't try to parse the input assembly, which can be broken.

2009-04-23  Mark Probst  <mark.probst@gmail.com>

	* boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
	sgen-gc.c: Implement track resurrection in weak GC handles in SGen
	by using the lowest bit in the link to store whether the link is
	tracked.  Move the track_resurrection hashes into boehm-gc.c.

2009-04-22  Miguel de Icaza  <miguel@novell.com>

	* Makefile.am: Split the console support in platform specific code
	and put together a framework for making this easy in the future so
	that we can start splitting code instead of having a mess of PLATFORM_WIN32

2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Fix a warning.

2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_delegate_type_equal): Compare valuetypes using
	mono_class_from_mono_type to avoid bad interactions with the dual representation
	of the generic type definition.

2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): Use mono_class_from_mono_type to
	get the MonoClass for the call context type as it might be a generic
	instance.

	Fixes #491483.

2009-04-21  Mark Probst  <mark.probst@gmail.com>

	* object-internals.h: The Thread object has no execution_context
	member anymore.

	* threads.c, threadpool.c, threads-types.h: Accessor functions for
	the execution context.

	* appdomain.c: Bump corlib version.

2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_newobj): Improve error message.

2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_clause_relationship): Only mask as an error if the exception clause
	is nested in the filter block.

	* verify.c (verify_clause_relationship): The disjoint check must verify if the exception
	block is not fully nested.

	Fixes #495656.

2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_type_compatibility_full): Compare MonoClass and
	not MonoType to check for equality of valuetypes as the generic type
	definition allows for two different encodings: the generic type definition
	class or a generic instance over the GTD arguments.

	Fixes #496175.

2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (dump_stack_value): Fix compilation with extra debug turned on.

	* verify.c (do_initobj): Improve error message.

2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Enable pe verification as the issue with #496453
	is that the authenticode data directory have a different unspecified
	format. Ignore it for now.

	* pedump.c: Run the metadata verifier together with the IL verifier.

	Fixes ##496453.

2009-04-20  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* metadata-verify.c: Temporarily disable pe verification due to #496453.

2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (can_access_type): Check visibility against
	the element type for pointers and arrays.

	Fixes #496150.

2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Fix cli and table verification to use information
	from the MonoImage. A lot of duplicated code got killed.

2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>


	This patch starts to integrate the metadata verifier with the runtime code.

	This patch causes major regression in functionality for the metadata verifier
	as cli and table verification are disabled since they require to be ported to
	use MonoImage information.

	* image.c (do_mono_image_load): Split the code in this function
	into mono_image_load_pe_data and mono_image_load_cli_data.
	Add	care_about_pecoff parameter to not load pecoff data.
	Call into the metadata verifier for pecoff and cli verification.

	* image.c (mono_image_open_raw): New function that doesn't perform
	any parsing of the image contents.
	
	The reason for the 3 new functions is to give pedump better control
	into the interaction with the verifier.

	* metadata-internals.h: Add new functions from image.c as part of the
	internal mono API.

	* metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
	mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
	to make those functions work together with the runtime.

	* verify.c: Add mono_verifier_is_enabled_for_image function that returns
	true if the image needs to be verified.

	* verify-internals.h: Export new functions from metadata-verify.c and verify.c.

	* pedump.c: Use new metadata verifier API.

2009-04-19  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_install_vtable_trampoline): Make this receive a
	trampoline creation function instead of trampoline, allowing the JIT
	to use a different trampoline for each vtable.

2009-04-18  Mark Probst  <mark.probst@gmail.com>

	* object.c (mono_raise_exception): Don't reset the thread abort
	exception state here.

2009-04-18  Mark Probst  <mark.probst@gmail.com>

	* icall-def.h: New icall for getting the thread abort exception
	state for a thread.

	* object.c, thread.c, object-internals.h: A thread's abort
	exception state is now a GC handle.  To get the object it stands
	for, we must move it into the current app domain, if it's
	different than the one where it originated from.

	* appdomain.c: Bump corlib version.

	* domain.c, domain-internals.h: New function for setting the
	domain and migrate the thread abort exception or not.

2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add initial verification of the
	field table.

2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add a macro to conditionally enable
	dumping of verification information. Add  make_coded_token
	and search_sorted_table to enable search sorted tables
	by a given coded token.

2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add array mapping from table index
	to description offset. Add get_col_offset and get_col_size
	functions.

2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add remaining table descriptions offsets.
	Add remaining coded index descriptions.

2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Fixed constant table description.
	Fixed calculation of HasCustomAttribute coded index size.
	Fixed calculation of size for many table indexes. 

2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (dump_metadata): Dump table offset instead
	of useless pointer in memory.

2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Add tests for MethodList.

2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Add tests for FieldList and
	a missing of for interface types.

2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_pe_optional_header): Add comment of why
	the code is commented.

	* metadata-verify.c (verify_resources_table): Remove spurious printf
	and don't fail if there are unmanaged resources. Gmcs generates a useless
	one	for all assemblies - I bet it's some MS compatibility junk.

2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Verify the extends field.

	* metadata-verify.c (mono_image_verify): Add a is_corlib.

	* verify-internals.h: Same.

	* pedump.c: Fix for mono_image_verify new signature.

2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_typedef_table): Verify for some invalid
	flags combinations.

2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_module_table): Ignore the generation field.

2009-04-15  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c
	(mono_debug_symfile_lookup_location): Don't print a warning for
	unknown extended opcodes if they're within 0x40 and 0x7f.

2009-04-15  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
	invoke signatures returning an enum. Fixes #494847.

2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Initial code to verify the typedef table.

2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Don't fail if an unconditional branch
	with non empty stack happens before the beginning of a try block.

	Fixes #494812.

2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify typename and typenamespace fields of
	the typeref table.

2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Initial code to verify the typeref table.

2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_delegate_compatibility): Fix error message.

2009-04-14  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Fix typo

2009-04-14  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (delegate_hash_table_add): Make delegate_target_locations 
	a MonoGHashTable to keep its values alive.
	(emit_marshal_boolean): Fix a warning.

2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: don't return IPv4/IPv6 addresses if the machine does
	not have any interface configured for IPv4/IPv6.

2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* assembly.c: fix typo in error message.

2009-04-14  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
	allocating the location holding the this argument to prevent
	'too many root sets' errors.

	* object.c (mono_class_create_runtime_vtable): Set field->offset to -1
	to mark fields as special static.
	(mono_field_static_get_value): Handle special static fields.
	(mono_field_static_set_value): Ditto.

	* class-internals.h (struct _MonoClassField): Document this.

2009-04-13  Bill Holmes  <billholmes54@gmail.com>

	* cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
	  the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
	  case.  This will handle when managed code returns null to native code.

	Code is contributed under MIT/X11 license.

2009-04-13  Bill Holmes  <billholmes54@gmail.com>

	* object.c (build_imt_slots): Changing a free to a g_free to match
	  the g_malloc0 in add_imt_builder_entry that allocated this memory.

	Code is contributed under MIT/X11 license.

2009-04-13  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (emit_marshal_boolean): Adding code to ensure that
	  the correct TRUE value is passed through the marshaling layer.

	Code is contributed under MIT/X11 license.

2009-04-13  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
	correctly. Fixes #492330.
	
	* marshal.c: Fix the embedding of object pointers into JITted code in
	the native-to-managed wrappers by allocating some GC tracked memory, and
	embedding the address of that.

2009-04-11  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
	pointers into the vtable.

2009-04-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.

	* verify.c (verify_ldftn_delegate): Improve error message.

2009-04-09  Raja R Harinath  <harinath@hurrynot.org>

	* reflection.c (my_mono_class_from_mono_type): Remove.

2009-04-09  Raja R Harinath  <harinath@hurrynot.org>

	Prepare to reduce memory usage of owner-less generic parameters (1/n)
	* class-internals.h (MonoGenericParam): Carve out pklass, name, flags
	and constraints fields into ...
	(MonoGenericParamInfo): ... this.
	(mono_generic_param_info, mono_generic_container_get_param_info):
	New accessors.
	* class.c, debug-helpers.c, icall.c: Update to changes.
	* metadata.c, reflection.c, verify.c: Likewise.

2009-04-09  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.

	* marshal.c (get_runtime_invoke_type): Share enums with their base types.
	
	* marshal.c (get_runtime_invoke_type): Share pointers with ints and
	booleans with sbytes.

2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (can_access_instantiation): Verify accesibility of element types
	for arrays and pointers.

	* class.c (can_access_type): Return true if the target class is VAR or MVAR.

	* class.c (mono_method_can_access_method_full): Fix typos in the documentation.

	Fixes #493068.

2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): Improve error messages.

2009-04-08  Bill Holmes  <billholmes54@gmail.com>

	* verify.c:  Fixing the MSVC build.

	Code is contributed under MIT/X11 license.

2009-04-08  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Simplify get_reflection_caller not to call
	mono_method_get_last_managed (another stack walk) and adjust the
	callers to handle a (should not happen) NULL return value.

2009-04-08  Raja R Harinath  <harinath@hurrynot.org>

	Add accessors to some MonoGenericParam fields
	* class-internals.h (mono_generic_param_owner): New accessor.
	(mono_generic_param_num): Likewise.
	(mono_type_get_generic_param_owner): New helper.
	(mono_type_get_generic_param_num): New helper.
	* class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.

2009-04-08  Raja R Harinath  <harinath@hurrynot.org>

	* class-internals.h (mono_generic_container_get_param): New wrapper.
	* class.c, icall.c, metadata.c, verify.c: Use it.

2009-04-08  Raja R Harinath  <harinath@hurrynot.org>

	Fix gtest-252.cs
	* verify.c (mono_type_is_valid_type_in_context): Rewrite to use
	the standard case/loop.  In particular, don't complain about
	references to generic type definitions.

2009-04-07  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (dis_one): Decode string arguments.

2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (dump_verify_info): Dump type name correctly.

2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
	are larger than code size.

	This can happen in valid code if the try/catch block is not followed by any instruction
	and do a backward branch on the leave instruction.

	Fixes #492494.

2009-04-06  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Fix typo while comparing second method names
	in can_avoid_corlib_reflection_delegate_optimization

2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_throw): Don't allow an unboxed generic param ar argument.

	Fixes #487738.

2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
	a MVAR using a class context.

	Fixes #490335.

2009-04-06  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_compute_gc_descriptor): Make this non-static.

	* domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.

	* gc-internal.h (MonoGCCallbacks): New stucture containing the callback
	functions supplied by the JIT for the SGEN GC.

	* sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
	
2009-04-06  Massimiliano Mantione  <massi@ximian.com>

	monitor.c (mono_monitor_try_enter_internal):
	Added calls to profile monitor contentions.
	Also duplicated a small piece of code (the "get the monitor" logic)
	from the fast path to the slow path, and changed the relevant goto
	statements, so that monitor acquisition events can be emitted from the
	slow path (this is by Paolo Molaro).

2009-04-06  Massimiliano Mantione  <massi@ximian.com>

	* profiler.c, profiler.h, profiler-private.h:
	Added support for profiling monitor contentions.

2009-04-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the modules table.

2009-04-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
	using the context of the method been verifier and not of the method been called.

	* verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
	safely inflate generic types. 

2009-04-02  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Change the strategy for checking the 
	"reflection using delegates optimization" to avoid unneeded 
	attributes in multiple class libraries.

2009-04-02  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Remove object element in the disappearing link struct
	by storing the object pointer in the link.

2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (dump_verify_info): Don't crash if signature decoding fails.

2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verifier_load_field): Fail if the field parent could not be loaded.

	* verify.c (mono_method_verify): Do proper bounds checking of exception
	clause ranges.

2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_field_from_token): Don't crash if the field parent could
	not be decoded.

2009-03-31  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Execute critical finalizers after ordinary
	finalizers.

	* class-internals.h, domain.c: Add CriticalFinalizerObject to
	mono_defaults.

2009-03-31 Jb Evain <jbevain@novell.com>

	* verify.c (do_ldstr): don't check if a string is in the user strings
	heap if the current image is dynamic.

2009-03-31  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Wait until the last finalizer has executed when
	returning from WaitForPendingFinalizers.

2009-03-31  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerEvent): Add
	`MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
	`MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
	(mono_debugger_event_create_appdomain): New function.
	(mono_debugger_event_unload_appdomain): New function.

	* appdomain.c (mono_domain_create_appdomain_internal): Call
	mono_debugger_event_create_appdomain().

2009-03-31  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_register_class_init_callback): Also register the
	class init callback if the class is already initialized to make
	things work with shadow copied assemblies.

2009-03-31  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c
	(mono_security_core_clr_ensure_reflection_access_field): Let 
	critical code access the field (just like we do for methods). Use
	check_field_access helper.
	(mono_security_core_clr_ensure_reflection_access_method): Use 
	check_field_access helper.

2009-03-31  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Remove data (callback) element from FinalizeEntry and
	call the run-finalize function directly.

	* gc.c, gc-internal.h: Make run_finalize() non-static.

2009-03-31  Mark Probst  <mark.probst@gmail.com>

	* sgen-gc.c: Use a separate struct for disappearing links.

2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: don't fail if the SocketOptionsFlag has Partial or
	* MaxIOVectorLength enabled, just ignore them.
	Fixes bug #349688.

2009-03-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Fix eglib build.

2009-03-30  Zoltan Varga  <vargaz@gmail.com>

	* threads-types.h: Fix the win32 build.

2009-03-28  Sebastien Pouliot  <sebastien@ximian.com>

	* class.c: move coreclr inheritance/override checks to 
	security-core.clr.c
	* security-core.clr.c|h: add code from class.c with additional
	documentation. Fix override check when the method is not critical.

2009-03-28  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (mono_method_desc_match): Make '*' match anything.
	(match_class): Ditto.

2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.

	* metadata-verify.c: Implement table layout row size calculation. Verify
	the total size of the tables.

2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify heap sizes and size to decode row counts. 

2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c:
	* console-io.[ch]: added new mono_console_init() to make sure that
	file descriptors 0, 1 and 2 are opened.
	Bug #489019 fixed.

2009-03-27  Sebastien Pouliot  <sebastien@ximian.com> 

	* appdomain.h: Export a new callback type and a new function to
	set this callback. This allow a mono host to provide it's own
	definition for "platform code".
	* metadata-internals.h: Add a core_clr_platform_code flag on 
	_MonoImage to (cache and) know if it is representing platform 
	code.
	* image.c (do_mono_image_open): Set core_clr_platform_code flag 
	on platform code images.
	* security-core-clr.c|h	
	(mono_security_set_core_clr_platform_callback): Allow the host
	to provide it's own platform check definition.
	(mono_security_core_clr_determine_platform_image): Detect if an 
	image is platform code (using the specified callback).
	(mono_security_core_clr_is_platform_image): Return cached value 
	for platform code.

2009-03-27  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_create_thread): New helper function to wrap CreateThread
	which has different parameter types for the 'tid' argument in windows and
	the io-layer.

	* appdomain.c attach.c threads.c: Use the new helper.

2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify valid table bits.

2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_metadata_header): Store size in the size field.

	* metadata-verify.c: Add initial table schema verification.

2009-03-26  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
	obtain the refclass argument needed by mono_param_get_objects (). Fixes
	#488383.

	* reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.

	* appdomain.c (MONO_CORLIB_VERSION): Bump this.

2009-03-26  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c: Add/update documentation

2009-03-26  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_object): Generate code to throw an exception
	instead of throwing it. Fixes #488670.

2009-03-25  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Bump MONO_CORLIB_VERSION to 73.
	* icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
	an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
	and add a call to mono_security_core_clr_ensure_delegate_creation
	to do the extra checks required by CoreCLR.
	* security-core-clr.c|h: Add function to check delegate creation,
	both in the binding and accessibility, under CoreCLR.

2009-03-25  Sebastien Pouliot  <sebastien@ximian.com> 

	* reflection.c (mono_reflection_create_dynamic_method): when 
	coreclr is enabled make sure that every resolved object are
	checked (e.g. field and method access).
	* security-core-clr.c|h: Add function to check objects resolved
	when a dynamic method is created.

2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Cache directory rva translations.

	* metadata-verify.c: Add cli-header and streams verification.

2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
	the wrong offset (8 instead of 6).

2009-03-23  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
	methods, return the native function address itself. Fixes
	#487758.

2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* console-io.c: some of the values for control characters might not be
	present.

2009-03-21  Sebastien Pouliot  <sebastien@ximian.com>

	* exception.c|h: Add helpers to create [Field|Method]AccessException
	* icall.c: Add required coreclr check calls for field reflection.
	Move the existing (method) check logic into security-core-clr.c
	* security-core-clr.c: Add functions to check if the access of a
	field or method is allowed when reflecting under coreclr. This is
	mostly done using a stack walk to find the "real" caller: i.e. the
	code that is calling the reflection

2009-03-20  Zoltan Varga  <vargaz@gmail.com>

	* gc-internal.h: Change location of gc_wrapper.h

2009-03-20  Sebastien Pouliot  <sebastien@ximian.com> 

	* class.c: Simplification to coreclr checks for overrides that
	makes it easier to set breakpoints.

2009-03-20  Sebastien Pouliot  <sebastien@ximian.com>

	* security-core-clr.c|h: (mono_security_core_clr_class_level, 
	mono_security_core_clr_method_level): Avoid potential 
	MonoCustomAttrInfo allocation for transparent assemblies (e.g. 
	user/application code) and make it easier to set breakpoints

2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Reject cli header tables that mono don't handle.

2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Fix CLI header dumping.

2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: More CLI header verification.

2009-03-19  Zoltan Varga  <vargaz@gmail.com>

	* locales.c (get_current_locale_name): Use g_malloc instead of malloc.

2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Initial verification of the CLI header.

2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (verify_resources_table): Fix verification of zero
	sized resource section and id entries count.

2009-03-18  Zoltan Varga  <vargaz@gmail.com>

	* icall.c: Handle user types in many Type icalls. Fixes #486303.

2009-03-17  Jb Evain  <jbevain@novell.com>

	* profiler.c: call mono_gc_base_init from mono_profiler_load.

2009-03-17  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
	(mono_gc_make_descr_for_array): Ditto.

2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>

	* verify.c (mono_verifier_is_class_full_trust): Add support for
	CoreCLR security mode where trusted assemblies are defined as
	"platform code".

2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add minimal PECOFF resource verification.

2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Be less restrictive with some coff fields.

2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (init_stack_with_value_at_exception_boundary): Init generic
	params as boxed values on stack. Fixes #485706.

2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* console-io.c: the termios values may vary in different flavors of unix.

2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* console-io.[ch]: return the entire set of control characters when
	initializing the terminal.
	* appdomain.c: bump corlib version.

Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>

	* mono-perfcounters.c: added support for in-process custom
	performance counters.

2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Small cleanup and add comment for IAT directory entry. 

2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify the data pointed by the import table. 

2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c (load_data_directories): Store data
	directory contents.

	* metadata-verify.c: Verify the import table. 

2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Verify data directories.

2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Check section header flags.

2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: if the assembly name is a shadow-copied file, return
	TRUE from mono_is_shadow_copy_enabled but don't actually do anything
	in mono_make_shadow_copy.
	* icall.c: if the assembly name is a shadow-copied file, replace it
	with the original assembly path.

	Bug #484244 fixed. NUnit tests for corlib can be run without
	--noshadow now.

2009-03-12  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
	entries when the table is reallocated.

	* icall.c: Allocate the memory used by the mono_ptr_array macros using
	mono_gc_alloc_fixed () since it contains GC refs.

2009-03-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (ensure_complete_type): New helper function to call
	type resolve handlers for unfinished dynamic types.
	(resolve_object): Call it for MonoClassFields. Fixes #483852.

2009-03-09  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
	#483247.

2009-03-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (get_shadow_assembly_location): Fix memleak.

2009-03-08  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (struct _MonoDomain): Add new hash tables mapping
	between GCHandles of type WeakTrackResurrection and the objects they
	point to.

	* gc.c: Partly implement the sematics of GCHandles of type 
	WeakTrackResurrection: these handles should only be cleared after the
	finalizer of the object they are pointing to has ran.

2009-03-06  Mark Probst  <mark.probst@gmail.com>

	* icall.c: Partially revert r126631 because using the jump
	trampolines for generic shared methods makes it superfluous.

2009-03-06  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (handle_store): Create the 'threads' hash table with the proper
	MONO_HASH_VALUE_GC type.

2009-03-05  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
	FIRST_GC_TRACKED.

	* domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
	and LAST_GC_TRACKED as a GC root.

	* gc-internal.h: Fix the comment of mono_gc_alloc_fixed.

	* object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
	the static data even if it consists of 1 reference.

	* boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
	if there is a GC descriptor.

	* reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
	instead of through the GC since they contain no object references.

2009-03-05  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c (instantiate_other_info): Always return a jump
	trampoline for method code.

2009-03-05  Marek Habersack  <mhabersack@novell.com>

	* culture-info-tables.h: generated to include the en-tt culture.

2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
	capture the thread context.

	* object.c (mono_async_result_new): Cache the invoke wrappers to
	ExecutionContext::Capture.

2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.h: Add a prototype for what mono_compile_method returns
	for invoke wrappers.

	* gc.c: Use the new prototype declaration.

2009-03-04  Geoff Norton  <gnorton@novell.com>

	* boehm-gc.c: Add some MONO_LOG tracing for the GC
	* gc-internal.h:
	* mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.

2009-03-04  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(mono_debugger_runtime_invoke): Removed.

	* mono-debug-debugger.c
	(mono_runtime_invoke): Moved into ../mini/debug-mini.c.

2009-03-02  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(mono_debugger_unhandled_exception): Removed.
	(mono_debugger_handle_exception): Removed.
	(mono_debugger_throw_exception): Removed.

	* mono-debug.c
	(mono_debug_debugger_version): Bump to 5.

	* mono-debug-debugger.c: Moved the exception handling code to
	../mini/debug-mini.c

2009-03-03  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (struct _MonoDomain): Add a separate lock for the
	finalize_objects_hash.

	* gc.c: Use the separate lock to access the finalize_objects_hash field.
	
	* domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
	field.

	* metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
	cache.

	* image.c (mono_image_close): Free it.
	
	* marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
	allowing a creation of a wrapper which invokes its method using a CALLVIRT
	on the this argument.

	* gc.c (run_finalize): Optimize the calling of the finalizers.

2009-03-03  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
	of the `MonoGenericInst' changes.

2009-03-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_MonoType_GetGenericArguments): Use
	mono_array_class_get_cached to reduce locking contention. Extract
	a domain var.

	* icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
	intermediary managed arrays. Use caching version of mono_array_new
	to allocate the result array.

	* icall.c (ves_icall_Type_GetEvents_internal): Same.	

	* icall.c (ves_icall_Type_GetNestedTypes): Same.	

	* locales.c (create_names_array_idx):  Use mono_array_new_cached
	to reduce locking contention.

2009-03-03  Zoltan Varga  <vargaz@gmail.com>
		
	* object.c (mono_method_add_generic_virtual_invocation): Put back the
	thunk builder code for the non-interface case.

2009-03-02  Zoltan Varga  <vargaz@gmail.com>

	* object.c (get_generic_virtual_entries): New helper function to collect
	the virtual generic method instances which need to be added to an IMT
	thunk.
	(mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
	Instead of creating a new IMT thunk, reset the vtable slot to the
	trampoline, the thunk will be created the next time the trampoline is called.
	(build_imt_slots): Add support for virtual generic methods in interfaces by
	adding to the IMT thunk all the methods registered using 
	mono_method_add_generic_virtual_invocation ().

	* object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
	(struct _MonoIMTCheckItem): Ditto.

	* object.c (mono_method_add_generic_virtual_invocation): Take a
	MonoMethod argument instead of a MonoGenericInst. Fix the construction of
	the IMT thunk to include all items.
	
	* object.c (mono_class_create_runtime_vtable): Add a missing
	mono_loader_unlock ().

2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* object-internals.h (MonoReflectionEvent): Add cached_add_event.

2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h: Rename _MonoReflectionEvent to
	MonoReflectionMonoEvent so it reflects the right managed type.
	Add a MonoReflectionEvent that correctly represents System.EventInfo.

	* icall.c:
	* reflection.c: Adjust code to use the new MonoReflectionMonoEvent
	type.

2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
	intermediary managed arrays. Use caching version of mono_array_new
	to allocate the result array.

2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Use cached version of mono_array_new alongside
	the mono_reflection_get_custom_attrs_by_type call path.

2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
	intermediary managed arrays. Use caching version of mono_array_new
	to allocate the result array.

	* icall.c (ves_icall_Type_GetConstructors_internal): Same.

2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Add small implementation of a growable stack bound array.

	* icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.

	* icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
	intermediary managed arrays. Use caching version of mono_array_new
	to allocate the result array.

2009-02-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: New icall ves_icall_System_Enum_compare_value_to that
	helps Enum::CompareTo to be implemented without reboxing all enums
	to their underlying type.
2009-02-27  Zoltan Varga  <vargaz@gmail.com>

	* domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
	since it acquires a global lock leading to scalability problems.

	* profiler.c: Make the stat profiler work with multiple appdomains, this
	currently only works when no appdomains are unloaded.

2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: make the check to avoid copying when the assembly is
	already shadow copied actually work.

2009-02-26  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* object-internals.h (struct _MonoReflectionGenericClass): Sync with
	changes to the managed side.

2009-02-25  Zoltan Varga  <vargaz@gmail.com>

	* metadata-internals.h (struct _MonoImage): Add a new cache for szarray
	classes + a separate lock for it, as it is used frequently at runtime, not
	just during metadata loading/JIT compilation.

	* class.c (mono_bounded_array_class_get): Use the separate cache + lock
	for szarrays.
	
	* object-internals.h (mono_class_from_name_cached): New macro to cache
	the results of the lookup locally without having to declare a static
	variable to hold it.
	(mono_class_get_field_from_name_cached): Ditto.
	(mono_array_class_get_cached): Ditto.

	* threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
	the new macros.
	
	* object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
	slower search in metadata.

	* pedump.c: Fix a warning.

2009-02-23  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (encode_locals): Add checks for user types.
	(method_encode_clauses): Ditto.
	(method_encode_code): Ditto.
	(mono_image_create_token): Ditto.

	* object-internals.h: Change the type of more fields from MonoReflectionType*
	to MonoObject*.

2009-02-22  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_suspend_all_other_threads): Handle the case when
	the a thread does not suspend within 100ms.

	* monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
	in addition to StopRequested as well.

	* mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.

	* debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
	search the method_hash before inserting a new entry, to avoid crashes when
	the same method is inserted multiple times, causing the old 
	MonoDebugMethodInfo structure to be freed by the value dtor function.

2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
	SO_EXLUSIVEADDRUSE where available.

2009-02-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
	runtime invoke wrappers, this time it is string ctor wrappers, which
	pass a dummy string as 'this' instead of their obj argument. Fixes
	#478473.

2009-02-21  Jb Evain  <jbevain@novell.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
	only get create_culture once.

2009-02-20  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_setup_internal_class): Move the user type
	check before the locking.
	
	* reflection.c (mono_reflection_setup_internal_class): Check for user types.
	(mono_reflection_create_runtime_class): Ditto.
	(mono_reflection_sighelper_get_signature_local): Ditto.
	(mono_reflection_sighelper_get_signature_field): Ditto.

	* object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
	is a System.MonoType object or similar.
	(monotype_cast): New helper function to cast a MonoObject to a 
	MonoReflectionType object.

	* object-internals.h: Change MonoReflectionType* members in structures to
	MonoObject* members to force the usage of the monotype_cast () function.

	* reflection.c icall.c: Use monotype_cast () for accessing Type members of
	structures/arrays. This causes us to assert instead of crashing when 
	instances of user defined subclasses of System.Type are encountered.

2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* cil-coff.h:
	* icall-def.h:
	* icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
	win32 resource loaded from a PE file.

	* image.c: fix mono_image_lookup_resource.

2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* icall-def.h:
	* threads-types.h:
	* threads.c: added internal call for WaitHandle.SignalAndWait.

2009-02-19  Bill Holmes  <billholmes54@gmail.com>

	* cominterop.c : Adding cominterop_type_from_handle and 
	  registering it as an icall.  Replacing all references
	  to type_from_handle.

	Code is contributed under MIT/X11 license.

2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* Makefile.am: Add lock-tracer.h and lock-trace.c.

	* appdomain.c: Call the tracer init function.

 	* domain-internals.h: Enable the tracer for the domain locks.

	* image.c: Enable the tracer for image locks.

	* loader.c: Enable the trace for the loader lock.

	* lock-tracer.h:
	* lock-tracer.c: Initial implementation of the lock trace utility.
	The tracer requires a compile time define to be enabled and a env var
	to be enabled at runtime.

2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* domain.c (mono_domain_code_foreach): Improve documentation.

2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c:
	* generic-sharing.c:
	* object.c:
	* reflection.c:  Adjust locking order to the new semantics where the loader lock
	comes first.

2009-02-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* domain.c: Add mono_domain_code_* functions that perform locking
	around the domain codeman.

	* domain-internals.h: Export those functions.

	* object.c: Use new functions instead of acquiring the domain lock.

2009-02-19  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
	delegate. Fixes #477396.

2009-02-18  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (create_custom_attr): Get rid of alloca.

2009-02-18  Bill Holmes  <billholmes54@gmail.com>

	* cominterop.c (cominterop_get_managed_wrapper_adjusted) :
	  Adding exception handling for all CCW calls.

	Code is contributed under MIT/X11 license.

2009-02-18  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_init): Remove the unused reflection mutex.

	* marshal.c (emit_marshal_boolean): Add null checks to the new 
	native->managed marshalling code. Fixes #476247.

2009-02-17  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_vtable_entry): Move the addition of
	static rgctx invoke wrappers for vtable methods here, this simplifies
	a lot of code and causes fewer rgctx wrappers to be created.

	* marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
	name of the statistics to begin with an uppercase.

2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Revert previous change as it breaks the build.
	
2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Properly handle SZARRAY element type.

	Fixes #474271.

2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_create_method_token): Correctly encode
	MethodDef MemberRefParent token.

	Fixes #472845.

2009-02-17  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_close): Delete the critical section before
	freeing the memory holding it.

2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): rethrow opcode doesn not fall through.
	Fixes #476257.

2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (main): Call mono_marshal_init so pedump
	doesn't crash.

2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (method_from_memberref): Properly fix #474271 and
	don't break the runtime bad.

2009-02-16  Zoltan Varga  <vargaz@gmail.com>

	* domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
	(mono_domain_alloc0): Ditto.

2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (method_from_memberref): Don't abort if the array
	method is not found. A regular loader failure is more informative
	and correct.

	Fixes #474271.

2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>

	*loader.c: Guard MonoImage::method_cache/methodref_cache
	using the image lock instead of the loader lock.

	* metadata.h: Add comments about which fields are protected by
	the image lock.

2009-02-16  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.

	* generic-sharing.c (mono_method_construct_object_context): Remove the
	wrapper_type == NONE assert, it is not needed.

2009-02-15  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (clear_cached_object): New helper function.
	(mono_method_clear_object): New function to clear the cached reflection
	objects for a dynamic method.

	* object.c (mono_runtime_free_method): Call mono_method_clear_object ().
	Partly fixes # 463323.
	
2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c:
	* loader.c:
	* reflection.c: Remove all explicit uses of MonoImage::property_hash.

2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* image.c: Add mono_image_property_(lookup,insert,remove) functions that
	take the image lock instead of the loader lock.

	* metadata-internals.h: Export new functions.

2009-02-12  Miguel de Icaza  <miguel@novell.com>

	* domain.c (app_config_parse): Remove another use of stat that is
	not necessary as g_file_get_contents already does the presence
	check. 

2009-02-13  Zoltan Varga  <vargaz@gmail.com>

	* cominterop.c icall-def.h: Fix the DISABLE_COM build.

	* marshal.c: Move the bstr handling code to cominterop.c.

	* marshal.c: Remove some COM interop code missed previously.

2009-02-12  Miguel de Icaza  <miguel@novell.com>

	More Paolo patches from the Wii port:
	
	* security.c: Remove ves_icall_System_Environment_get_UserName
	from here.

	* icall.c: And put ves_icall_System_Environment_get_UserName
	here. 

	* appdomain.c (mono_set_private_bin_path_from_config): Remove
	redundant call to stat that was only used to test for the file
	existence.   Patch from Paolo.

	* gc.c (run_finalize): If COM is disabled, do not link in
	mono_marshal_free_ccw.

	* generic-sharing.c: Use alloca.h here as well.

2009-02-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.

2009-02-13  Zoltan Varga  <vargaz@gmail.com>

	* cominterop.c cominterop.h: New files.

	* marshal.c: Move the COM interop related code to cominterop.c. Make a few
	function/typedefs which are needed by cominterop.c global.

2009-02-12  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Don't take the loader lock to guard image
	mempool allocs.

2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_lookup_dynamic_token): This function might be
	called without the loader lock which is required to guard MonoImage:tokens.

2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c:
	* metadata.c:
	* method-builder.c:
	* marshal.c:
	* reflection.c: Don't take the loader lock to alloc memory from the image mempool.

2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
	Rework the code to use regular mono_image_alloc/0.

	* loader.c: Rework the code to use regular mono_image_alloc/0.

	* metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.

2009-02-12  Bill Holmes  <billholmes54@gmail.com>

	* object-internals.h : Fixing a typo in the 
	  MonoReflectionComVisibleAttribute struct.

	* marshal.c (cominterop_com_visible): Check the implemented 
	  interfaces for ComImport.

	* marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls 
	  assume that bools should be treated as VARIANTBOOLs.

	* marshal.c (emit_marshal_boolean): Adding cases for 
	  MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.

	* marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to 
	  emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.

	* marshal.c (cominterop_get_ccw): For COM calls assume that bools
	  should be treated as VARIANTBOOLs.	

	Code is contributed under MIT/X11 license.

2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
	allocation with the image lock.

2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>

	This patch is the last of a series to remove explicit reference of MonoImage::mempool
	and use mono_image_alloc set of functions instead. This time we finish with reflection.c

	* object.c: Add mono_string_to_utf8_image.

	* object-internals.h: Export mono_string_to_utf8_image.

	* reflection.c: Rework all explicit references to the the image mempool to go thought
	the mono_image_alloc set of functions.

2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>

	This patch is the third of a series to remove explicit reference of MonoImage::mempool
	and use mono_image_alloc set of functions instead. This time we finish with marshal.c
	and generics-sharing.c.

	* generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
	as first argument. Note that this function remains broken as it doesn't perform locking around the
	mempool allocation.

	* generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.

	* image.c: Add g_slist_append_image.

	* metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
	the supplied image for allocation. Move code into mono_metadata_field_info_full.

	* metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
	Fix all related code to do the same.

	* marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.

	* metadata-internals.h: Fix the signatures.

2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>

	This patch is the second of a series to remove explicit reference of MonoImage::mempool
	and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
	and similar to work using MonoImage.

	* class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
	MonoMemPool.

	* class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.

	* class.c (mono_metadata_signature_deep_dup): Same.

	* class.c (inflate_generic_type): Same.

	* class.c (mono_class_inflate_generic_type_with_mempool): Same.

	* metadata.c (mono_metadata_signature_dup_full): Same.

	* metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from 
	mono_metadata_signature_dup_full.

	* metadata.c (mono_metadata_type_dup): Same.

	* marshal.c: Pass the image to calls to mono_metadata_type_dup.

	* reflection.c: Same.

	* generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.

	* metadata-internals.h: Fix the signatures.

	* class-internals.h: Same.

2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>

	This patch is the first of a series to remove explicit reference of MonoImage::mempool
	and use mono_image_alloc set of functions instead. 

	* class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
	Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
	of a MonoMemPool.

	* class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.

	* class.c (g_list_prepend_mempool): Removed.

	* class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.

	* image.c: Add g_list_prepend_image.

	* metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.

	* reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.


2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
	mono_image_unlock.

	* image.c (mono_image_init): Init the lock field.
 
	* image.c (mono_image_init): Cleanup the lock field.

	* image.c: Add mono_image_(un)lock functions.

2009-02-11  Mark Probst  <mark.probst@gmail.com>

	* class.c, class-internals.h: mono_method_get_context_general()
	combines the functionality of mono_method_get_context() and
	mini_method_get_context().

	* generic-sharing.c, domain-internals.h:
	mono_method_construct_object_context() and
	mono_domain_lookup_shared_generic() moved from mini.

	* icall.c (ves_icall_InternalInvoke): Handle the case where the
	method doesn't have the correct instantiation because it's shared
	generic code.  Fixes #473999.

2009-02-11  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.

	* loader.c (mono_loader_lock): Add a comment pointing to the locking document.
	
2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.

	* metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.

	* loader.c (mono_get_method_full): Drop the loader lock while constructing the method
	and recheck the cache for dups after it.

	* loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.

	Fixes one of the deadlocks found in #473150.

2009-02-11  Bill Holmes  <billholmes54@gmail.com>

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
	  For Win32, add additional break conditions for accept.

	Code is contributed under MIT/X11 license.

2009-02-10  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
	lazily initialize the native wrapper cache.
	(mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
	cache, since they are different from the normal wrappers.

	* image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.

	* metadata-internals.h (struct _MonoImage): Add a new wrapper for
	AOT compiled native wrappers.

2009-02-09  Geoff Norton  <gnorton@novell.com>

	* appdomain.h:
	* security-core-clr.c: Allow enabling core-clr from the embedding
	API.

2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: when requesting all the local ips, if there are no
	interfaces up and running, MS returns 127.0.0.1.

2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* mono-perfcounters-def.h: processor time is an inverse time.
	Fixes bug #468625.

2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* socket-io.c: an empty host name returns the list of local IPs.
	Fixes bug #386637 part 1/2.

2009-02-07  Zoltan Varga  <vargaz@gmail.com>

	* verify.c (mono_class_interface_implements_interface): Call
	mono_class_setup_interfaces ().
	(merge_stacks): Ditto.

2009-02-06  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_interfaces): New function to lazily initalize
	klass->interfaces.
	(mono_generic_class_get_class): Don't initalize klass->interfaces.
	(mono_generic_class_get_class): Ditto.

2009-02-06  U-QUACK\miguel  <miguel@quack>

	* icall-defs.h: Include also the Encrypt/Decrypt string methods as
	they live in security.c

	* debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
	another bit from Paolo's code.

2009-02-06  Zoltan Varga  <vargaz@gmail.com>

	* object.c (build_imt_slots): Add a small optimization to avoid inflating
	methods which will be discarded by add_imt_builder_entry ().

	* marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
	need to be boxed.

	* loader.c: Add a statistics for the size of the memberref signature cache.
	
	* loader.c (find_cached_memberref_sig): New helper function.
	(cache_memberref_sig): Ditto.

	* loader.c: Cache the result of parsing memberref signatures, since otherwise
	they will be parsed again for every generic instantiation, leading to unbounded
	memory growth.

2009-02-05  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_get_method_from_token): Avoid creating class for the generic
	parameters of generic methods.

	* class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
	after the original method is copied to the inflated method.
	(mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.

	* class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
	field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.

	* class.c metadata.c: Update after the changes above.

2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Simplified error handling and added
	section table validation.

2009-02-05  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h (MonoClassExt): New structure containing rarely used
	fields of MonoClass.
	(struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
	through a new 'ext' field.

	* class.c (mono_class_alloc_ext): New helper function to allocate 
	class->ext.

	* class.c metadata.c reflection.c: Update after MonoClass structure changes.

2009-02-05  Mark Probst  <mark.probst@gmail.com>

	* object.c (mono_object_get_virtual_method): Properly inflate
	generic methods.  Fixes #472692.

2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): The CLR supports SystemF
	recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
	for the parent type, the created type must be ready to be used on a generic
	instantiation.
	We fill this_arg/byval_arg if the parent is a generic instance to make sure
	we won't have duplicated entries in generic_inst_cache.

	Fixes #469553.

2009-02-05  Miguel De Icaza  <miguel@novell.com>

	* threadpool.c (socket_io_add_poll): Remove the BSD6 define and
	replace with plain BSD per the comments on the bug MONO77637.

2009-02-05  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_generic_class): New accessor function.
	(mono_class_get_generic_container): Ditto.

	* class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
	fields, similar to the ones in MonoMethod.

	* class.c (mono_generic_class_get_class): Set klass->is_inflated.
	(mono_class_create_from_typedef): Set klass->is_generic if needed.

	* reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
	
	* class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
	the same information as element_class->byval_arg.

	* class.c reflection.c: Remove references to class->byval_arg.

	* class.c marshal.c: Use mono_class_enum_basetype () instead of accessing 
	klass->enum_basetype directly.

	* verify.c metadata.c object.c icall.c reflection.c: Use 
	mono_class_enum_basetype () instead of accessing klass->enum_basetype 
	directly.

2009-02-04  Miguel de Icaza  <miguel@novell.com>

	* icall-def.h: Remove internal calls for sockets when
	DISABLE_SOCKET is defined, file system writing features when the
	OS only support reading and not writing data and Policy support if
	the Policy is disabled.
	
	* image.c (do_mono_image_open): Apply Paolo's patches for using
	mono_file_map_ APIs here.

	* assembly.c: Add support for platforms to avoid prefix
	auto-detection. 

2009-02-04  Zoltan Varga  <vargaz@gmail.com>

	* generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
	warning.

	* class.c (mono_class_inflate_generic_class): New helper function.

	* class.c: Use mono_class_inflate_generic_class in a few places. Add
	statistics for inflated methods/classes.

	* loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.

	* icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
	the call is made from Delegate.CreateDelegate () for the invoke method of
	a delegate.

	* loader.c: Add a statistics for the memory occupied by inflated signatures.

	* metadata.c (mono_metadata_signature_size): New helper function.

	* class.c (mono_class_get_method_from_name_flags): Add an optimization for
	generic instances.

	* metadata.c (inflated_method_in_image): Avoid calling 
	mono_method_signature () if the method does not already have a signature.

2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
	valuetype is compatible with target type, check by inheritance as a
	VT is not really compatible with System.ValueType, for example.

	* verify.c (do_invoke_method): Improve error message.

	* verify.c (do_box_value): If boxing a nullable, use the type argument
	on stack instead.

	* verify.c (do_newobj): Improve error message.	

	Fixes #469549.

2009-02-03  Miguel de Icaza  <miguel@novell.com>

	* appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY

2009-02-03  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Don't hold domain lock when calling
	instantiate_other_info().  Fixes #471958.

	* domain-internals.h, loader.c: Describe locking policy of domain
	lock vs loader lock.

2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_delegate_signature_equal): Make it possible to check
	first-arg-bound delegates to static method.

	* verify.c (verify_delegate_compatibility): Correctly verify delegates to
	static methods with the first arg bound.

	Fixes #469529.

2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Added stack_slot_full_name to provide decent and more meanfull
	errors.

	* verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
	under strict mode. Any type, when boxed can be seen as a reference type.

	Fixes #469528.

2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.h: The lower bound of an array is a signed integer value.
	Introduce mono_array_lower_bound_t typedef. It should be used instead of
	gint32 as under MONO_BIG_ARRAYS it will be a gint64.

	* icall.c: Cast MonoArrayBounds::length to a signed value so correctly
	calculate the upper bound.
	
	Fixes #471252.

2009-02-02  Miguel de Icaza  <miguel@novell.com>

	From Paolo's work, refactored, cleared up:
	
	* threadpool.c, icall.c: ifdef code that requires a working socket
	stack.

	* metadata.c (mono_metadata_field_info): Do not attempt to return
	a value from a function declared as void.

	* console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
	from the console stack.

	* assembly.c: use strrchr instead of rindex.

	* class.c, object.c, marshal.c, icall.c, reflection.c: include
	alloca.h on systems that have it.

	* environment.c: Avoid code that uses stuff from
	HAVE_SYS_UTSNAME_H
	
	* appdomain.c: Include sys/time.h.

	* console-io.c: include sys/ioctl.h if it is available.

2009-02-03  Zoltan Varga  <vargaz@gmail.com>

	* method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.

	* method-builder.c (mono_mb_create_method): Set method->skip_visibility from
	the method builder.

	* marshal.c: Set mb->skip_visibility instead of setting it on the method
	after it was created and cached, as the later is not thread safe.
	
2009-02-02  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
	called while the debugging module is not initialized. Fixes #471669.

2009-02-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (type_from_name): Ignore reflection frames to find out the real caller.

	Fixes #471255.

2009-02-02  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c (lookup_or_register_other_info): Make sure the
	loader lock is not taken while the templates lock is held.  Fixes
	#471089.

2009-02-02  Mark Probst  <mark.probst@gmail.com>

	* metadata.c (type_in_image): Added a check to fix a monodis
	crash.

2009-02-02  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
	nullable arguments.

	* object.c (mono_runtime_invoke_array): Ditto.
	
	* marshal.c (mono_marshal_free_dynamic_wrappers): New function for
	freeing wrappers of dynamic methods.

	* loader.c (mono_free_method): Call it. Fixes #463323.
	
	* marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
	methods taking vtype/byref arguments, to fix yet another bug caused by
	the sharing of runtime invoke wrappers. Partly fixes #471259.

2009-02-01  Zoltan Varga  <vargaz@gmail.com>

	* debug-mono-symfile.c (check_line): Return NULL instead of returning
	<first file in file table>:1 when the IL offset does not have an associated
	line number.

2009-01-31  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c (mono_debug_lookup_locals): New function to return local
	variable info for a method.

	* debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
	
2009-01-30  Jb Evain  <jbevain@novell.com>

	* pedump.c: reuse code from monodis to make sure pedump honors
	MONO_PATH, which is needed to verify net_2_1 assemblies.

2009-01-29  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
	there is no line number info.

2009-01-29  Raja R Harinath  <harinath@hurrynot.org>

	Avoid some MonoType allocations
	* reflection.c (mono_reflection_initialize_generic_parameter):
	Reuse MonoType from param->pklass rather than allocating one.
	(mono_dynamic_image_free): Update to changes.

2009-01-28  Raja R Harinath  <harinath@hurrynot.org>

	Rearrange some code to improve consistency
	* reflection.c (mono_reflection_setup_generic_class): Move body ...
	(mono_reflection_initialize_generic_parameter): ... here.

2009-01-28  Zoltan Varga  <vargaz@gmail.com>

	* generic-sharing.c (has_constraints): Enable gshared for methods/classes
	with type constraints as an experiment.

	* boehm-gc.c (on_gc_notification): Update mono_stats.

2009-01-28  Raja R Harinath  <harinath@hurrynot.org>

	Avoid some allocations
	* class-internals.h (_MonoGenericInst::type_argv): Convert from
	pointer to tail array to avoid extra allocation.
	* metadata.c (free_generic_inst): Update to changes.
	(mono_metadata_get_generic_inst): Likewise.  Use alloca instead of
	on-stack struct.

2009-01-27  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
	return TRUE if the two type objects are the same.

2009-01-26  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
	(mono_class_native_size): Use klass->marshal_info->min_align instead of
	klass->min_align, since klass->min_align contains the managed alignment,
	while the native alignment can be different, like for longs on x86.
	Fixes #469135.

	* class-internals.h (MonoMarshalType): Add a min_align field.

2009-01-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
	the 1.0 format.

2009-01-26  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
	some comments about the usage of the used_regs field.

	* marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
	Fixes #469217.

2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: return NULL instead of throwing FileNotFoundException
	when LoadAssembly() fails.

2009-01-23  Mark Probst  <mark.probst@gmail.com>

	* metadata.c (mono_metadata_generic_param_equal): Only compare the
	image if the owner is NULL.  Fixes the AOT failures.

2009-01-23  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_load_generic_params): Initialize the 
	MonoGenericParam structure using memset so the image field is initialized
	as well.

2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
	a plain store.

2009-01-21  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable_general): In the generic instance
	optimization, set method->slot for abstract virtual methods. Fixes part of
	#467834.

2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
	which signals that the unloading has started but all appdomain services must
	remain operational.

	* appdomain.c (mono_domain_unload): The initial state for unloading now
	is unloading_start and we switch to unloading after the managed call to
	AppDomain::DomainUnload has finished.

	The new unloading state has to be created because managed code in the
	DomainUnload event can depend on things like the threadpool still working.
	The domain must remain fully functional while the event executes.

	This shown as an issue due to Process::WaitForExit, which waits for
	async reads of stdout and stderr to complete. Since those are processed
	in the threadpool the code deadlocks because the DomainUnload callback 
	waits for the async read finished event, which should have been set by a
	threadpool job but has been discarded due to the domain been in unload
	state.

2009-01-21  Mark Probst  <mark.probst@gmail.com>

	* metadata.c (mono_metadata_generic_param_equal): Owner as well as
	image must match.

2009-01-21  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (resolve_object): For fields, inflate the class and
	then get the field in the inflated class.

2009-01-20  Mark Probst  <mark.probst@gmail.com>

	* object-internals.h (struct _MonoException): Added a comment
	explaining the new use of trace_ips.

2009-01-20  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c (inflate_other_data): Inflate array methods
	correctly.

	* loader.c, class-internals.h: Rename search_in_array_class() to
	mono_method_search_in_array_class() and make it non-static.

2009-01-19  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (inflated_signature_in_image): Call signature_in_image as well.
	Hopefully fixes #458168.

2009-01-19  Christian Hergert  <christian.hergert@gmail.com>

	* object.c (mono_raise_exception): Remove call to InterlockedIncrement
	as it is performed elsewhere.

	Code is contributed under MIT/X11 license

2009-01-19  Christian Hergert  <christian.hergert@gmail.com>

	* mono-perfcounters-def.h: Add counters for asp.net requests total and
	requests queued.
	* object.c (mono_raise_exception): Increment the exceptions total
	counter when an exception is thrown.
	* class-internals.h: Add a location for storing the total number of
	asp.net requests served.
	* mono-perfcounters.c: Implement update support for asp.net counters
	from the class libraries. Implement read support for asp.net counters
	and exceptions total counter.

2009-01-19  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (search_in_array_class): Call mono_class_setup_methods () before
	accessing klass->methods. Fixes #467385.

2009-01-18  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
	for byval arguments without an [Out] attribute. Fixes #467212.

	* attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com). 
	Fix compilation under android.
	
	* sgen-gc.c: Instead of scanning gray objects after all roots have been 
	processed, scan them directly after they are copied, to achieve better locality
	and cache usage.

	* socket-io.c: Applied patch from Koushik Dutta
	(koush@koushikdutta.com). Disable IPV6 when running under android.

2009-01-18  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_InternalExecute): Add write barriers.

	* marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
	the GC code.

	* sgen-gc.c: Implement write barriers in IL code.

2009-01-17  Geoff Norton  <gnorton@novell.com>

	* image.c: Avoid trying to walk the reference table of dynamic assemblies.

2009-01-17  Geoff Norton  <gnorton@novell.com>

	* image.c: When unloading the image->references table, there can be gaps
	in it.  Ensure that we iterate every entry to avoid leaking assembly references
	when unloading an appdomain.

2009-01-16  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c: Add support for allocating a nursery at an aligned address, to
	speed up ptr-in-nursery checks.

	* threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
	threads_lock () to prevent deadlocks.

	* sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
	does not need to be scanned during minor collections, since writes to it
	must use write barriers.

2009-01-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add pe nt header verification.
	
2009-01-15  Zoltan Varga  <vargaz@gmail.com>

	* gc.c: Fix a few warnings when using SGEN.

2009-01-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add pe optional header verification.

2009-01-15  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c: Add support for user defined marker functions, used by
	MonoGHashTable to avoid registering a GC root for every hash node.

2009-01-14  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
	non-pinned roots into separate hashes to avoid having to traverse them
	in functions which are only interested in one kind.

2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add pe header machine field verification.
	
2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add pe header size verification.

2009-01-14  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
	using the GC, they don't contain references.

	* domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.

2009-01-13  Geoff Norton  <gnorton@novell.com>

	* appdomain.c|h: Expose mono_domain_unload to the embedding api so that 
	AppDomains created on the native side can be cleaned up on the native side.

2009-01-13  Geoff Norton  <gnorton@novell.com>

	* appdomain.c: Ensure that we call mono_context_init for the embedding api
	as well as the managed api.

2009-01-13  Geoff Norton  <gnorton@novell.com>

	* appdomain.h|c: New API for creating a MonoDomain in the embedding api
	with a MonoAppDomain initialized against it.

2009-01-13  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (MOVING_GC_REGISTER): Fix a warning.
	
	* reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.

	* marshal.c: Avoid setting the exception clauses after a method has been entered 
	into the wrapper caches. Fixes #465700.

	* method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
	method builder.
	(mono_mb_create_method): Set the clauses from the method builder.

2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
	Patch from Makoto Kishimoto.

2009-01-13  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by 
	encoding them as ROOT_DESC_COMPLEX.
	(precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.

2009-01-12  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
	no longer point to the nursery.

	* sgen-gc.c: Add a few comments/FIXMEs.
	
	* sgen-gc.c: Implement scanning of the alloc_pinned objects.

	* marshal.c (mono_marshal_get_synchronized_wrapper): Make the 
	initialization of the various _method variables thread safe. Fixes
	#465377.

2009-01-12  Mark Probst  <mark.probst@gmail.com>

	* domain.c, domain-internals.h: Remove the shared_generics_hash
	and its lookup functions.

2009-01-12  Bill Holmes  <billholmes54@gmail.com>

	* socket-io.c:  Fixing the MSVC build. 

	Code is contributed under MIT/X11 license.

2009-01-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add pe header watermark verification.

2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Add lfanew verification.

2009-01-12  Jb Evain  <jbevain@novell.com>

	* tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
	METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.

2009-01-10  Zoltan Varga  <vargaz@gmail.com>

	* socket-io.c: Fix the build.

	* environment.c: Fix an #ifdef.

2009-01-09  Zoltan Varga  <vargaz@gmail.com>

	* threadpool.c (async_invoke_thread): Handle the wait function returning
	WAIT_IO_COMPLETION as well.
	(async_invoke_io_thread): Ditto.

2009-01-09  Bill Holmes  <billholmes54@gmail.com>

	* threads.c: Fixing the Windows build.

	Code is contributed under MIT/X11 license.

2009-01-09  Zoltan Varga  <vargaz@gmail.com>
 
	* threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
	interrupt a wait.
	(mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
	the thread to wait again.

2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-verify.c: Initial skeleton of the metadata verifier.

	* pedump.c: Add support for the metadata verifier.

	* verify-internal.h: Export the whole assembly metadata verifier function.

2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* gc.c (mono_gc_init): Fix the comments about deadlock on windows.

2009-01-09  Zoltan Varga  <vargaz@gmail.com>

	* Makefile.am: Upgrade dtrace-prelink.sh location.

2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
	well. Otherwise the shutdown deadlock that happens on unix will can happen
	as well.
	If the main thread code finishes too fast it's possible that the finalizer
	thread won't have executed yet, won't record itself as the finalizer thread
	and the shutdown sequence will wait on it forever.

2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
	with MSVC.

2009-01-08  Miguel de Icaza  <miguel@novell.com>

	* appdomain.c: Initialize the mono_strtod_mutex here, thanks to
	Robert Jordan for pointing this out.

2009-01-08  Christian Prochnow  <cproch@seculogix.de>

	* icall.c
	* icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
	ves_icall_System_IO_DriveInfo_GetDriveType.

2009-01-07  Miguel de Icaza  <miguel@novell.com>

	* icall.c: Wrap calls to mono_strtod in CriticalSection
	invocations when using eglib, to work around #464316.

2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
	return value of GetCurrentDirectory to never access unitialized memory.

2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
	return value of GetCurrentDirectory and expand the buffer if needed.

	Fixes #459094.

2009-10-07 Tom Hindle  <tom_hindle@sil.org>

	* marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) : 
	  Adding a call to mono_init_com_types.

	Code is contributed under MIT/X11 license.

2009-01-07  Geoff Norton  <gnorton@novell.com>

	* socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on 
	darwin.  Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
	ai_canonname can be null in some cases on darwin, where the runtime assumes it will 
	be the value of the ip buffer.

2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
	interfaces_packed here.

	Fixes part of #463294.

2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.

	Fixes part of #463294.

2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
	is a boxed complex as well.

	Fixes part of #463294.

2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
	control if a methodspec should be created for the generic method definition from external assemblies.
	Caching of methodspec is done using the handleref hash table.

	Fixes #462592.

2009-01-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (find_method): When searching the interfaces of a class
	check the transitive closure of implemented interfaces.

	Fixes #463303.

2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (get_implicit_generic_array_interfaces): Improve debugging code.
	
2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (get_implicit_generic_array_interfaces): Extract valuetype
	interfaces calculation to fill_valuetype_array_derived_types.

	* class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
	ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
	for example.

	* class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
	interfaces for valuetypes if needed.	

	* class.c (fill_valuetype_array_derived_types): Enums should have interfaces
	for their basetype as well. Types are array expanded if rank is > 0.

	Fixes #400716.

2008-12-30  Bill Holmes  <billholmes54@gmail.com>

	* socket-io.h : Changing the signature of
	  ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
	  the blocking state.

	* icall-def.h :  Changing the signature of
	  System.Net.Sockets.Socket.Accept_internal to pass the blocking state.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
	  For Windows only.  Avoid blocking when calling accept by
	  querying for a connection via select.  The loop also queries
	  the thread state every 1000 micro seconds for the thread
	  stop state.  This will avoid the process hanging on shutdown
	  when using a TcpChannel that is never connected to.

	Code is contributed under MIT/X11 license.

2008-12-30  Marek Safar  <marek.safar@gmail.com>

	* tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.

2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (get_implicit_generic_array_interfaces): Extract common
	code to a helper function making it a lot easier on the eyes.

2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (get_implicit_generic_array_interfaces): If the internal
	enumerator is an interface inflate System.Object instead of itself.

	Fixes #461261.

2008-12-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_runtime_invoke_array): Don't assert with
	byref nullable types.

	* marshal.c (mono_marshal_get_runtime_invoke): To handle
	byref nullables we unbox the object and store it on the
	stack. 
	We can't use the boxed object since it is the T of Nullable<T>
	and the boxed representation of a nullable it's underlying type
	or null.
	We could cheat and create a boxed nullable and use the same
	machinery of other byref VTs but this feels like a hack and
	using the stack has the bonus of reducing heap pressure.

	Fixes #461941.

2008-12-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_marshal_emit_managed_wrapper): Handle char
	return value.

	Fixes #461867.

2008-12-19  Bill Holmes  <billholmes54@gmail.com>

	* icall-def.h : Adding an internal call definition for 
	  System.Environment.internalBroadcastSettingChange.

	* icall.c : Adding a Windows only implementation to broadcast a 
	  WM_SETTINGCHANGE when an environment variable has changed.

	Code is contributed under MIT/X11 license.

2008-12-19  Mark Probst  <mark.probst@gmail.com>

	* class.c, class-internals.h: Made
	mono_class_has_parent_and_ignore_generics() non-static.

Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>

	* image.c: deal with the mmap failing when loading an image.

2008-12-17  Geoff Norton  <gnorton@novell.com>

        * threadpool.c: Ensure that the io_queue_lock is initialized
        in all circumstances, as we always attempt to cleanup against it.

2008-12-17  Miguel de Icaza  <miguel@novell.com>

	* icall.c (ves_icall_System_Environment_get_Platform): For
	compatibility reasons for existing client code we will keep
	returning 4 for a while.   

	For how long will depend on the documentation being updated, and
	for us to give client code a chance to be updated.

	This reverts the original decison on #433108 since we did not
	catch roughly 33 instances of the broken code in our own source
	code base, we did not catch failures on the buildbots, and QA did
	not bring this as a problem.

	Only today I found some customer's code breaking due to our own
	class libraries not being fully updated and tracked it down to
	this change.  I am reverting it because if we could not even get
	our story straight in our own code base, how can we hope that our
	end user code be fixed?

	As of this morning, our Wiki page that documents how to detect
	Unix had not been fixed.    

2008-12-16  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (inflated_method_in_image): Add a workaround for #458168.

	* class.c (mono_class_get_fields): Handle loading errors.

2008-12-12 Mark Mason <mmason@upwardaccess.com>

	* 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.
	
2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* mono-perfcounters.c: avoid warning.

2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (ensure_runtime_vtable): Work on generic instances and
	make sure all interfaces have MonoClass::interface_id set.

	* reflection.c (ensure_generic_class_runtime_vtable): Ensure the
	method table is property set.

2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: New function mono_class_setup_interface_id that setup
	MonoClass::interface_id if needed.

	* class-internals.h: Export new function.

2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Add code to sanity check the vtable after setup_vtable_general
	has done it's work.

2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* icall.c: make Assembly.GetExecutingAssembly work properly when
	reflection is used to invoke the method.
	Bug #321781 fixed.

2008-12-11  Mark Probst  <mark.probst@gmail.com>

	* metadata/generic-sharing.c: Look for constraints in all type
	arguments, not just the first one.

2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: return the correct CodeBase for an Assembly instance
	that was loaded from the shadow-copy directories.
	Bug #458190 fixed.

2008-12-10  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.

	* sgen-gc.c (check_object): New debugging helper function.

	* object.c: Fix calls to mono_value_copy_array ().

2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_fields): If working on an inflated class
	first check if the generic definition did init with success.

	Fixes #445361.

2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>

	pedump.c (main): Fix a warning.

2008-12-10  Bill Holmes  <billholmes54@gmail.com>

	* object-internals.h : Adding a definition for 
	  MonoReflectionComVisibleAttribute.

	* marshal.c (cominterop_com_visible) :  Method added to check the 
	  ComVisible attribute of a class.

	* marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :  
	  cominterop_raise_hr_exception added to consolidate common code 
	  to raise hr exceptions.

	* marshal.c (cominterop_can_support_dispatch) :  Method added to determine 
	  if a managed class should support IDispatch.

	* marshal.c 
	  (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :  
	  Added additional checks for managed object when getting 
	  an IDispatch interface.

	Code is contributed under MIT/X11 license.

2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>

	pedump.c (main): Handle mono_get_method () returning NULL. 

2008-12-09  Zoltan Varga  <vargaz@gmail.com>

	* marshal.h: Fix a warning.

2008-12-09  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c : Adding cominterop_release_all_rcws to release all
	  runtime callable wrappers held by the runtime.

	* marshal.h : Adding declaration for cominterop_release_all_rcws.
	  
	Code is contributed under MIT/X11 license.

2008-12-09  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_image_alloc_lock): New helper function.
	(mono_image_alloc0_lock): Ditto.

	* metadata.c: Use the alloc_lock () helper functions for allocating
	memory from the image mempool.

2008-12-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_from_generic_parameter): Document it's
	locking behavior. Fix double checked locking here, we stored in
	param->pklass a partially initialized MonoClass and no membar was used.

2008-12-05  Marek Habersack  <mhabersack@novell.com>

	* sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
	(3) functions are present in the C library use them to do the
	job. If they are absent, make sure that the sum of int_part and
	dec_part is rounded before returning. This is necessary due to the
	division of dec_part by the power of 10 before the final addition
	is performed - if the result is not rounded in some cases it will
	yield invalid results.

2008-12-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
	wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR 
	instruction instead of a pointer constant.

2008-12-03  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_get_header): Do most of the work outside the
	loader lock, to avoid assembly load hook deadlocks.

	* metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
	(mono_metadata_parse_type_full): Ditto.

2008-12-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
	Make the stack depth fixed. Ensure proper argument passing to the backtrace
	funtions. Finally, use a lock to produce well ordered output.

	The lock looks silly, as all calls to the corlib mempool should be guarded
	with the loader lock, but for some reason this fact doesn't help. 

	* mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.

2008-12-02  Mark Probst  <mark.probst@gmail.com>

	* socket-io.c: 64 bit big-endian fixes.

2008-12-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
	targets that require strict compatibility between the types.

	* verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
	to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
	Kill the strict argument and create a new one valuetype_must_be_boxed.

	* verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
	state that all valuetypes must be boxed.

	Fixes #448560.

2008-11-29  Kornél Pál  <kornelpal@gmail.com>

	* coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
	IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.

	Contributed under MIT/X11 license.

2008-11-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
	the inflate_generic_type machinery should handle it.

	This avoids a crash when the field's flags is zero and it's type is
	a primitive.
	What happens is	that mono_metadata_parse_type_full will see that opt_attrs
	is zero and will return one of the cached built-in primitive types. Since
	those types live in read-only memory, the code that copies it crashes.  

2008-11-28  Mark Probst  <mark.probst@gmail.com>

	* object.c: Don't put function descriptors into generalized IMT
	thunks.

2008-11-28  Mark Probst  <mark.probst@gmail.com>

	* class.c: Enable generic code sharing on PPC64.

2008-11-27  Mark Probst  <mark.probst@gmail.com>

	* mempool.c, mempool-internals.h: Added g_slist_append_mempool()
	from mini/mini.c.

	* generic-sharing.c: Allocate the method template slists from the
	image mempool so it doesn't leak.

2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (generic_array_methods): Release the linked list.

2008-11-27  Mark Probst  <mark.probst@gmail.com>

	* marshal.c (mono_string_builder_to_utf8): Fixed a wrong
	invocation to g_utf16_to_utf8().

2008-11-26  Mark Probst  <mark.probst@gmail.com>

	* icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
	arguments on big endian archs.

2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* reflection.c: (_mono_reflection_parse_type) skip leading spaces in
	the type name (test added in corlib).

2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* pedump.c: initialize perf. counters. Fixes a segv.

2008-11-25  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_runtime_invoke): Return the exception object if an
	exception was thrown.  Visual Studio displays the exception object
	in the locals window.

2008-11-24  Mark Probst  <mark.probst@gmail.com>

	* mini-trampolines.c (mono_delegate_trampoline): Don't return a
	ftnptr.

2008-11-24  Mark Probst  <mark.probst@gmail.com>

	* marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
	MONO_TYPE_U are sizeof (gpointer), too.

2008-11-24  Mark Probst  <mark.probst@gmail.com>

	* marshal.c (mono_type_native_stack_size): Fixed size and
	alignment for reference types.

2008-11-23  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Disable generic
	code sharing for PPC64.

2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (mono_method_get_equivalent_method): Make sure
	method->klass->methods is inited before looping over it.

2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* object.c: when calling ExecuteAssembly in a newly created domain,
	the configuration file and application base are already set up.
	Bug #446353 take 2 fixed.

2008-11-20  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
	Fixes #444715. Fix a warning.

2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: write the full path of the assembly to the .ini file
	created when "shadow-copying"
	Bug #446353 fixed.

2008-11-18  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (mono_method_full_name): Stringify wrapper types even
	if signature==FALSE.

2008-11-17  Bill Holmes  <billholmes54@gmail.com>

	* marshal.h : Fix the cygwin build.
	   marshal.c:12442: undefined reference to `_IID_IMarshal'
	  
	Code is contributed under MIT/X11 license.

2008-11-17  Bill Holmes  <billholmes54@gmail.com>

	* marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
	  free threaded marshaler when QueryInterface is called on a COM callable
	  wrapper requesting the IMarshal interface.
	  
	Code is contributed under MIT/X11 license.

2008-11-14  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.

	* reflection.c (mono_type_get_object): Special case the very common
	void type.

	* domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
	hold typeof(void).

2008-11-13  Bill Holmes  <billholmes54@gmail.com>

	* process.h : Adding method declaration for
	  ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
	  
	* process.c : Adding implementation for
	  ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
	  
	* icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
	  to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.

	Code is contributed under MIT/X11 license.

2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (unload_thread_main): Clean up threadpool by
	calling mono_thread_pool_remove_domain_jobs.

	* domain-internals.h (struct _MonoDomain): Add new fields to
	help coordinate the cleanup of the threadpool.

	* threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
	that cleans up the threadpool of all jobs associated with an appdomain.
	It does that by cleaning up the queues and making sure all active
	threads are accounted.

	* threadpool.c (async_invoke_io_thread): Ignore job if its domain is
	unloaded or in the process of. Take this is such way that there is
	no race condition between another thread starting the unload and the
	current thread acknowledging it.

	* threadpool.c (async_invoke_thread): Same.

	* threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
	firing the new thread.

	* threadpool.c (start_tpthread): Same.

	* theadpool.c (append_job): Increment threadpool_jobs before queueing.

	* threadpool.h: Add mono_thread_pool_remove_domain_jobs.

2008-11-06  Jonathan Chambers  <joncham@gmail.com>

	* file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
	Add support for DuplicateHandle.
	
	* file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
	Add support for DuplicateHandle.
	
	* icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
	Add support for DuplicateHandle.

	Code is contributed under MIT/X11 license.

2008-11-06  Mark Probst  <mark.probst@gmail.com>

	* class-internals.h: Make min_align into a whole byte.

	* class.c: Set min_align for SIMD types to 16.

2008-11-05  Geoff Norton  <gnorton@novell.com>

	* attach.c: Default the attacher to enabled for all cases including
	embedded.

Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>

	* monitor.c, class-internals.h, wrapper-types.h: revert incorrect
	change r117650.

2008-11-04  Mark Probst  <mark.probst@gmail.com>

	* monitor.c, monitor.h: New function for querying offsets of
	members of MonoThreadsSync.

2008-11-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
	to speed up this function and to avoid the boundless memory growth caused by
	the signature_dup () calls.

2008-11-02  Zoltan Varga  <vargaz@gmail.com>

	* monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
	wrapper.

	* class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
	by 1 bit.

	* wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.

2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c:
	* domain-internals.h: made mono_set_private_bin_path_from_config()
	"internal".
	* object.c: call the above function after setting the configuration
	file path for the root domain.
	Fixes bug #314478.

2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* assembly.c: when the assembly is loaded from an absolute path, end
	basedir with a directory separator.
	Bug #440781 fixed.

2008-10-30  Mark Probst  <mark.probst@gmail.com>

	* monitor.c (mono_monitor_get_fast_enter_method): If
	CompareExchange is not available, don't create the fastpath
	instead of asserting.  (The method is missing in the 1.1 profile.)

2008-10-30  Mark Probst  <mark.probst@gmail.com>

	* marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.

	* monitor.c, monitor.h: Code for generating Monitor.Enter and
	Monitor.Exit IL fastpaths.

2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Added Vector2ul.

2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Added Vector2l.

2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Added Vector2d.

2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: translate \ into / for cache_path.
	* domain-internals.h: new mono_is_shadow_copy_enabled().
	* icall.c: (fill_reflection_assembly_name) do the same path
	manipulations that get_code_base does.
	(get_code_base) use mono_is_shadow_copy_enabled.

2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: shadow-copied assemblies go to CachePath +
	ApplicationName when both are set. DynamicBase has nothing to do with
	shadow copies.
	Bug #406877 fixed.

2008-10-26  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
	STANDALONESIG table.

	* metadata-internals.h (struct _MonoDynamicImage): Add cache for
	standalone signatures.

	* marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
	comparison code: instead of comparing the signatures using a custom
	equals function, transform them to a common signature and compare that. This
	works better with AOT.

2008-10-25  Zoltan Varga  <vargaz@gmail.com>

	* Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.

	* class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
	call for generic instances.
	(mono_class_setup_properties): Call setup_properties () before accessing
	gklass->properties.

	* class.c (mono_class_get_virtual_methods): New helper function to iterate
	over the virtual methods of a class using metadata if possible, avoiding the
	creation of MonoMethod's for non-virtual methods.
	
	* class.c (mono_class_setup_vtable_general): Rewrite this to use 
	get_virtual_methods () to iterate over the virtual methods of classes.

2008-10-25  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.

2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Added Vector4i.

2008-10-24  Mark Probst  <mark.probst@gmail.com>

	* marshal.c (mono_marshal_get_synchronized_wrapper): Emit
	ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
	special-casing applies to eliminate the call completely.

2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Added Vector8s.

2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Added Vector16sb.

2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* icall.c: get rid of annoying warning.

2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: in 1.x, if you change the background status of the
	threadpool thread, it's not reset.
	Remove unnecessary calls to SetState.

2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threadpool.c: asynchronously create a set of idle threads upon first
	use of the threadpool. SetMinThreads will now start the appropriate
	number of idle threads if they are not already running. The default is
	1 threadpool thread per CPU. Increased the maximum number of threads
	per CPU to 10.

2008-10-22  Martin Baulig  <martin@ximian.com>

	Revert r116521 from Zoltan, it breaks the debugger:

	* class.c (mono_class_get_virtual_methods): New helper function to iterate
	over the virtual methods of a class using metadata if possible, avoiding the
	creation of MonoMethod's for non-virtual methods.
	
	* class.c (mono_class_setup_vtable_general): Rewrite this to use 
	get_virtual_methods () to iterate over the virtual methods of classes.

2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* threads.c: when creating a threadpool thread, set its state to
	'background'.
	* threadpool.c: reset the background state of a threadpool thread
	after finishing each work item
	Bug #437888 fixed.

2008-10-22  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
	
	* class.c (mono_class_setup_vtable_general): Add an optimized version for
	generic instances which works by inflating the methods in the container
	class's vtable.

	* class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
	variant which doesn't make a copy if no inflation was done.
	(mono_class_setup_fields): Use it.

	* metadata.c (mono_metadata_get_shared_type): New helper function to
	return a shared instance of a given MonoType.

	* class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
	a copy of most non-generic types.

Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* threadpool.c: remove one more GetSystemInfo () call.

Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* mono-perfcounters.c, icall-def.h, environment.c, environment.h:
	use the code in mono-proclib.h to get processor information.

2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c: fixed the logic that determines whether assemblies in a
	directory are "shadow-copied" or not. Bug #433483 fixed.

2008-10-22  Zoltan Varga  <vargaz@gmail.com>

	* process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
	warning.

2008-10-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
	returning a vtype.

	* class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
	reflection.c: Use mono_field_get_name () for accessing a field's name.

	* class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
	class.c

	* class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
	field.

	* loader.c (find_method_in_class): Reenable the metadata optimization by
	not using it for generic instances.

	* class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
	data/def_type fields from MonoClassField into a separate structure.
	(struct MonoClassField): Remove data/def_type fields.
	(struct _MonoClass): Add a 'field_def_values' array to store the default
	values/RVA for fields.

	* class.c reflection.c: Update after the changes.
	
	* object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
	for accessing field->data.

	* icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.

	* loader.c (find_method_in_class): Revert the last change for now as
	it breaks Mono.C5 unit tests.

	* class-internals.h (struct _MonoDynamicGenericClass): Add fields
	'field_generic_types' and 'field_objects' which contain the information
	previously stored in MonoInflatedField.
	(MonoInflatedField): Delete.
	(struct _MonoClassField): Delete 'generic_info' field.

	* reflection.c: Store the information which was previously in 
	field->generic_info in MonoDynamicGenericClass instead.

	* metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
	MonoClassField changes.

Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* marshal.c, method-builder.c: get rid of wrapper_hash and instead
	store the value inside the data array of the MonoMethodWrapper.
	This saves memory, is faster and fixes the lifetime issues (methods
	were never removed from the hash previously). May also fix bug#436996.

2008-10-21  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
	generic instances, compute the type from the generic definition instead of
	looking in field->generic_info.

	* class.c (mono_class_setup_fields): Don't create a MonoInflatedField
	for inflated fields, the only user was get_fieldref_token () which no
	longer needs it.

	* class.c (mono_class_init): Revert the last change as it seems to cause
	crashes.

	* class-internals.h (struct _MonoClassField): Reorder fields to save 4
	bytes on 64 bit platforms.

	* object.c (mono_class_create_runtime_vtable): Fix a warning.
	
	* object.c (mono_class_create_runtime_vtable): Don't initalize
	field->data/field->def_type here, it is done lazily by 
	mono_class_get_field_default_value ().

	* icall.c (ves_icall_get_enum_info): Call 
	mono_class_get_field_default_value () instead of directly accessing
	field->data and field->def_type.

	* object.c (get_default_field_value): Ditto.

	* class.c (mono_field_get_data): Ditto.
	
	* class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
	call for generic instances.

	* loader.c (find_method_in_class): If klass != from_class, then inflate
	the method with the context of from_class, since the caller assumes this.

2008-10-20  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
	for accessing method->slot.

2008-10-20  Cedric Vivier  <cedricv@neonux.com>

	* icall-def.h, icall.c: Add icall for Debugger.IsAttached.

2008-10-19  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_method_get_vtable_index): Use
	mono_method_get_vtable_slot () for accessing method->slot.

	* object.c (build_imt_slots): Use mono_class_get_method_by_index () for
	accessing klass->methods.

	* class.c (mono_method_get_vtable_slot): New helper function.
	(mono_class_get_vtable_entry): Ditto.
	(mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
	accessing method->slot.

	* generic-sharing.c (mono_class_get_method_generic): Pass the declaring
	method to get_inflated_method ().

	* class.c (mono_class_get_inflated_method): New helper method to obtain
	a method of an inflated class without calling setup_methods ().
	(mono_class_get_cctor): Use get_inflated_method.

	* generic-sharing.c (mono_class_get_method_generic): Ditto.
	
	* marshal.c image.c: Lazily create all the marshal caches.

	* image.c (mono_image_init): Move initialization of runtime_invoke
	caches to marshal.c.

	* marshal.c (get_cache): New helper function to lazily initialize a 
	wrapper cache.
	(mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.

	* debug-helpers.c (mono_method_full_name): Include generic arguments.

Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* loader.c: fixed check for interface type.

Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* appdomain.c: check for NULL setup before it's referenced.

p
Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* class.c: remove the unused old vtable setup code.

Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* class.c: don't depend on interface order in
	setup_interface_offsets (bug #435777).
	* reflection.c: sort the InterfaceImpl table (patch from
	Jb Evain  <jbevain@novell.com>).

2008-10-13  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_open_full): Avoid loading images while holding
	the low level assemblies lock.

Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* domain-internals.h, domain.c, icall.c, image.c, marshal.c,
	object.c, reflection.c, socket-io.c, threads.c: introduced
	mono_framework_version () to return the major framewrok version,
	changed the code that was using more complex patterns to use it.
	Return the correct value for PlatformID for OSX.

Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* icall-def.h, process.h, process.c: added an icall to get info about
	processes using mono-proclib.

Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* mono-perfcounters.c: use the mono-proclib functions to
	access process information.

Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
	monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
	reflection.c: remove rawbuffer usage: mmap support is more sanely
	provided by utils/mono-mmap.

Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* gc.c: use posix semaphores when possible so that
	mono_gc_finalize_notify() is signal safe.

2008-10-11  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
	#ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
	be #ifdef-ed out, the linker will remove the rest.

	* marshal.c: Implement DISABLE_COM.

	* reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.

2008-10-11  Miguel de Icaza  <miguel@novell.com>

	* locales.c (string_invariant_compare_char): Optimization: do not
	call g_unichar_type unless we actually need the information.

2008-10-10  Mark Probst  <mark.probst@gmail.com>

	* object.c, class-internals.h: Also create remoting trampolines
	for generic methods.  Pass the domain to the remoting trampoline
	creation function, too.

2008-10-10  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_init): Fix+re-enable the finalize optimization.

2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Vector4u was renamed to
	Vector4ui.

2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* assembly.c:
	* locales.c: remove the use of g_strdown. Fixes bug #322313.

Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* assembly.c: in mono_assembly_load_friends() take the assemblies lock
	for the least possible amount of time (extending the fix in r113458).

2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Retrofit to new type names.

2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
	as possible simd intrinsic types.
	Optimized the test to check for the common prefix first.

Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* class.c: back out part of a broken optimization committed on
	May 23th (bug #433908).

2008-10-09  Mark Probst  <mark.probst@gmail.com>

	* profiler.c (simple_shutdown): Don't call mono_thread_attach() on
	Win32.  Should fix #432388 for most cases until we have the new
	profiler on Win32.

2008-10-08  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
	instead of using inst->id so the hash is stable for AOT.

2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* appdomain.c:
	* icall.c: create a .ini file for shadow-copied assemblies that
	contains the location of the original assembly. Use this to return the
	proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
	Also fix the number of '/' for windows when returning the CodeBase.
	Fixes bug #430920.

2008-10-07  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.

	Code is contributed under MIT/X11 license.

2008-10-07  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
	  if if the class vtable needs initialized.

	Code is contributed under MIT/X11 license.

2008-10-07  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) : 
	  Adding default MonoMarshalSpecs for COM methods.  OBJECT->STRUCT,
	  STRING->BSTR, and CLASS->INTERFACE.

	Code is contributed under MIT/X11 license.

2008-10-07  Marek Habersack  <mhabersack@novell.com>

	* sysmath.h: changed the declaration of the
	ves_icall_System_Math_Round2 icall by adding an extra
	away_from_zero parameter.

	* sysmath.c (ves_icall_System_Math_Round2): added support for
	away from zero rounding. The icall now takes an extra boolean
	parameter to signal that away from zero operation is requested.

2008-10-06  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
	the delegate klass so it can work with full-aot.
	(mono_marshal_get_delegate_end_invoke): Ditto.
	(mono_marshal_get_delegate_invoke): Ditto.

Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* gc.c, attach.h, attach.c: remove a bad pattern:
	add_finalizer_callback () is not implemented correctly, it can't
	without adding more overhead to the finalizer loop and it's not
	even needed, since we know exactly what we need to call, so there is
	no need to do so through an expensive function pointer.

2008-10-04  Zoltan Varga  <vargaz@gmail.com>

	* gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
	for the no-gc case.
	* attach.c (mono_attach_init): Remove the #ifdef.

2008-10-04  Andreas Färber  <andreas.faerber@web.de>

	* attach.c (mono_attach_init): Don't use
	mono_gc_add_finalizer_thread_callback when compiling without GC.
	Fixes #432306.
	
	Code is contributed under MIT/X11 license.

2008-10-03  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_create_from_typedef): Remove the 
	#ifndef DISABLE_SIMD stuff.

2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h (MonoClass): Added simd_type bit field.

	* class.c (mono_class_create_from_typedef): Check if type is a simd
	intrinsic.

2008-10-03  Mark Probst  <mark.probst@gmail.com>

	* object.c (mono_method_add_generic_virtual_invocation): Only add
	instantiations to the thunk whose count is at least as large as
	the threshold.

2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* icall.c: changed the Type of the exception thrown when trying to
	invoke a constructor on an abstract class. Part of the fix for bug
	#324185.

2008-10-02  Mark Probst  <mark.probst@gmail.com>

	* class.c, class-internals.h (mono_method_get_vtable_index): New
	function which returns the index into the vtable and properly
	handles inflated virtual generic methods.

2008-10-01  Mark Probst  <mark.probst@gmail.com>

	* object.c, domain.c, object-internals.h, domain-internals.h:
	Generalize IMT thunk machinery to also handle thunks for virtual
	generic method invokes.  When a virtual generic method is invoked
	more than a number of times we insert it into the thunk so that it
	can be called without lookup in unmanaged code.

	* generic-sharing.c, class-internals.h: Fetching a
	MonoGenericInst* for a method from an (M)RGCTX.

2008-10-01  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_string): Applied a variant of a patch by
	tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
	marshalling. Fixes #431304.

2008-10-01  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (emit_marshal_variant) : Change the attribute checks to 
	  handle when ref is specified without In or Out.

	Code is contributed under MIT/X11 license.

2008-09-30  Mark Probst  <mark.probst@gmail.com>

	* loader.c (mono_get_method_constrained): Don't expand method with
	the class's context, because it's already a method of that class.

2008-09-30  Atsushi Enomoto  <atsushi@ximian.com>

	* attach.c : should be correct build fix.

2008-09-29  Zoltan Varga  <vargaz@gmail.com>

	* attach.c: Fix the previous change.

2008-09-29  Atsushi Enomoto  <atsushi@ximian.com>

	* attach.c : quick w32 build fix.

2008-09-27  Miguel de Icaza  <miguel@novell.com>

	* Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
	crashes MonoDevelop: #430455.

2008-09-27  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (struct _MonoDomain): Move most fields used only by
	the JIT do MonoJitDomainInfo in ../mini/mini.h.

	* domain.c: Remove initialization/cleanup of the removed fields.

2008-09-27  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Enable generic
	code sharing for PPC.

2008-09-26  Bill Holmes  <billholmes54@gmail.com>

	* attach.c : Fixing the Windows builds.

	Code is contributed under MIT/X11 license.

2008-09-25  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Experimentally change 
	the default generic sharing mode to 'all'.

2008-09-25  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c, class-internals.h: New function for checking
	whether a method needs a static RGCTX invoke wrapper.  A few
	funtions moved from mini/generic-sharing.c.

	* icall.c: New function used.

2008-09-25  Mark Probst  <mark.probst@gmail.com>

	* icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
	Static RGCTX invoke wrapping applies to value type methods, too.

	* class.c (mono_class_setup_vtable_general): In generic-shared
	value types, wrap methods with a static RGCTX invoke wrapper.

2008-09-25  Zoltan Varga  <vargaz@gmail.com>

	* attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
	osx build.

2008-09-24  Zoltan Varga  <vargaz@gmail.com>

	* gc.c (mono_gc_add_finalizer_thread_callback): New function to
	register a callback which is called when the finalizer thread is woken
	up.
	(finalizer_thread): Call the callback if it exists.

	* attach.h attach.c: New files, implementing the attach mechanism.

	* appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
	
	* object.c (mono_object_get_virtual_method): Fix an assertion introduced
	by the previous change.

Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
	loader.c, marshal.c, metadata-internals.h, metadata.c,
	method-builder.c, object.c, reflection.c: introduced specific functions
	to allocate from the domain and image mempools and cleaned up most of
	the code to use them (still missing a few in reflection.c).
	Keep the loader bytes counter updated.

Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
	loader-related counters.

Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
	added more MS-compatible counters.

2008-09-22  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_fields): Call setup_fields before accessing
	class->blittable. Fixes #428217.

2008-09-21  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_image_get_field_on_inst_token): Call 
	field_encode_signature () since that handles custom modifiers too.
	Fixes #424663.

2008-09-20  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (add_custom_modifiers): New helper function to merge custom
	modifiers stored in objects to a MonoType.
	(fieldref_encode_signature): Encode custom modifiers.
	(mono_image_get_generic_field_token): Call add_custom_modifiers ().
	(fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.

2008-09-19  Kornél Pál  <kornelpal@gmail.com>

	* coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
	calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
	64-bit IL only images because imports are not resolved for IL only images.
	Special thanks to Bill Holmes for finding this bug and testing the patch.
	Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.

	Contributed under MIT/X11 license.

2008-09-19  Miguel de Icaza  <miguel@novell.com>

	* mono-config.c (dllmap_start): Add support for the bits keyword
	on dllentry and dllmap to easily detect 32 vs 64 bit systems.

2008-09-19  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (inflate_mono_method): When the class the method is
	to be inflated for is itself not inflated, just return the method.

Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* mono-perfcounters.c: use more user friendly process instance names.

2008-09-18  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (emit_marshal_variant) : Change the attribute checks to 
	  handle "[in] ref" and "[in][out] ref" cases.

	* marshal.c (cominterop_get_ccw) : The wrong signature was being passed
	  to mono_mb_create_method.  This was causing problems calling native to
	  managed passing Variants by value.

	Code is contributed under MIT/X11 license.

2008-09-18  Zoltan Varga  <vargaz@gmail.com>

	* class.c (can_access_internals): Call mono_assembly_load_friends ()
	before accessing the friend_assembly_names field.

	* assembly.c (mono_assembly_load_friends): Make this callable multiple
	times.
	(mono_assembly_load_from_full): Avoid calling load_friends (), it is
	called lazily when it is needed.

	* metadata-internals.h (struct _MonoAssembly): Add 
	'friend_assembly_names_inited' flag.

Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* mono-perfcounters-def.h: fix the types of a few counters.
	* mono-perfcounters.c: implemented the instance names getter
	and a few bugfixes.

2008-09-18  Atsushi Enomoot  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2008-09-17  Robert Jordan  <robertj@gmx.net>

	* marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
	context bound objects. Fixes #415577.

	Code is contributed under MIT/X11 license.

Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* icall-def.h, threads-types.h, threads.c: fixed SpinWait()
	implementation (bug #423582).

2008-09-16  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_object_get_virtual_method): Handle the case method->slot
	is not set. Fixes #426309.

2008-09-16  Jb Evain  <jbevain@novell.com>

	* class.c (mono_class_from_name): fix the exported type look up
	when the type is defined in a referenced assembly.

2008-09-16  Jb Evain  <jbevain@novell.com>

	* reflection.c (mono_image_fill_export_table_from_type_forwarders):
	increment the next index counter on each iteration to make that work
	for more than one type forwarder. Unmanaged part to fix #422929.

2008-09-15  Mark Probst  <mark.probst@gmail.com>

	* object-internals.h: enum ComInterfaceType in
	MonoInterfaceTypeAttribute is guint32, not guint16.

2008-09-12  Mark Probst  <mark.probst@gmail.com>

	* cil-coff.h, image.c, reflection.c: Endianness fixes in image
	writing code.

2008-09-11  Mark Probst  <mark.probst@gmail.com>

	* icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
	not gboolean.

2008-09-11  Mark Probst  <mark.probst@gmail.com>

	* debug-mono-symfile.c (mono_debug_symfile_lookup_location):
	Endianness fixes for MonoSymbolFileOffsetTable.

2008-09-10  Bill Holmes  <billholmes54@gmail.com>

	* process.c (complete_path) : Removing quotes from the 
	  input path.  The glib file routines do not handle file paths
	  that have quotes around them.

	Code is contributed under MIT/X11 license.

2008-09-10  Bill Holmes  <billholmes54@gmail.com>

	* socket-io.h : Adding a comment to provide locations where 
	  changes to MonoSocketAsyncResult need to be synced.

	Code is contributed under MIT/X11 license.

2008-09-10  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_custom): Call NativeToManaged for non-out 
	parameters as well. Fixes #425001.

2008-09-08  Miguel de Icaza  <miguel@novell.com>

	* console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
	windows build.

2008-09-07  Miguel de Icaza  <miguel@novell.com>

	* console-io.c: Add support for tracking the window size if it
	changes.

	The setup is very simple: the TtySetup function will now return a
	pointer to a location in memory that tracks the current console
	size.  The managed code checks its current value every time its
	queried against the last value set, and updates accordingly.

	With this setup we can work with multiple consoles, and we do not
	require to poke into managed code from a signal handler.

	Additionally, the environment for COLUMNS and LINES is now handled
	in unmanaged code.

	(ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.

2008-09-07  Mark Probst  <mark.probst@gmail.com>

	* marshal.c (mono_type_native_stack_size): Treat
	MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.

2008-09-04  Jb Evain  <jbevain@novell.com>

	* class.c (mono_class_is_assignable_from): fix assignability of nullables
	to nullables.

2008-09-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_type_compatibility_full): Revert change
	to allow converting a native int to unmanaged pointer be verifiable
	under non-strict mode.
	It turns out that "(IntPtr)null" is indeed unverifiable, go figure.

	* verify.c: Added some TODOs.

2008-09-02  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
	  ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
	  Changed to use GlobalAlloc for the memory returned on Windows platforms.

	Code is contributed under MIT/X11 license.

2008-09-02  Jb Evain  <jbevain@novell.com>

	* object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.

2008-09-02 Rodrigo Kumpera  <rkumpera@novell.com>

	reflection.c (typebuilder_setup_fields): Handle classes with
	explicit size.

2008-09-01 Rodrigo Kumpera  <rkumpera@novell.com>

	class.c (mono_class_setup_events): Add memory barrier due to
	double checked locking.
	
	class.c (mono_class_setup_properties): Same.

2008-08-31  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_is_assignable_from): Fix the build.
	
	* class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
	before accessing klass->interface_bitmap. Fixes #421744.

2008-08-28  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (mono_runtime_set_no_exec): New internal function setting
	the runtime into no-exec mode, useful when running the AOT compiler.

	* appdomain.c gc.c object.c: Avoid executing managed code when running
	in no-exec mode.
	
	* rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.

	* reflection.c (_mono_reflection_get_type_from_info): Handle the 
	special case when the mono_assembly_loaded () returns NULL because the 
	search hook is not installed.

2008-08-25  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
	crashes in bstr marshalling on linux.

2008-08-24  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
	with more than one parameter.

2008-08-24  Miguel de Icaza  <miguel@novell.com>

	* console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
	start/stop flow control as well when turning off ICANON (allows
	C-s and C-q to be read by Console.ReadKey).

2008-08-24  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_init): Move the initialization of nested classes
	into mono_class_get_nested_types (). Fixes #418433.

	* class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
	flag.

	* class.c reflection.c icall.c: Use mono_class_get_nested_types () for 
	iterating tough the nested classes of a class.

2008-08-23  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Enable generic sharing
	on arm.

2008-08-22  Miguel de Icaza  <miguel@novell.com>

	* console-io.c (sigcont_handler): Support signal chaining for
	SIGCONT.

	(console_set_signal_handlers): Use best practices with sigaction,
	clear the structure before using it. 

2008-08-22  Robert Jordan  <robertj@gmx.net>

	* console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
	Fix the Windows build.

2008-08-22  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Make the default
	sharing mode 'corlib'.

2008-08-21  Zoltan Varga  <vargaz@gmail.com>

	* console-io.c (console_set_signal_handlers): Fix a warning.

	* marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
	method normally, the JIT will take care of avoiding recursion.

2008-08-20  Bill Holmes  <billholmes54@gmail.com>

	* console-io.c : Fixing builds for platforms that do not have <termios.h>.

	Code is contributed under MIT/X11 license.

2008-08-20  Miguel de Icaza  <miguel@novell.com>

	* console-io.c (sigcont_handler): We need to restore the entire
	termios state, not only the original settings, as things like echo
	can be controlled after this (Booish exposes this issue with its
	own ReadLine implementation).

	Additionally, we need to set the terminal back into keypad_xmit
	mode.
	
	(ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
	string as a paramter as well.   Otherwise we get different
	keyboard sequences.

2008-08-20  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
	delegates with byref out parameter passing. Fixes #351520.

	* debug-helpers.c (mono_context_get_desc): New helper function to stringify
	a generic context.
	(mono_type_get_desc): Add the type arguments for GENERICINST.
	(mono_method_full_name): Stringify the class name using mono_type_full_name
	so it picks up generic arguments.

2008-08-19  Gert Driesen  <drieseng@users.sourceforge.net>

	* console-io.c: Removed debug output.

2008-08-19 Rodrigo Kumpera  <rkumpera@novell.com>

	reflection.c (mono_reflection_create_runtime_class): Alloc
	the nested classes linked list using the dynamic image mempool.
	Fixes leak in corlib compilation.

2008-08-19  Miguel de Icaza  <miguel@novell.com>

	* console-io.c: Fix incredibly annoying behavior on the console
	after resuming execution after control-z.   This affected every
	console application.

2008-08-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* mempool-internals.h: Header for mono private mempool functions. The first
	two function are for allocating glib linked lists using pools.

	* mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.

	* Makefile.am: Added mempool-internals.h.

2008-08-16  Zoltan Varga  <vargaz@gmail.com>

	* domain.c (mono_domain_create): Call the JIT domain hook if installed.
	(mono_domain_free): Ditto.

	* domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
	be used by the JIT to store its domain-specific information, instead of putting
	it directly into MonoDomain.

	* domain.c (mono_install_create_domain_hook): New helper function to install
	a hook which initializes domain->runtime_info.

	* domain.c (mono_install_free_domain_hook): Ditto.
	
2008-08-15  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_delegate_end_invoke): Raise an exception instead of
	asserting if the ares parameter is null.

	* mono-perfcounters.c: Fix warnings.

	* marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
	is not needed, don't check for interruptions either.
	(mono_marshal_get_delegate_end_invoke): Ditto.

2008-08-15  Marek Habersack  <mhabersack@novell.com>

	* mono-perfcounters.c (predef_readonly_counter): added support for
	reading the ASP.NET Requests Queued counter from another process.

2008-08-12  Zoltan Varga  <vargaz@gmail.com>

	* metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
	MonoImage to simplify the AOT code.

2008-08-10  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
	marshalling. Fixes #416078.

2008-08-08  Zoltan Varga  <vargaz@gmail.com>
	
	* marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
	it is set, looking up the icall address is deferred to the JIT, since 
	in embedded scenarios, the icall might not be registered in the runtime
	doing the AOT compilation. Backported from the 2.0 branch.

2008-08-08  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
	Fixes #415621.

2008-08-05  Marek Habersack  <mhabersack@novell.com>

	* Makefile.am: added support for cross-compilation.

2008-08-04  Zoltan Varga  <vargaz@gmail.com>

	* socket-io.c (get_socket_assembly): Make 'moonlight' variable static.

Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* mono-perfcounters.c: jitted methods and jitted bytes counters.

Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, icall-def.h, mono-perfcounters-def.h,
	mono-perfcounters.c: performance counters implementation.

2008-07-31  Zoltan Varga  <vargaz@gmail.com>

	* metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
	to gpointer, letting the AOT code decide what to store in it.

2008-07-31  Bill Holmes  <billholmes54@gmail.com>

	* marshal.c (cominterop_get_native_wrapper) : Adding a call to 
	  mono_class_setup_methods if the methods are not initialized.

	Code is contributed under MIT/X11 license.

2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Remove some debug code I commited by accident.

	* verify.c (mono_method_is_valid_in_context): Change the return value
	to make possible to distinguish between invalid and unverifiable.

	* verify.c (verifier_load_method): Don't return NULL for unverifiable
	methods.

2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_generic_param_is_constraint_compatible): Inflate type
	constraints. Fixes regression in gtest-253.

2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_verifier_verify_class): Don't allow generic types
	with explicit layout.

	* verify.c (mono_method_verify): Check locals and argument types.

2008-07-29  Zoltan Varga  <vargaz@gmail.com>

	* monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
	wait if the thread is in StopRequested state.

	* class.c (mono_class_from_name): Refactor the module searching code into
	a separate function so it can be reused in the AOT case too.

2008-07-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_type_is_valid_in_context): Improve the error message.
	Check both the type and it's generic type definition for loader errors.
	
	* verify.c (mono_method_is_valid_in_context): Don't generate another
	error when a type errors occur, this leads to the wrong exception been
	thrown.

2008-07-28  Dick Porter  <dick@ximian.com>

	* icall-def.h
	* process.c
	(ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
	New internal calls to duplicate and close a process handle.

2008-07-27  Andreas Färber  <andreas.faerber@web.de>

	* object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.

2008-07-27  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (unload_thread_main): Attach the unload thread to the runtime.

2008-07-27  Robert Jordan  <robertj@gmx.net>

	* class.c (mono_class_init): Don't compute class.has_finalize for
	valuetypes. Fixes #412477.

2008-07-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Implement constraint equivalence checking.
	This is required when a generic parameter is used as
	argument to a constrained one.

	Fixes #410637.

2008-07-24  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.

	* object-internals.h (struct _MonoDelegate): Add 'method_code' field,
	synch with managed object layout.

2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_branch_op): Handle valuetypes and generic
	arguments properly.

	* verify.c (do_cmp_op): Same.

	Fixes #410383.

2008-07-24  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Fix memory leaks.

	* class.c, class-internals.h: Make
	mono_class_inflate_generic_type_with_mempool() non-static.

2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (dump_verify_info): Dump full class name.

2008-07-24  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Removed some old code that didn't do anything.

2008-07-24  Massimiliano Mantione  <massi@ximian.com>
	* profiler.c: Added runtime_initialized_event,
	mono_profiler_install_runtime_initialized and
	mono_profiler_runtime_initialized. This new hook tells the profiler
	when the runtime is sufficiently initialized to be able to call
	mono_thread_attach on the root appdomain.
	* profiler.h, profiler-private.h: Likewise.

2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_cast): Do boxing for generic arguments as well.

	* class.c (is_nesting_type): Drop generic instantiations before
	checking for nesting.

	* class.c (can_access_instantiation): Allow access to generic
	arguments.

2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_class_for_overlapping_reference_fields):
	On some cases, the field size might be zero, guard against that.
	Fix the explicit layout check to work as expected.

2008-07-23  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling 
	mono_thread_resume () during shutdown, since the thread we want to abort
	might be suspended.

2008-07-22  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a 
	warning.

	* debug-mono-symfile.c: Fix a warning.

	* mono-perfcounters.c (get_cpu_times): Fix a warning.

	* object.c (mono_class_vtable): Check if exception_type is set, and return
	NULL as defined by the function comments.

2008-07-22  Mark Probst  <mark.probst@gmail.com>

	* mempool.c: Use malloc for every single mempool allocation if the
	configure option is set.  This makes it easier to track mempool
	allocations with tools like Valgrind.

2008-07-22  Jb Evain  <jbevain@novell.com>

	* reflection.c (create_dynamic_mono_image): emit the same
	metadata version that SL2 does when creating a SL2 image.

2008-07-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h:
	* icall.c: New icall System.Enum:get_hashcode. This function
	avoids the overhead of boxing the enum to the underlying type.

2008-07-21  Mark Probst  <mark.probst@gmail.com>

	* reflection.c (mono_method_get_object): Don't let static RGCTX
	invoke wrappers get into MonoReflectionMethods.

2008-07-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* object-internals.h:
	* object.c: New mono_runtime_class_init_full function
	that makes throwing the exception optinal.

	* class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
	for the case where the exception object is supplied.

2008-07-16  Kornél Pál  <kornelpal@gmail.com>

	* coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
	old ld versions.

	Contributed under MIT/X11 license.

2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* string-icalls.c (ves_icall_System_String_InternalSplit):
	Optimize array allocation by caching the MonoClass of the
	array type.

	* icall.c (ves_icall_Type_GetMethodsByName): Same.

	* reflection.c (mono_param_get_objects): Same.

2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h:
	* icall.c: New ves_icall_MonoGenericClass_InflateType icall.
	It inflates the given type using the class context.

2008-07-15 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_class_try_get_vtable): New function. Tries to fetch
	the vtable if it already exists.

	* object-internals.h: Add mono_class_try_get_vtable as part of the
	internal API.

	* reflection.c (mono_type_get_object): Use the MonoObject from the
	vtable when possible. Reduces locking contention on reflection heavy
	code.

2008-07-15  Zoltan Varga  <vargaz@gmail.com>

	* decimal.c (my_g_bit_nth_msf): Implement this directly without calling
	g_bit_nth_msf () since that macro is not implemented in eglib.

2008-07-13  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
	on platforms which do not support it.

2008-07-12  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_signature_to_name): Encode sig->hasthis as well.

2008-07-11  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h
	(MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.

	* mono-debug-debugger.c
	(_mono_debugger_interruption_request): New global volatile variable.
	(mono_debugger_check_interruption): New public function.

	* threads.c
	(mono_thread_current_check_pending_interrupt): Call
	mono_debugger_check_interruption().
	(mono_thread_interruption_checkpoint_request): Likewise.

2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Add more type checks for loaded types. Verify the result
	handle from ldtoken.

2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (field_from_memberref): Don't crash if the field
	wasn't found.

2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Verify if type and method instantiations
	don't have invalid VAR or MVAR arguments.

2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Fix double free of function pointer list.

2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_string_to_utf8): Comment the new code as it
	breaks under eglib.

2008-07-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_string_to_utf8): Avoid allocating a temp array.

2008-07-07  Bill Holmes  <billholmes54@gmail.com>

	* threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
	  is not throw too many times.

	Code is contributed under MIT/X11 license.

2008-07-07  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c (mono_debug_find_method): Allow this to be called even when
	debugging is turned off.

2008-07-06  Zoltan Varga  <vargaz@gmail.com>

	* generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.

2008-07-04  Mark Probst  <mark.probst@gmail.com>

	* class-internals.h, class.c: Added new generic sharing option:
	Share only stuff in System.Collections.Generic, which is now the
	default.

2008-07-04  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c, class-internals.h: New function for getting a
	generic method in a generic class given the corresponding method
	for a different instantiation of the class.  Partly refactored
	from mini-trampolines.c.

	* class.c: Make sure generic methods have a class_inst if they are
	part of a generic class.

	* metadata.c (mono_type_stack_size_internal): Handle type
	variables.

2008-07-04  Mark Probst  <mark.probst@gmail.com>

	* domain-internals.h: New field (has_this) in MonoGenericJitInfo.
	Signifies whether information on the this/vtable/mrgctx variable
	is available.

2008-07-04  Mark Probst  <mark.probst@gmail.com>

	* object.c, object-internals.h, icall.c: New function
	mono_delegate_ctor_with_method(), which does the same as
	mono_delegate_ctor(), but takes an explicit method argument
	instead of taking the method from the jit info.

	* marshal.c: When creating a delegate with an inflated method take
	the "this" argument as the target class for the castclass.

2008-07-03  Mark Probst  <mark.probst@gmail.com>

	* domain.c (mono_jit_info_table_find): Fixed a bug that caused
	mono_jit_info_table_find() to perform very badly in some cases.

2008-07-02  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (type_from_typename): Handle 'string'.

	* marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
	wrappers into the wrapper_hash, since the key is not a MonoMethod.

2008-07-01  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.

	* *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
	number of available managed allocator types.

	* marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
	(mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.

2008-06-30  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
	which is a low level lock protecting just the 'jit_code_hash' hash table.

	* domain.c: Initialize+cleanup jit_code_hash_lock.
	
2008-06-30  Kornél Pál  <kornelpal@gmail.com>

	* coree.c (mono_load_coree): Set coree_module_handle global variable only
	after initialization.

	* coree.h: Make MonoFixupExe internal.

	Contributed under MIT/X11 license.

2008-06-30  Kornél Pál  <kornelpal@gmail.com>

	* coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
	because that is platform independent. Check NumberOfRvaAndSizes in PE32
	as well.
	(MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
	image being loaded is a CLI image and _CorValidateImage gets called.

	* coree.h: Add MonoLoadImage.

	* image.c (mono_image_open_full): Load CLI images using MonoLoadImage
	instead of LoadLibrary.

	Contributed under MIT/X11 license.

2008-06-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
	for any primitive type.

2008-06-29  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_array_new_specific): Optimize this and the other allocation
	functions a bit.
	
	* object.c (mono_class_create_runtime_vtable): Use typed allocation in other
	domains too if mono_dont_free_domains is set.

	* domain-internals.h (mono_dont_free_domains): New internal option controlling
	whenever to free appdomain data after it has been unloaded.

	* domain.c (mono_domain_free): Don't free appdomain data if the option is set.
	
2008-06-28  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
	(mono_method_get_equivalent_method): Fix a warning.

	* object.c (mono_message_init): Avoid looking up array types for each call.

2008-06-27  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_message_invoke): Avoid looking up the object[] type for each
	call.

	* icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
	even more.

	* class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
	each iteration.

	* icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
	fields of an enum.

2008-06-26 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_value_box): Fix boxing of nullables.

2008-06-26  Kornél Pál  <kornelpal@gmail.com>

	* assembly.c (mono_set_rootdir): Use __ImageBase instead of
	mono_module_handle that is defined by the linker; no initialization required.
	* coree.h: Remove mono_module_handle, add __ImageBase, update
	mono_image_open_from_module_handle.
	* coree.c (_CorValidateImage): Convert platform independent PE32 images to
	PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
	(MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
	memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
	to 4 GB away from image base address. IA64 version is not tested but was very
	easy to implement and should work if we ever need it.
	* domain.c (mono_init_internal): Avoid system error message boxes.
	* image.c (mono_image_open_from_module_handle): Replace ref_count argument
	with has_entry_point. Handle do_mono_image_load fauilre correctly.
	(mono_image_open_full, mono_image_close): Use has_entry_point instead of
	coff_attributes that is a more reliable way to detect if _CorDllMain was called.
	* metadata-internals.h: Add has_entry_point to _MonoImage on Windows.

	Contributed under MIT/X11 license.

2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c, class-internals.h: Export mono_class_get_generic_type_definition
	as part of the private mono API.
	
	* loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
	Do proper argument checking for methods that belong to generic classes.
	Do proper type resolution for GMFH/2.
	Fixes #377324.
	
2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_switch): Fix a memory corruption bug with
	the jump index is out of bound.

2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Disable debug code.

2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_methodbuilder_token): Use
	mono_image_get_methodspec_token_for_generic_method_definition
	instead of mono_image_get_memberref_token. We cache more memberef
	entries now.

2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Inflate exception clause types.
	Fixes #402606.
	
2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_methodbuilder_token): Don't leak
	name.

	* reflection.c (mono_image_get_ctorbuilder_token): Same.

	* reflection.c (mono_image_create_method_token): Same.

2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
	It does the same as mono_image_get_methodref_token but works on
	MethodBuilder.

	* reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
	and always generate a methodspec. This follows the old behavior and fixes
	the regressions in System.Core. 

2008-06-24  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where 
	don't event mono_class_get () succeeds. Fixes #402182.

2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-internals.h: Added MonoDynamicImage::methodspec
	hashtable to store methodspec tokens created for MethodBuilders.

	* reflection.c (mono_image_get_methodbuilder_token): Encode generic
	MethodBuilders as open instantiations if a methodspec was requested.

	* reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.

	* reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.

	* reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.

	Fixes bug #349190.

2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (method_from_methodspec): Avoid crashing if the
	method lookup fails.

2008-06-20  Dick Porter  <dick@ximian.com>

	* socket-io.c (get_socket_assembly): Cope with Moonlight network
	classes being in a different assembly.  Fixes bug 399184.

2008-06-20  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_loader_init): Make this callable multiple times.
	(mono_dllmap_insert): Call mono_loader_init () so this works even before
	the runtime is initialized. Fixes #401755.

2008-06-19  Dick Porter  <dick@ximian.com>

	* socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
	Fixes bug 349688.

2008-06-19  Dick Porter  <dick@ximian.com>

	* socket-io.c:
	* icall-def.h: Implement Socket generic Send() and Receive()
	methods.  Fixes bug 395168.

2008-06-19  Kornél Pál  <kornelpal@gmail.com>

	* icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.

	Contributed under MIT/X11 license.

2008-06-18  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Split into
	`MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
	set to 80.0.  The debugger <-> runtime interface is now frozen as
	well.	

	* mono-debug.c
	(mono_debug_debugger_version): Bump to 4.

2008-06-18  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c
	(load_symfile): Don't check the minor version.

	* debug-mono-symfile.h: Bump the version number to 50.0.

2008-06-18  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c
	(load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
	minimum required version.

2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_custom_attrs_from_property): Fix support for
	retriveving cattrs of dynamic inflated generic types.

	* reflection.c (mono_custom_attrs_from_event): Same.

	* reflection.c (mono_custom_attrs_from_field): Same;

	* reflection.c (typebuilder_setup_events): Same cattrs of events.

	* loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
	Moved to metadata.c.

	* metadata.c: New functions to retrive the equivalent field, event
	of property from the generic type definition.

	* metadata-internals.h: Added new functions from metadata.c.

2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
	to cached in a mempool is used.

	* metadata.c (free_generic_class): In some situations field generic_info type
	is not properly dup'ed and leads to double free'ing.

	Fixes #400643.

2008-06-17  Mark Probst  <mark.probst@gmail.com>

	* marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
	this arguments (will be needed later for generic methods).
	Collect stats.

2008-06-17  Mark Probst  <mark.probst@gmail.com>

	* icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
	Create a static RGCTX invoke wrapper for methods which require it.

2008-06-17  Mark Probst  <mark.probst@gmail.com>

	* object.c, class-internals.h: New function for checking whether
	an individual field is special static.

2008-06-15  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
	linear search since the table is sorted.

	* gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
	Fixes #324180.

2008-06-14  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (unload_thread_main): Applied patch from Tim Howard 
	(timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.

	* gc.c (mono_domain_finalize): Allow an infinite timeout.

	* threads.c (mono_threads_abort_appdomain_threads): Ditto.
	
	* threads.c (mono_thread_request_interruption): Get rid of locking, use
	InterlockedCompareExchange to query and modify 
	thread->interruption_requested.

	* object-internals.h (struct _MonoThread): Change interruption_requested
	to a gint32 so it can be modified by atomic operations. Add 
	'critical_region_level' from the managed side, change small_id to a guint32,
	add new set of 'unused' fields.

	* appdomain.c: Bump corlib version.

2008-06-13  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_from_name): Search modules as well. Fixes
	#322332.

2008-06-13  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
	templates.  Templates are generalized with an additional type_argc
	argument.  RGCTX templates have type_argc==0, MRGCTX templates
	have type_argc>0.

	* domain-internals.h, domain.c: New hash table for looking up
	MRGCTXs.

	* metadata.c, metadata-internals.h: Rename hash and equal
	functions for MonoGenericInst's and make them public.

	* class-internals.h: New data structures for the MRGCTX.  Macros
	for distinguishing slots in the RGCTX and the MRGCTX.

2008-06-13  Mark Probst  <mark.probst@gmail.com>

	* object.c (mono_method_get_imt_slot): Put the same methods of
	different instantiations of the same generic interface in the same
	IMT slots, to make generic sharing simpler.

2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-internals.h: Added mono_metadata_field_info_with_mempool.

	* metadata.c (mono_metadata_field_info_with_mempool): Added.
	This function works just like mono_metadata_field_info, but
	accept a mempool as argument to be used allocating memory.

	* marshal.c (mono_marshal_load_type_info): Use new function
	to load marshal data into image mempool.

2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_inflate_generic_type_with_mempool):
	This function allows to inflate a generic type using
	a mempool.

	* class.c (inflate_generic_type): Take a mempool as argument
	and use it to do type dup'ing.

	* class.c (mono_class_setup_fields): Field type for generic
	generic classes are allocated from the image mempool.

	* metadata.c (free_generic_class): Inflated field type is
	now allocated in the image mempool.

2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* threads.c (thread_cleanup): Free MonoThread::name.

2008-06-12  Marek Habersack  <mhabersack@novell.com>

	* appdomain.c (ensure_directory_exists): avoid unnecessary
	mkdir(2) calls when the shadow directory already exists.
	(mono_make_shadow_copy): copy also satellite assemblies from the
	private bin directories.

2008-06-11  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
	
	* threads.c (mono_thread_get_stack_bounds): Align the stack address to
	a page boundary. Fixes #396219.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* marshal.c (mono_marshal_load_type_info): Add a memory barrier
	due to double-checked locking.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* assembly.c (build_assembly_name): Release memory on failure.

	* assembly.c (mono_assembly_name_parse_full): Release memory on failure.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
	memory on failure.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
	memory on failure.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (field_from_memberref): Check if field signature type is equal
	to the non-inflated type of the field. Fixes #398980.

2008-06-11  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_load_from_full): Call 
	mono_assembly_load_friends () outside the assemblies lock, since it can
	acquire the loader lock. Fixes #323696.

	* reflection.c (resolve_object): Inflate the inst with the context for
	FieldOnTypeBuilderInst. Fixes #399010.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_field_on_inst_token): Don't
	inflate the field to encode it's signature. If it's a
	VAR or MVAR it should stay that way in the signature.
	Fixes #399047.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (resolve_object): Release memory of inflated types.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_method_get_signature_full): Remove assert about
	loading a methodspec to a generic method. We have such methods, such as
	System.Threading.Interlocked::CompareExchange<T>.
	This assert was removed since it crashes the verifier when it checks
	methods calling CompareExchange<T>.

2008-06-10  Marek Safar  <marek.safar@gmail.com>

	* icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
	of Type array and not MonoType.

2008-06-10  Marek Habersack  <mhabersack@novell.com>

	* profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
	<lupus@ximian.com>

2008-06-10  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h
	(MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
	changes to the file format, but we were generating incorrect
	source file indices in the line number table due to a bug, which
	made backtraces report an incorrect source file.

2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* mono-debug.c: Moved mono_debug_free_method_jit_info from
	mini/debug-mini.c to here.

	* mono-debug.c (il_offset_from_address): Free memory from find_method.

	* mono-debug.h: Export mono_debug_free_method_jit_info, users should
	use it to release structs returned by mono_debug_find_method.

2008-06-10  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
	since it needs to set method->slot for all interface methods.

2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h: Forgot to add.

2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.

	* reflection.c (lookup_custom_attr): Added a MonoImage argument.
	Lookup the custom attributes from property_hash.

	* reflection.c (mono_save_custom_attrs): Save the custom attributes
	in property_hash. Allocate all data using the image mempool.

 	* reflection.c: Removed dynamic_custom_attrs. Changed all checks
	for dynamic_custom_attrs to checks if the image is dynamic.

2008-06-09  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
	assemblies array.
	
	* appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
	runtime functions while holding the domain assemblies lock.

2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Reapplied the last bit of the reverted changes.

2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Reapplied more of the reverted changes.

2008-06-09  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c (load_symfile): Check the major version
	first; if it's wrong, don't print the minor version in the error message.

2008-06-09  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (set_domain_search_path): Make this use the domain assemblies
	lock instead of the domain lock to avoid deadlocks, since the thread might
	already hold the loader lock.

	* threads.c (start_wrapper): Call mono_monitor_init_tls ().
	(mono_thread_attach): Ditto.

	* monitor.c: Use a TLS variable for holding the current thread id instead
	of calling pthread_self ().
	(mono_monitor_init_tls): New internal function to initialize the TLS
	variable.
	(mono_monitor_try_enter_internal): Put the owner == id check after the
	owner == 0 check.

	* object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
	missed optimizations when using gcc-4.3.

2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_dynamic_image_free): Free the memory
	used by MonoGenericParam in MonoDynamicImage::gen_param.

	* reflection.c (mono_reflection_setup_generic_class): Allocate
	container from mempool.

	* reflection.c (mono_reflection_initialize_generic_parameter): Allocate
	container from mempool.

2008-06-07  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_set_pending_exception): New internal function to set the
	pending exception of the current thread.
	(mono_thread_get_and_clear_pending_exception): Check for 
	thread->pending_exception as well.

	* object-internals.h (struct _MonoThread): Add 'pending_exception' field.

	* boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
	it can trigger a collection.

2008-06-06  Martin Baulig  <martin@ximian.com>

	Merged the `debugger-kahalo' branch.

	* mono-debug.h
	(MONO_DEBUGGER_VERSION): Bumped to 72.

	* debug-mono-symfile.h
	(MonoSymbolFileMethodIndexEntry): Removed.
	(MonoSymbolFileMethodEntry): New public typedef.
	(MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
	(MonoSymbolFileSourceEntry): Remove everything except `index' and
	`data_offset'.
	(MonoSymbolFileMethodEntry): Removed.
	(MonoSymbolFileLexicalBlockEntry): Removed.
	(MonoSymbolFileLineNumberEntry): Removed.
	(MonoDebugLexicalBlockEntry): Removed.
	(MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
	removed `num_il_offsets' and `il_offsets'.
	(MonoSymbolFile): Replace `version' with `major_version' and
	`minor_version'.
	(MONO_SYMBOL_FILE_VERSION): Replace with
	`MONO_SYMBOL_FILE_MAJOR_VERSION' and
	`MONO_SYMBOL_FILE_MINOR_VERSION'.

	* debug-mono-symfile.c
	(mono_debug_symfile_lookup_location): Add support for the new line
	number table format.

2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (free_generic_class): Release the inflated
	MonoClass of dynamic generic classes if it's not a generic
	type definition.

2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Reapplied more of the reverted changes.

2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (lookup_custom_attr): Clean the cached flag or
	nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
	for SRE types.

2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Reapplied a small part of the reverted changes.

2008-06-07  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
	previously in managed code.
	(mono_monitor_exit): Ditto.
	(ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.

	* icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
	the managed definition.

2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Revert changes to see if it helps with weird buildbot crashes.

2008-06-06  Zoltan Varga  <vargaz@gmail.com>

	* monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
	
	* monitor.c: Add some micro optimizations.

	* icall.c (type_from_typename): Handle 'bool'.

2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Implement constructor verification per P III 1.8.1.4.
	Fixes #396716.

2008-06-06  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
	holding the assemblies lock here too.

2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Kill stack_top function.

2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Kill stack_get function.

2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Last change broke the build. Fixed.

2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_type_compatibility_full): Make SZARRAY checks
	more reliable.

	* verify.c (mono_method_verify): Inflate params and locals to avoid
	mismatch when checking for compatibility.

2008-06-05  Jonathan Chambers  <joncham@gmail.com>

	* metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
	Length prefix should be size in bytes. Fix bug #339530.
	
	* metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
	Length prefix should be size in bytes. Fix bug #339530.

	Code is contributed under MIT/X11 license.

2008-06-05  Bill Holmes <billholmes54@gmail.com>

	* decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.

	Contributed under MIT/X11 license.

2008-06-05  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_check_breakpoints): Reflect latest runtime changes.

2008-06-05  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
	while holding the assemblies lock to prevent deadlocks. Handle the case
	where the search hook returns NULL but the assembly was still loaded.
	Fixes #323696.

	* appdomain.c (set_domain_search_path): Acquire the domain lock since we
	modify domain state.

2008-06-05  Andreas Färber  <andreas.faerber@web.de>

	* boehm-gc.c: Add DTrace probes gc-{begin,end}.
	* Makefile.am (pedump_LDADD): Post-process object files and
	add dtrace-generated object file, if necessary.

	Code is contributed under MIT/X11 license.

2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.

2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_get_full): Add a work-around for generic type definitions.

2008-06-04  Mark Probst  <mark.probst@gmail.com>

	* threads.c: Try to free everything from the delayed free table
	when shutting down threads, and set the variable to NULL after the
	table is freed so that calling
	mono_thread_hazardous_try_free_all() when shutting down the root
	domain doesn't crash.

2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_retrieve_from_typespec): Add an argument to inform
	the caller if resulting type was inflated.

	* class.c (mono_class_create_from_typespec): Free the MonoType if it
	was inflated.

	* class.c (mono_type_get_full): Free the MonoType if it	was inflated.


2008-06-04  Zoltan Varga  <vargaz@gmail.com>

	* decimal.c (rescale128): Rework the code a bit so it no longer crashes the
	class library tests.

	* icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
	(andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
	#396989.

2008-06-04  Mark Probst  <mark.probst@gmail.com>

	* domain.c, domain-internals.h: The JIT infos are now freed by the
	JIT info table code.  They are freed immediately if there only a
	single JIT info table in circulation.  If there is more, the free
	is delayed via a queue.

	* threads.c, threads-types.h: New hazard pointer function for
	freeing all freeable delayed items in one sitting.

2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (typebuilder_setup_fields): Use mempool for allocations.

	* reflection.c (typebuilder_setup_properties): Same.

	* reflection.c (typebuilder_setup_events): Same.

2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
	and use it for allocating memory.

	* reflection.c (mono_marshal_spec_from_builder): Same.

	* reflection.c: Change code to use new signatures.

	* metadata.c (mono_metadata_type_dup): Add a FIXME note.

2008-06-03  Zoltan Varga  <vargaz@gmail.com>

	* decimal.c (rescale128): Put back one line which was accidently commented
	out.
	
	* decimal.c (rescale128): Disable the code added by the last patch, as it seems
	to cause crashes.

2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_generic_class_initialize): Name must
	be always malloc'ed so we can free it later on. Do this for field, property
	and event.

	* metadata.c (free_generic_class): Free field, property and event names.

2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
	instead of g_memdup.

	* reflection.c (typebuilder_setup_fields): Same.

2008-06-03  Zoltan Varga  <vargaz@gmail.com>

	* decimal.c (rescale128): Optimize this function a bit more.

2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (free_generic_class): Release some memory from
	SRE generic classes.

2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_image_get_generic_field_token): No reference
	to name is kept, free it.

	* reflection.c (mono_reflection_generic_class_initialize): Free
	more memory of the inflated field.

2008-06-03  Zoltan Varga  <vargaz@gmail.com>

	* decimal.c (mono_decimalDiv): Moved equality checks here from managed
	code.

2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_dynamic_image_free): Release memory used by
	MonoDynamicImage::array_methods elements.

	* reflection.c (assembly_add_win32_resources): Release memory after
	encoding.

2008-06-02  Zoltan Varga  <vargaz@gmail.com>

	* decimal.c (log2_32): Use an optimized version for this function too.
	
	* decimal.c (log2_64): Fix this on 32 bit machines.

2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_dup_array_type): Implement allocation using a mempool.

	* class.c (mono_metadata_signature_deep_dup): Same.

	* metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
	a mempool.

	* metadata.c (mono_metadata_signature_dup): Delegate to the _full version.

	* metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.

	* metadata-internals.h: Added mono_metadata_signature_dup_full.

	* class-internals.h: Update signatures to take a MonoMemPool.

2008-06-02  Dick Porter  <dick@ximian.com>

	* icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
	* icall-def.h: Add
	System.ComponentModel.Win32Exception.W32ErrorMessage, using the
	FormatMessage API to get the error text.  Fixes bug 321827.

2008-06-02  Zoltan Varga  <vargaz@gmail.com>

	* decimal.c: Add some micro optimizations to make decimal operations faster.

2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (method_encode_clauses): Take a mempool
	as parameter and use it to allocate the clause array.

	* reflection.c (mono_image_get_field_on_inst_token): Free
	the inflated type after encoding it.

	* reflection.c (mono_dynamic_image_free): Free each element
	of MonoDynamicImage::gen_params.

	* reflection.c (reflection_methodbuilder_to_mono_method):
	Allocate the generic param array from the mempool.
	Allocate signature params from the mempool.

	* reflection.c (mono_reflection_generic_class_initialize):
	Free inflated fields after been used.

2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Reapply the memory leak fixes as they no
	longer make mono crash.

2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_type_get_object): Don't store the suplied
	MonoType with type_hash. A caller which pass a type that
	was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
	might end with a pointer to freed memory.
	The solution is to use byval_arg or this_arg from the associated
	MonoClass of the supplied type.

2008-05-29  Zoltan Varga  <vargaz@gmail.com>

	* icall.c: Revert the rest of the last change as it breaks the build too.

2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Revert a leak fix as it's breaking the build.

2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.

2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* appdomain.c (mono_make_shadow_copy): We leaked dir_name.

2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Fix some memory leaks.

2008-05-29  Dick Porter  <dick@ximian.com>

	* threadpool.c (mono_thread_pool_remove_socket): Always remove the
	async socket operations from the pending list when a socket
	closes.  Leaving it until the threadpool services the event
	exposes a race condition when a socket descriptor is reused.
	Fixes bug 377589.

2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c: Fix negative index check for array alocation.

2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c, marshal.c: Delegate wrappers should skip visibility.
	This check is performed by the verifier for IL created delegates
	and by Delegate::CreateDelegate for programatically created ones.
	Fixes #372406.

2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
	Fix code to use mono_array_size_t instead of int.

	Based on patch by Luis F. Ortiz.
	Contributed under X11 license.
	http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html

2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Added ves_icall_System_Array_GetLongLength and
	ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
	arrays.

	* icall.h: Export both new functions.

	Based on patch by Luis F. Ortiz.
	Contributed under X11 license.
	http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html

2008-05-28  Martin Baulig  <martin@ximian.com>

	The debugger now requires exactly r103463.

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
	This version is not supported by the debugger, wait for 72.

2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.h: Changed array related functions to use
	mono_array_size_t instead of guint32. Forgot to commit this file.

	Patch by Luis F. Ortiz.
	Contributed under X11 license.
	http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html


2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
	don't define it. Use the number literal instead.

2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c: Changed array related functions to use
	mono_array_size_t instead of guint32.

	* icall.c (ves_icall_System_Array_GetLength): Check for length
	overflow under MONO_BIG_ARRAYS.

	Based on patch by Luis F. Ortiz.
	Contributed under X11 license.
	http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html

2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.

	Based on patch by Luis F. Ortiz.
	Contributed under X11 license.
	http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html

2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c, object.h: Changed array related functions to use
	mono_array_size_t instead of guint32.

	Patch by Luis F. Ortiz.
	Contributed under X11 license.
	http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html

2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.h: Introduced mono_array_size_t typedef. This must be used
	in all places an array length is expected. This is 64bits wide if
	MONO_BIG_ARRAYS is enabled.

	Patch by Luis F. Ortiz.
	Contributed under X11 license.
	http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html

2008-05-27  Zoltan Varga  <vargaz@gmail.com>

	* security-manager.c class.c: Set the class exception info by calling
	mono_class_set_failure ().

	* class.c (mono_class_get_exception_data): New accessor function.
	(mono_class_set_failure): Store exception_data in the property hash.

	* class-internals.h (struct _MonoClass): Store 'exception_data' outside
	the struct as a property.

	* loader.c (mono_get_method_full): Store the lookup result for method
	tokens in method_cache, the others in methodref_cache to decrease the memory
	usage of hash tables.

	* image.c (mono_image_close): Destroy method_cache and methodref_cache.
	(mono_image_init): method_cache is lazy inited now.

	* metadata-internals.h (struct _MonoImage): Change method_cache to
	a MonoValueHashTable, add a separate methodref_cache.

2008-05-27  Eyal Alaluf <eyala@mainsoft.com>

	* number-formatter.h: Fix tables to avoid arithemtic overflow in
	  Double.ToString as exposed by Bug #383531.

2008-05-26  Zoltan Varga  <vargaz@gmail.com>

	* number-formatter.h: Make some tables static.

	* class.c (mono_method_set_generic_container): New accessor function.
	(mono_method_get_generic_container): Ditto.

	* class-internals.h (struct _MonoMethod): Remove rarely used 
	'generic_container' field, store it in the property hash instead. Add 
	'is_generic' boolean field instead.

	* image.c (mono_image_init): Initialize property_hash.
	(mono_image_close): Destroy property_hash.

	* metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
	hold rarely used fields of runtime structures belonging to this image.

	* class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
	to get/set method->generic_container.

	* loader.c (mono_get_method_from_token): Avoid loading the method header for
	generic methods.

2008-05-25  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_inflate_generic_method_full): Don't increase
	mono_stats.inflated_method_count for methods found in the cache.

	* threads.c (mono_thread_request_interruption): Add a comment about 
	QueueUserAPC ().

2008-05-24  Zoltan Varga  <vargaz@gmail.com>

	* class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
	interface_offsets_packed table.
	
	* class.c (mono_class_init): Remove some dead code.

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
	mono_class_setup_vtable () when CAS is active to detect security problems.

2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.

	* verify.c (mono_delegate_signature_equal): Don't compar number of generic
	parameters as it's irrelevant for delegate checking.

2008-05-23  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.

	* class.c (mono_class_init): Control the creation of a generic vtable using
	a global which is true by default, but set to false by the runtime startup code.
	
	* class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
	Disabled for now since it breaks the embedding API.
	Move the setup of class->methods for arrays to mono_class_setup_methods ().
	(mono_class_setup_methods): Add a memory barrier.

	* object.c (mono_class_create_runtime_vtable): Add code to handle the case
	when mono_class_init () doesn't compute the generic vtable.
	
2008-05-23  Massimiliano Mantione  <massi@ximian.com>
	* profiler.c: Added mono_profiler_install_statistical_call_chain,
	mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
	to support call chains (backtrace) in the stat profiler.
	* profiler.c, profiler-private.h: Likewise.

2008-05-22  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Init generic class when a method of it is
	requested via a runtime generic context.

2008-05-22  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_init): Add a comment about trying to avoid calling this.

	* reflection.c (mono_type_get_object): Add a FIXME.

	* loader.c (find_method_in_class): Use mono_class_get_method_by_index ().

	* class.c (mono_class_get_method_by_index): New helper function, returning an
	entry in the class->methods array.

2008-05-21  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_init): Only do the array optimization for szarrays. 
	Avoid creating a generic vtable for generic instances as well.
	(mono_class_get_method_from_name_flags): Don't search in the metadata for
	generic instances.

2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (mono_get_method_constrained): Inflate the signature
	with class context. Fix #325283.

2008-05-21  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_create_runtime_vtable): Add a comment.

	* class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
	where needed.
	(setup_interface_offsets): Handle the case when this is called twice for arrays.
	(mono_class_setup_vtable_general): Add an assert.
	(mono_class_init): Avoid creating a generic vtable for arrays.

	* class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
	here, let mono_class_init () do that.

	* class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
	interfaces in mscorlib.

	* class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
	interfaces. Add some comments.
	(mono_class_init): Call mono_class_setup_methods () here since it is no
	longer called by mono_class_setup_vtable ().

	* object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
	not set in class->vtable.
	(mono_class_create_runtime_vtable): Reenable the disabled code.

	* object.c (mono_class_create_runtime_vtable): Disable the last change for
	now as it causes some test failures.

	* object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
	if using the vtable trampoline. Also remove some strange code which put the
	generic methods themselves into the vtable slots. Remove the AOT init_vtable
	stuff as it is no longer needed.

2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Give make --verify all option check code as well.
	Using --verify code won't check for metadata now.

2008-05-19  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.

	* mono-debug.c
	(_mono_debug_using_mono_debugger): New global variable; it's set
	directly by the debugger, so mono_debug_using_mono_debugger() also
	works after attaching.

2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_class_create_runtime_vtable): Use memory barriers
	as we do double checked locking on MonoClass::runtime_info and
	MonoClassRuntimeInfo::domain_vtables.

2008-05-18  Zoltan Varga  <vargaz@gmail.com>

	* debug-helpers.c (print_field_value): Fix a warning.

2008-05-16  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
	set in the AOT case.

2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_setup_vtable_general): Use memory barriers
	as we do double checked locking on MonoClass::vtable.

2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (resolve_object): Inflate only if the generic context
	is not null. Fixes #389886.

2008-05-15  Jonathan Chambers  <joncham@gmail.com>

	* metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
	instead of g_free.

	Code is contributed under MIT/X11 license.

2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Revert unrelated change.

2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (check_is_valid_type_for_field_ops): Type on stack can be
	a generic instantiation, use mono_class_from_mono_type instead of playing
	with MonoType directly.

2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
	checks must ignore generic instantiations, so mono_class_has_parent is not
	suitable. Fixes #390128.

2008-05-14  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
	it to avoid registering tokens during metadata generation. Fixes #390023.

2008-05-14  Kornél Pál  <kornelpal@gmail.com>

	* coree.c: Rename dwOldProtect to OldProtect that makes naming convention
	consistent.

	Contributed under MIT/X11 license.

2008-05-14  Kornél Pál  <kornelpal@gmail.com>

	* domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
	even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
	to fixup the EXE image.
	(mono_cleanup): Use mono_close_exe_image.
	(mono_close_exe_image): New function.
	* image.c: Include "marshal.h".
	(mono_image_open_from_module_handle): Add ref_count argument. Return the image.
	(mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
	counting when the image is loaded outside of mono_image_open_full. Set status
	based on GetLastError.
	* coree.c: Include required headers. Add init_from_coree.
	(_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
	mono_assembly_open only when the image has vtfixups. Set init_from_coree.
	(_CorExeMain): Set init_from_coree.
	(CorExitProcess): Only call ExitProcess for now.
	(CorBindToRuntimeEx): New stub implementation.
	(CorBindToRuntime): New function.
	(MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
	(MonoFixupExe): ILONLY executables require no fixups.
	(mono_set_act_ctx): New function to set activation context.
	(mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.	
	* coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
	Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
	mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
	as MONO_INTERNAL.
	* domain-internals.h: Add mono_close_exe_image.

	Contributed under MIT/X11 license.

2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_compute_size): Correctly calculate field
	size for generic param and event tables. Fixes #388977.

2008-05-13  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_signature): Use memory barriers because of the double
	checked locking pattern.

	* threads.c (remove_and_abort_threads): Stop and wait for threads which are
	aborting or aborted as well. Fixes #376391.
	
	* threads.c (mono_thread_execute_interruption): Avoid depending on no longer
	existing runtime state in the Suspend handler during shutdown.

2008-05-12  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_request_interruption): Add some FIXMEs.

	* threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
	which are starting up or shutting down.

	* threads.c (mono_threads_set_shutting_down): Don't return a value since
	this function never returns if the runtime is already shutting down.

	* icall.c (ves_icall_System_Environment_Exit): Update after 
	mono_threads_set_shutting_down () signature change.
	
2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: Added can_access_instantiation to verify if the instantiation
	is visible. Fix access check for nested types as they returned TRUE
	before doing type and generic instantiation visibility checks.

2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_create_generic_class): The created type
	must have a different container from its TypeBuilder. Otherwise they
	will end sharing generic arguments, which is wrong.

	Due to the sharing, making a generic instance of the created type using
	the TypeBuider generic arguments resulted in the generic type definition
	been returned, which is wrong as well.

	As a bonus the code was leaking the type_params array. This memory should
	be allocated from the image mempool.

	This fixes bug #354047.

2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
	to here 	as they are now used in assembly.c new code.
	Added a skipverification flag to MonoAssembly.
	New internal function mono_assembly_has_skip_verification.

	* assembly.c: New function mono_assembly_has_skip_verification. It checks
	if an assembly has a version 2.0 SkipVerification security attribute. Fixes
	part of #387274.

2008-05-07  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_object_get_virtual_method): Inflate the resulting method if
	needed. Fixes #387034.

	* class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.

2008-05-06  Miguel de Icaza  <miguel@novell.com>

	* assembly.c (mono_assembly_load_reference): Prevent crash while
	disassembling Silverlight 2.0 executables while we still do not
	have GACed libraries.

2008-05-07  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c: Special case generic type definitions as well. Fixes #383444.

2008-05-06  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
	of the dynamic case. Fixes #387404.

2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>

	*verify.c (mono_verifier_is_class_full_trust): If under
	verify_all and the verifier mode was not set, only
	gac and corlib types are fulltrust. This makes --verify-all
	usable to detect unverifiable code, which is the expected
	use case.

2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.h: Ops, commited the header with debug
	enabled.

2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (merge_stack): Use the new value on unverifiable
	stack merges.

	* verify.c (verify_type_compatibility_full): Comparison
	of nullable types can't use mono_class_is_assignable_from.

	* verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
	that makes all verification errors be reported.

	* pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
	mono_method_verify.

2008-05-05  Robert Jordan  <robertj@gmx.net>

	* marshal.c (mono_marshal_get_thunk_invoke_wrapper):
	support for value types. See #386415.

	* object.c: comments.

	Code is contributed under MIT/X11 license.

2008-05-05  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h
	(MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
	for old pre-terrania symbol files.

2008-05-05  Andreas Färber  <andreas.faerber@web.de>

	* mono-config.c: Add ppc64 architecture.

	Code is contributed under MIT/X11 license.

2008-05-05  Andreas Färber  <andreas.faerber@web.de>

	* object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
	  PPC64 uses function descriptors as well.

	Code is contributed under MIT/X11 license.

2008-05-04  Zoltan Varga  <vargaz@gmail.com>

	* object.c (compute_class_bitmap): Ignore literal static fields.

	* sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
	var has an invalid format.
	(describe_ptr): Add some sanity checks for the vtable.
	(add_nursery_frag): Clear unused nursery fragments.
	(major_collection): Clear all remaining nursery fragments.

2008-05-03  Robert Jordan  <robertj@gmx.net>

	* image.c, metadata-internals.h: add thunk_invoke_cache.

	* marshal.c, marshal.h: implement
	mono_marshal_get_thunk_invoke_wrapper ().

	* object.c, object.h: implement mono_method_get_unmanaged_thunk ().

	Code is contributed under MIT/X11 license.

2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_leave): Empty the stack.

2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_is_assignable_from): Variance
	doesn't work between reference and value types. For example,
	given type C<T+>, C<int32> is not assignable to C<object>.
	Break the argument checking loop on first error. 

2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>

	* icall.c : base64_to_byte_array() needs some more strict
	  check for sequence of '=' characters. Patch by Santa
	  Marta (http://deee.g.hatena.ne.jp/santamarta).

	  Contributed under MIT/X11 license.
	  (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)

2008-05-02  Jonathan Chambers  <joncham@gmail.com>

	* domain.c: Disable LoadLibrary support to fix Win32 build.

	Code is contributed under MIT/X11 license.

2008-05-02  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
	to help with cache behaviour.

2008-05-01  Miguel de Icaza  <miguel@novell.com>

	* appdomain.c (mono_domain_from_appdomain): Add new accessor
	method. 

2008-05-01  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c: Implement thread-local allocation and a managed allocation routine.

2008-05-01  Dick Porter  <dick@ximian.com>

	* process.c (process_get_fileversion): Only pass 16 bits of
	language ID to VerLanguageName.  Fixes bug 381204.

2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Fix the comparison
	operator for code bounds check.

2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Check the bounds of
	all access of the code array.

2008-04-29  Kornél Pál  <kornelpal@gmail.com>

	* appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.

2008-04-28  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_strong_name_position): Fix return value when the rva is
	not valid.

2008-04-28  Kornél Pál  <kornelpal@gmail.com>

	* loader.c (mono_get_method_from_token, mono_method_signature): Add
	support for METHOD_IMPL_ATTRIBUTE_NATIVE.
	* domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
	fixup main EXE images when using mono.exe for mixed-mode assembly support.
	* domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
	mono_runtime_load.
	* appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
	runtime initialization from metadata.
	* assembly.c: Remove obsolete ceGetModuleFileNameA.
	(mono_set_rootdir): Use	mono_get_module_file_name.
	(mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
	handles.
	* cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
	* metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
	* image.c (mono_cli_rva_image_map): Use MonoImage instead of
	MonoCLIImageInfo. Add support for module handles.
	(load_cli_header): Update mono_cli_rva_image_map signature.
	(load_metadata_ptrs): Update mono_cli_rva_image_map signature.
	(mono_image_strong_name_position): Use mono_cli_rva_image_map.
	(mono_image_rva_map): Add support for module handles.
	(mono_image_ensure_section_idx): Add support for module handles.
	(mono_image_close): Add support for module handles.
	(do_load_header): Add support for module handles.
	(mono_image_open_from_module_handle): New function for internal use.
	(mono_image_open_full): Load normal images using LoadLibrary on Windows.
	(mono_image_load_module): Call mono_image_fixup_vtable for module handles.
	(mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
	handles.
	(mono_image_fixup_vtable): New function for mixed-mode assembly support.
	* image.h: Add mono_image_fixup_vtable.
	* coree.c: New file for mscoree.dll functions and mixed-mode assembly
	support.
	* coree.h: New file.
	* marshal.c (mono_marshal_get_native_wrapper): Throw exception for
	unsupported native code.
	(mono_marshal_set_callconv_from_modopt): New function splitted from
	mono_marshal_get_managed_wrapper.
	(mono_marshal_get_managed_wrapper): Use
	mono_marshal_set_callconv_from_modopt.
	(mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
	* marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
	* gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
	that results in a deadlock when the runtime is loaded in _CorDllMain.
	* Makefile.am: Add coree.c and coree.h.

	Contributed under MIT/X11 license.

2008-04-28  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Search for type arguments in array element
	types as well.

2008-04-28  Mark Probst  <mark.probst@gmail.com>

	* class-internals.h, generic-sharing.c: New, small runtime generic context.

	* metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.

	* object.c: Don't setup the RGCTX when the vtable is created,
	because we're setting it up lazily now.

2008-04-26  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
	64 bit support.

2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_class_for_overlapping_reference_fields): 
	If class is under fulltrust allow reference types to overllap
	if they have the same RVA.

2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c: Added new flag valid-only, that makes the verifier
	behaves just like --security=validil. It won't fail type load
	due to unverifiable restrictions.

2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h (struct MonoMethod): Added a verification_success
	field to cache verifier executions. Reduced MonoMethod:slot size by
	one bit.

2008-04-23  Zoltan Varga  <vargaz@gmail.com>

	* sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
	instead of a 'vt' argument to save an indirection and to allow these to be used
	for valuetypes.
	(scan_vtype): New helper function to scan an area using a gc descriptor.
	(mono_gc_wbarrier_value_copy): Implement this.
	(handle_remset): Add support for REMSET_VTYPE.
	(find_in_remset_loc): Ditto.
	(mono_gc_base_init): Allow some debugging options to be controlled through the
	use of the MONO_GC_DEBUG env variable.
	(mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
	(collect_nursery): Add support for the 'check-at-minor-collection' debug option.

2008-04-23  Martin Baulig  <martin@ximian.com>

	* domain.c (mono_domain_create): Move the call to
	mono_debug_domain_create() down, after allocating the domain id.

2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>

	verify.c (verify_class_for_overlapping_reference_fields): Skip
	static fields while verifying for overlapping fields as they
	don't matter at all.

2008-04-23  Marek Habersack  <mhabersack@novell.com>

	* domain-internals.h: added a declaration of
	mono_make_shadow_copy.

	* assembly.c (mono_assembly_open_full): shadow copying of
	assemblies moved to here, so that all the assemblies within the
	application domain's private binary directories can be
	processed. Fixes bug #380546

	* appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
	mono_make_shadow_copy and made non-static. The decision whether
	to shadow-copy an assembly is made based on its location - it's
	copied if it's in one of the private application domain binary
	directories and its different to the target file in the shadow
	directory. Fixes bug #380546

2008-04-22  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.

	* object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
	types.

	* reflection.c (mono_image_create_token): Handle 
	Method/ConstructorOnTypeBuilderInst.
	(resolve_object): Ditto.
	(inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
	so it can be called from resolve_object. Also handle the case when the inflated
	class already has its methods setup.

2008-04-21  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.

2008-04-20  Geoff Norton  <gnorton@novell.com>

	* icall.c: Fix the _NSGetEnviron define to prevent an impropoer
	pointer dereference.

2008-04-15  Marek Habersack  <mhabersack@novell.com>

	* appdomain.c (try_load_from): if IOMAP is in effect, call the
	portability API to look up the assembly file. Fixes behavior in
	situations when the application has a bin/ directory, but the
	assembly search patch refers to Bin/ (and thus the requested file
	name is Bin/SomeLibrary.dll). Fixes bug #379888

2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>

	verify.c (mono_type_is_generic_argument): Extracted this check
	from a dozen places to here.

	verify.c: Fixed all issues related to boxing generic arguments
	and their constraints.

2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>

	verify.c (mono_class_interface_implements_interface): Fix win32 build.

2008-04-14  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
	isn't finished yet. Fixes #363447.

2008-04-13  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
	Fixes #346419.

2008-04-13  Jb Evain  <jbevain@novell.com>

	* domain.c: update the 2.1 profile versions.
	Merged from the Moonlight 2 branch.

2008-04-12  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_load_from_full): Do the check for loading other
	mscorlibs for the non-refonly case as well.

	* image.c (do_mono_image_load): Remove the mscorlib check, it is already done
	in mono_assembly_load_from_full (). Fixes #378924.

2008-04-11  Geoff Norton  <gnorton@novell.com>

	* icall.c: The global extern environ doesn't exist on Mac.  We
	need to call NSGetEnviron instead.

2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>

	verify.c: Add generic method constraint verification.

2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>

	class.c (mono_class_inflate_generic_method_full): Add a long
	explanation to the is_mb_open hack. Remove the FIXME.

2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Mark all unknown opcodes
	as invalid. Mark jmp as unverifiable.

2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Add code to do type constraint verification on class instances.

	* verify.c (mono_verifier_verify_class): Use the type constraint 
	verification code.

2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_get_field_default_value): Don't pass cindex
	as hint to mono_metadata_get_constant_index. The local is not initialized
	and should contain garbage most of the time. This could only work
	with a lot of luck.

2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.

2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h: Add generic_param_token to MonoClass::sizes union.

	* class.c (mono_class_from_generic_parameter): Save the token of the
	generic param in MonoClass::sizes.generic_param_token.

	* reflection.c (mono_custom_attrs_from_class): If the class type is
	VAR or MVAR retrieve the attributes of the generic param.

2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_init): Do class verification if the verifier
	is enabled.

2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify-internal.h: Added mono_verifier_verify_class.

	* verify.c: Added mono_verifier_verify_class. It checks for
	classes with explicit layout that have overlapping reference fields.

	* pedump.c: Init the verifier state prior to verification. Fixed
	command line arguments.

2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* Makefile.am: Added verify-internals.h, hopefully fix the build.

2008-04-08  Zoltan Varga  <vargaz@gmail.com>

	* verify-internals.h: Fix a warning.

2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify-internals.h: New header with the verifier configuration
	extracted from mini.c.

	* verify.c: Implemented the new functions exported by verify-internals.h.

2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Add proper verification of ckfinite.

2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_conversion): Improved error message to something
	more meanfull.

	* verify.c (check_is_valid_type_for_field_ops): Fix to work
	with primitive types.

2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Added tail prefix checking. Marked icall
	as unverifible.

2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Fix the detection of branches to the middle
	of an instruction.

2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Implemented verification of volatile. and
	unaligned. prefix. Check if a type is valid after retrieving it.

2008-04-01  Dick Porter  <dick@ximian.com>

	* process.c (process_get_fileversion): If there's no string block,
	set the file language to en_US.  Fixes the other new part of bug
	374600.

2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: New functions mono_method_can_access_field_full and
	mono_method_can_access_method_full. They perform type visibility
	and type site check.

	* class-internal.h: Added exported functions.

	* verify.c: Use new functions to implement proper visibility checks.

2008-03-29  Zoltan Varga  <vargaz@gmail.com>

	* mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.

2008-03-28  Dick Porter  <dick@ximian.com>

	* process.c (process_get_fileversion): Use the first language ID
	we see, rather than insisting on an invariant language.  Fixes bug
	374600.

2008-03-28  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (calc_section_size): Use add_stream_zero to align the size of
	the streams to fix reading of invalid memory later.

	* metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
	to ease debugging.

2008-03-26  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
	(cominterop_method_signature): Ditto. Fix the size passed to memcpy.

2008-03-26  Massimiliano Mantione  <massi@ximian.com>
	* threads.h: Added MonoThreadManageCallback type and
	mono_thread_set_manage_callback prototype
	* object-internals.h: In _MonoThread, renamed unused6 to manage_callback
	(used to store the mono_thread_manage callback).
	* threads.c: Added mono_thread_set_manage_callback, and handle
	"MonoThread->manage_callback" in build_wait_tids.

2008-03-26  Dick Porter  <dick@ximian.com>

	* process.c (process_get_fileversion): Set FileVersionInfo strings
	to Empty when the resource doesn't have the particular info.
	Fixes bug 355717.

2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): Proper prefix validation.

2008-03-25  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
	itself in a separate argument instead of throwing them. Fixes #373448.

	* appdomain.c: Bump corlib version.

2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Implemented readonly prefix and verify controled mutability pointers.

2008-03-20  Kornél Pál  <kornelpal@gmail.com>

	* file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
	version macros.

2008-03-20  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c, class-internals.h: Code for putting
	reflection types into the runtime generic context.

2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall.c (ves_icall_get_method_info): Return correct values for the call convention.
	Fixes #340662. 


2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (VerifyContext): Added instruction prefix data to the struct.

	* verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.

	* verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.

	* verify.c (do_cast): Let the result value keep the boxed status.

	* verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.

2008-03-17  Jb Evain  <jbevain@novell.com>

	* reflection.c: when running on a 2.0 runtime, emit
	unconditionally the #~ header version as 2.0, and the
	CLI header version as 2.5, for symmetry's sake with csc.

2008-03-16  Zoltan Varga  <vargaz@gmail.com>

	* class.c: Remove the unused cache_interface_offsets stuff.

	* class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
	profiler.c: Fix warnings.

2008-03-16  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c, class-internals.h: Support for putting
	methods into the runtime generic context.

2008-03-16  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_fields): Ignore calls made to this function for
	classes which are generic instances of not-yet finished typebuilders. Fixes
	#351172.

	* reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.

2008-03-15  Zoltan Varga  <vargaz@gmail.com>

	* metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.

	* class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
	field, replace it with a hash table in MonoDynamicImage.

	* reflection.c (inflate_mono_method): Access the generic definition object from
	image->generic_def_objects instead of imethod->reflection_info.

	* reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.	

	* icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
	
	* image.c (mono_image_close): Move the dynamic image freeing code to a separate
	function in reflection.c so it is easier to keep in sync with the dynamic image
	creation code.

	* reflection.c (mono_dynamic_image_free): New internal function, extracted from
	mono_image_close ().

2008-03-15  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_class_generic_sharing_enabled): Disable generic
	sharing for all architectures except AMD64 and x86 to fix build.

2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Use the generic definition MonoGenericContext when available.
	Remove code for checking generics instance compatibility in favor of
	mono_class_is_assignable_from.

2008-03-14  Mark Probst  <mark.probst@gmail.com>

	* marshal.c, marshal.h, metadata-internals.h, image.c,
	wrapper-types.h: New wrapper for invoking a shared static method
	without having to pass the runtime generic context argument.

2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>

	* icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.

2008-03-14  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_image_get_field_on_inst_token): Add caching.
	
	* reflection.c (mono_image_get_field_on_inst_token): New helper function to
	create a token from a FieldOnTypeBuilderInst.
	(mono_image_create_token): Handle FieldOnTypeBuilderInst.
	(resolve_object): Ditto.

	* object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
	mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.

2008-03-14  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.

	* debug-mono-symfile.h
	(MONO_SYMBOL_FILE_VERSION): Bump to 41.
	(MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.

2008-03-10  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h
	(MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
	`lexical_block_table_offset'.
	(MonoDebugMethodInfo): Removed `num_lexical_blocks' and
	`lexical_blocks'.
	(MonoSymbolFile): Added `version'.

	* mono-debug.h
	(MonoDebugLexicalBlockEntry): Removed.
	(MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
	`lexical_blocks'.

	* mono-debug.c (mono_debug_add_method): Don't compute lexical
	blocks here; the debugger now does this internally.

2008-02-27  Martin Baulig  <martin@ximian.com>

	* object.c (mono_runtime_exec_main): Call
	`mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
	`mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.

2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_type_compatibility_full): Allow native int to be converted
	to native pointer in non-strict mode. Required to "(IntPtr)null" work.

2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_ldftn_delegate): Accept a sealed type when using
	ldftn with a virtual method.

2008-03-13  Geoff Norton  <gnorton@novell.com>

	* decimal.c:  Only include memory.h if the platform has it.

Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>

	* assembly.c, class.c, metadata-internals.h: make sure public key
	tokesns are compared in a case-insensitive way. Also, all
	the lookups in the GAC use a lowercase public key token
	(gaacutil already does the lowercasing on install). Fixes
	bug #369541.

2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
	and return value.

Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>

	* image.c: when someone loads a mscorlib from a file, return the
	currently loaded mscorlib (fixes bug #369253).

Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>

	* class.c: handle types with no parents by forcing them to have
	System.Object as a parent and marking them as broken (this currently
	allows the first part of bug #369173 to work as well, likely because
	we don't check for typeload exceptions everywhere yet).

Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>

	* class.c: more complete check that types belong to corlib
	(fixes second part of bug #369173).

2007-03-10  Bill Holmes  <billholmes54@gmail.com>

	* generic-sharing.c:  Including glib.h for the MSVC builds to define
	  "inline" to "__inline" before including mono-membar.h.
	  
	* mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
	  Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
	  MSVC builds.

	Contributed under MIT/X11 license.

2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): Remove return type validation.

	* verify.c (do_ret): Do return type validation at return site instead of
	call site.

2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.

	* verify.c: Some todos cleaned and improved a few error messages.

2008-03-08  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_mono_type): Improve the test for corlib.

2008-03-07  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_mono_type): Handle types whose name clashes with
	system types correctly.

	* exception.h exception.c (mono_exception_from_token_two_strings): New helper
	function.

2008-03-06  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (build_assembly_name): Fix a warning.

Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>

	* marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
	the called function takes an object type argument. Fixes storing or
	valuetypes across remoting as well as reducing memory usage.
	* image.c, metadata-internals.h: remove now unused ldfld_remote and
	stfld_remote wrapper caches.

2008-03-06  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (mono_lookup_internal_call): Update the exception message when an icall
	is not found.

	* reflection.c (mono_image_register_token): New helper function to save
	a token->object mapping.	

	* icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
	managed code.

	* reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
	one dimension arrays. Fixes #367670.
	(mono_reflection_get_type_internal): Ditto.

Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>

	* marshal.c: mono_load_remote_field_new() always returns object.
	so use the proper signature (fixes bug #366445).

2008-03-04  Zoltan Varga  <vargaz@gmail.com>
	
	* class-internals.h (MonoMethod): Remove unused uses_this flag, 
	add an 'inline_failure' flag instead.

2008-03-04  Mark Probst  <mark.probst@gmail.com>

	* domain-internals.h, domain.c: Replaced MonoGenericSharingContext
	with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
	contains the location of "this", used for exception handling.

2008-03-04  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_layout_fields): Set the min alignment of small structs to
	their size on all platforms for perf reasons.

2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.h: Move mono_reflection_is_valid_dynamic_token to
	object-internal.h

	* object-internal.h: Same.

2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.h: Fix the build I just broke.

2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c (mono_reflection_is_valid_dynamic_token): New function,
	Test if a token is valid, this remove explicit usage of 
	MonoDynamicImage::tokens from the verifier code.

	* reflection.h: Added mono_reflection_is_valid_dynamic_token.

	* verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
	instead of direct access to MonoDynamicImage::tokens.

2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (token_bounds_check): Fix the build I just broke.

2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (token_bounds_check): Fix bounds check for dynamic images.

	* verify.c (verifier_load_method): Fixed the errors message.

	* verify.c (mono_method_verify): Fixed a debug message.

Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>

	* icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
	mono-perfcounters.h, class-internals.h: support for predefined
	writable counters, query of categories and counters, bugfixes.

2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_refanytype): Verify the refanytype opcode.

	* verify.c (mono_method_verify): Use do_refanytype.

2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_mkrefany): Verify the mkrefany opcode.

	* verify.c (mono_method_verify): Use do_mkrefany.

Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
	mono-perfcounters.c, mono-perfcounters.h: basic performance counter
	implementation.

2008-02-27  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
	the type load exception.

2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Added a few FIXME for method signatures

	* verify.c (do_invoke_method): Use mono_method_get_signature_full instead
	of mono_method_get_signature and get vararg call working. Removed unused
	checks for return value.

	* verify.c (do_refanyval): Verify the refanyval opcode.

	* verify.c (mono_method_verify): Implemented verification of arglist and
	use do_refanyval.

2008-02-27  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_methods): Move the check for synchronized methods on
	vtypes to marshal.c.

	* marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
	it works for AOT as well.

Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>

	* monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
	with mono_msec_ticks () which is monotonic and doesn't cause bugs when
	the system time is adjusted.

Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>

	* icall.c, icall-def.h: use the new time functions (fixes the
	non-monotonic behaviour of TickCount).

2008-02-26  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_custom_attrs_from_builders): Revert the last change as
	it breaks the build.
	
	* reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
	cattr is not finished yet.

2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Proper token validation for field, method and type.

2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>

	* loader.c (field_from_memberref): Generate a loader error if the type is not found.

	* loader.c (method_from_memberref): Generate type load error instead of method missing
	if the type is not found.

2008-02-23  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
	some of the conversions caused the generation of a marshal directive exception.

2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>

	verify.c: Report which exception should be thrown by the JIT.
	Added a lot of FIXME notes.

2008-02-22  Mark Probst  <mark.probst@gmail.com>

	* generic-sharing.c: Runtime generic context slots are not
	instantiated on init anymore.  Instead, provide function to do the
	instantiating on demand.

	* class-internals.h: Added vtable to runtime generic context.
	Macros for encoding direct and indirect slot offsets in one
	guint32.

2008-02-21  Mark Probst  <mark.probst@gmail.com>

	* object.c, generic-sharing.c: Moved some generic sharing code
	from object.c to generic-sharing.c.

	* generic-sharing.c: Added support for extensible runtime generic
	context.

	* metadata-internals.h: Two new hash tables in MonoImage for
	extensible runtime generic context support.

	* domain.c: Unregister generic vtables upon domain unloading.

	* image.c: Destroy new hash tables upon image unloading.

	* metadata.c: Unregister generic subclasses upon image unloading.

	* class-internals.h: New data structure for runtime generic
	context template.  New fields in the runtime generic context for
	extensible part.

	* Makefile.am: Added generic-sharing.c.

2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>

	icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
	there is a pending loader exception, raise it.

	icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
	same.

	icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
	same.

	Fixes #363450.

2008-02-20  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_Type_GetPacking): Handle dynamic types.

	* assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
	
	* assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
	ref-only requests for compatibility with MS.

2008-02-20  Raja R Harinath  <harinath@hurrynot.org>

	* reflection.c (mono_custom_attrs_from_method): Don't silently
	return an empty list for generic method instances.
	(mono_custom_attrs_from_param): Likewise.

2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
	    Raja R Harinath  <harinath@hurrynot.org>

	Fix #354757
	* class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
	* class.c (mono_class_inflate_generic_method_full): Initialize it
	when a fully-open method is instantiated.
	* metadata.c (inflated_method_equal, inflated_method_hash): Update
	to new field.
	* reflection.c (inflate_mono_method): Don't create a temporary context.

2008-02-20  Raja R Harinath  <harinath@hurrynot.org>

	* icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
	Compute correct value, to prepare for imethod->reflection_info going away.

2008-02-19  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.

2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Implement skip visibility flag.

2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
	which contains an extra field to tell the kind of exception that should be thrown.

	* verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.

2008-02-17  Raja R Harinath  <harinath@hurrynot.org>

	* loader.c (mono_method_get_param_names): Initialize 'klass' after
	'method' is updated.

2008-02-11  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_layout_fields): Set class->min_align for classes using
	explicit layout as well. Fixes #360375.

2008-02-11  Geoff Norton  <gnorton@novell.com>

	* loader.c: Guard and dereference against inflated generic methods

2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>

	* class.c: Include Retargetable spec in assembly name.
	* assembly.c: Always include PublicKeyToken spec in assembly name
	(with value "null" if assembly is not signed), and include
	Retargetable spec.
	* icall-def.h: Added icall for Assembly.get_fullname.
	* icall.c: Added icall returning the fullname of an assembly.

2008-02-09  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable_general): Add a missing call to
	mono_class_setup_methods () which is needed in the AOT case.

2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_type_get_stack_name): Added. Return the name for the
	stack type of the given MonoType.

	* verify.c (verify_type_compatibility_full): Handle the void type.

	* verify.c (is_compatible_boxed_valuetype): Changed to fit the
	way stack merging works.

	* verify.c (store_local): Improved verification message.

	* verify.c (do_branch_op): If the merging is invalid, the method
	is unverifiable and not invalid. Improved error message.

	* verify.c (merge_stacks): Properly merge a boxed valuetype and
	a reference type diferent than System.Object. Improved error
	message.

2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.

	* verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
	type of an enum even if the argument is byref.

	* verify.c: Replace all explicit uses of enumtype and enum_basetype
	to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.

	* verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.

	*verify.c (verify_type_compatibility_full): Make enum types
	compatible with their base types.

	* verify.c (is_compatible_boxed_valuetype): Added. Check if both
	types are compatible for the special case of a boxed valuetype and
	System.Object.

	* verify.c (verify_stack_type_compatibility): The function
	is_compatible_boxed_valuetype was extracted from here.

	* verify.c (push_arg): Only set ctx->has_this_store if the method
	is not static.

	* verify.c (do_ldelem): Fixed a typo in an error message and added
	strict check for mixing int32 and native int as the array type
	and ldelem type.

	* verify.c (merge_stacks): Consider boxed valuetypes in the
	compatibility checks.

2008-02-07  Massimiliano Mantione  <massi@ximian.com>
	* profiler.h: (MonoGCEvent): Added start-stop the world events.

2008-02-06  Massimiliano Mantione  <massi@ximian.com>
	*class.c: use_new_interface_vtable_code: renamed the env var to have
	a "MONO_" prefix, and fix the logic to enable it by default.

2008-02-06  Massimiliano Mantione  <massi@ximian.com>
	*class.c:
	mono_class_setup_vtable_general: rewrote the way in which interface
	methods are added to vtables. Makes bug-77127.exe pass, and hopefully
	makes the code more maintainable.
	For now the old code is still there, and can be activated setting
	the env var "USE_NEW_INTERFACE_VTABLE_CODE".

2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: guarded some debug functions around and #ifdef.

	* verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.

2008-02-06  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
	changes for now since they seem to break too many things.

2008-02-05  Mark Probst  <mark.probst@gmail.com>

	* marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
	mono_marshal_find_nonzero_bit_offset): Added macro and function
	for finding the byte- and bit-offset of a bitfield within a
	struct.

2008-02-05  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
	(mono_marshal_get_struct_to_ptr): Ditto.

	* marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
	cctor_signature.

2008-02-03  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
	between methods for non-corlib types.

2008-02-02  Geoff Norton  <gnorton@novell.com>

	* loader.c (mono_method_get_param_names): Populate the parameter name for 
	generic parameters as well. (Fixes #342536)

2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.

	* verify.c (do_invoke_method): Fix for calling with byref structs.

	* verify.c (do_cast): push a boxed value type based on the type token and not
	the type of stack.

2008-01-31  William Holmes  <billholmes54@gmail.com>

	* process.c (process_module_string_read): Check the size returned form 
	  VerQueryValue to avoid out of memory exception. 

2008-01-30  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
	Handle properly modules which are not in the moduleref table. Fixes
	#356938.

2008-01-29  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
	the dynamic case which is now in managed code.
	(ves_icall_System_Reflection_Assembly_GetTypes): Ditto.

	* marshal.c (mono_string_to_bstr): Fix a warning.
	(init_com_provider_ms): Ditto.

	* appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.

	* exception.c (mono_get_exception_out_of_memory): New helper function.

2008-01-28  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: Add support for BSTR marshalling
	using other COM systems.

	Code is contributed under MIT/X11 license.

2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_runtime_invoke_array): reverted previous
	commit as it breaks the build.

2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* object.c (mono_runtime_invoke_array): Verify arguments for
	invalid types. Fixes #348522.

2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
	non-final virtual calls using call. 

	* verify.c (do_invoke): fixed some TODOs.

	* verify.c (push_arg): set has_this_store for "ldarga 0".

2008-01-27  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
	which belong to an inflated class. Fixes #356531.

2008-01-26  Robert Jordan  <robertj@gmx.net>

	* file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
	which resort to FindFirstFile when a certain error condition
	(ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
	Code is contributed under MIT/X11 license.

2008-01-24  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (emit_marshal_string): Fix out string marshalling
	to use specified encoding. Fixes #323900.

	Code is contributed under MIT/X11 license.

2008-01-24  Raja R Harinath  <harinath@hurrynot.org>

	* class.c (mono_class_inflate_generic_method_full): Don't modify
	iresult->context after cache check.

2008-01-23  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_inflate_generic_method_full): Change the
	struct assignments to memcpy for better visibility and add some comments.

2008-01-23  Dick Porter  <dick@ximian.com>

	* threads.c (mono_threads_set_shutting_down): Simplify shutdown
	procedure, and make it work on windows.

2008-01-22  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
	a MonoReflectionTypeBuilder since it is always of that type.

	* reflection.c (mono_type_get_object): Remove an unneccesary check.	

	* reflection.c (mono_generic_class_get_object): Simplify this a bit.

	* reflection.c (mono_reflection_bind_generic_parameters): Ditto.
	
	* icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.

	* icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.

	* reflection.c (mono_reflection_create_runtime_class): Remove already created
	instantiations from the type cache.

2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_ldstr): fixed token verification. previous code was 100% broken.

	* verify.c (do_unbox_value): push a controled mutability managed pointer.

2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_ldstr): added, verifies if the #US token is valid.

	* verify.c (mono_method_verify): removed old TODO

2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_newobj): add visibility check.

2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_load_function_ptr): add visibility check.

2008-01-21  Massimiliano Mantione  <massi@ximian.com>
	*class.c:
	mono_generic_class_get_class: hook profiler events.
	mono_field_get_offset: added to support heap-shot in the new profiler.
	*class.h: exported mono_field_get_offset.
	* reflection.c:
	mono_reflection_setup_internal_class: hook profiler events.

2008-01-20  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
	argument here too and use it to avoid checking for pending exceptions if 
	possible.

2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>

	* assembly.c (build_assembly_name): add arg for passing the assembly
	flags. Do not consider a PublicKey with value "null" valid.
        (mono_assembly_name_parse_full): added boolean argument that will be
	set if the assembly name contains a PublicKeyToken spec. Added support
	for the Retargetable spec for which only Yes or No are allowed as valid
	value. Consider assembly name invalid if Retargetable spec is set, but
	either version, culture or public key (token) are not specified.
	* metadata-internals.h: sync signature of mono_assembly_name_parse_full
	with implementation in assembly.c.
	* icall.c (fill_reflection_assembly_name): also copy assembly flags
	from MonoAssemblyName.
	(ves_icall_System_Reflection_AssemblyName_ParseName): use newly
	introduced argument for mono_assembly_name_parse_full to know if the
	assembly name has a PublicKeyToken spec, and if it has instruct
	fill_reflection_assembly_name to use default value for keyToken (if
	PublicKeyToken is null).

2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): fixed ovf ops with
	float values. They are unverifiable now.

2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (set_failure_from_loader_error): add BadImageException to the
	list of exceptions that can cause a type to fail to load.

	* class.c (mono_class_get_exception_for_failure): same.

2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (in_any_exception_block): added, check if offset
	is part of any exception handling clause.

	* verify.c (get_stack_type): added VAR and MVAR types.

	* verify.c (do_stobj): better error messages.

	* verify.c (do_cpobj): added, check cpobj.

	* verify.c (do_initobj): added, check initobj.

	* verify.c (do_sizeof): added, check sizeof.

	* verify.c (do_localloc): added, check localloc.

	* verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.

2008-01-17  Zoltan Varga  <vargaz@gmail.com>

	* method-builder.c (mono_mb_emit_native_call): Get rid of the unused
	save_lmf/restore_lmf opcodes.

	* threads.c (mono_threads_install_notify_pending_exc): New function to
	install a callback notifying the JIT there is a pending exception on a thread.
	(mono_thread_request_interruption): Call the new callback.
	(mono_thread_get_and_clear_pending_exception): New function to return the
	exception pending on a thread.

	* marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
	to turn off checking for pending exceptions.
	(mono_marshal_get_native_wrapper): Ditto.

2008-01-16  Zoltan Varga  <vargaz@gmail.com>

	* threads-types.h: Get rid of the unnecessary extern declarations.

2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>

	* icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
	return field from parent class if not private.
	(ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
	returns fields from parent class if they are not private.
	(method_nonpublic): added function to determine if a given method
	should be considered non-public. Returns false for private methods
	on parent class, and internal methods from parent on the 1.0 profile.
	(ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
	use method_nonpublic function to determine whether method should be
	returned.
	(property_accessor_public): use newly introduced method_nonpublic
	function to determine whether accessor is non-public. 
	(ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
	event from parent class if not private. Only return static event if
	Static flag is set, and only return static event from parent class if
	FlattenHierarchy flag is set.
	(ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
	include non-private events from parent class.

2008-01-16  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
	warning.

2008-01-16  Wade Berrier <wberrier@novell.com>

	* security.c: Add assembly.h header to appease some warnings

2008-01-16  Dick Porter  <dick@ximian.com>

	* process.c (process_module_string_read): Remove trailing null
	when saving string.

2008-01-16  Mark Probst  <mark.probst@gmail.com>

	* class-internals.h: A new data structure describing the layout of
	a runtime generic context (MonoRuntimeGenericContextTemplate).

	* metadata-internals.h: Added a hash table to MonoDomain that maps
	from open generic classes to their runtime generic context
	templates.

	* object.c: Building of the runtime generic context, including
	proper handling of generic type arguments of superclasses.
	Building of the runtime generic context according to the template.

2008-01-15  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_fields): Set field.count for generic instances.
	Fixes #350856.

	* image.c (do_mono_image_open): Pass TRUE as last_exists to 
	mono_portability_find_file (). Fixes #325466.
	(mono_image_get_public_key): Fix a warning.

2008-01-14  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
	Fixes #353550.
	(mono_class_from_name_case): Ditto.

2008-01-13  Eyal Alaluf <eyala@mainsoft.com>

	* icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
	  common storage for the tables used in the System/NumberFormatter class.

2008-01-13  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.

2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (get_boxable_mono_type): check if the token is valid.

	* verify.c (set_stack_value): changed to add an error if an
	invalid type is set on stack. Changed all callers due to signature change.

	* verify.c (do_stobj): implement stobj validation.

2008-01-11  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (reflection_methodbuilder_to_mono_method): No need to
	set container->is_method, it was set earlier.

	* metadata.c (type_in_image): Handle MVARs which belong to not finished
	generic methods.

	* reflection.c (mono_reflection_initialize_generic_parameter): Set
	is_method of the generic container to TRUE for methods.

2008-01-10  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (type_in_image): Handle type parameters properly.

	* class-internals.h (MonoGenericParam): Add an 'image' argument to track
	memory ownership of this structure.

2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (get_boxable_mono_type): make typedref types been just
	unverifiable. check for void type.

	* verify.c (do_unbox_any): added, verify opcode unbox.any.

	* verify.c (do_load_function_ptr): accept method spec tokens.

2008-01-10  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_class_native_size): Always set *align even if this is called
	recursively.

2008-01-09  Zoltan Varga  <vargaz@gmail.com>

	* verify.c (mono_verify_corlib): Remove this as it was not used and was 
	out-of-date.

2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: removed some old unused tables. A huge bunch of small fixes
	to things found while testing the verifier with mono basic.

	* verify.c (dump_stack_value): dump null literal flag to.

	* verify.c (verify_type_compatibility_full): fix comparison
	for types that have a generic super type.

	* verify.c (verify_stack_type_compatibility): fix compatibility
	between null literals and reference types. fix compatibility between
	boxed valuetypes and object. fix corner case test for enums.

	* verify.c (do_cmp_op): proper verification of cgt.un in case
	of reference types.

	* verify.c (do_invoke_method): fix error message.

	* verify.c (do_store_indirect

	* verify.c (check_is_valid_type_for_field_ops): proper verification
	of managed pointers to valuetypes and boxed valuetypes. proper verification
	of null literals.

	* verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
	allow token to be a reference type.

	* verify.c (do_cast): proper handling of boxes valuetypes.

	* verify.c (do_stelem): proper handling of storing a boxed valuetype
	in object[].

	* verify.c (mono_method_verify): pass the opcode to do_cmp_op
	to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
	fixed the decoding of unbox_any

2008-01-08  Zoltan Varga  <vargaz@gmail.com>

	* boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.

2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_newobj): do delegate verification.

	* verify.c (verify_delegate_compatibility): perform delegate
	verification.

	* verify.c (verify_ldftn_delegate): perform tests related to
	ldftn delegates.

	* verify.c (mono_delegate_signature_equal): perform the
	slightly diferent signature comparison required by delegates.

	* metadata.c (mono_metadata_type_equal_full): added and exported
	as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
	allows signature only comparison.

	* metadata-internal.h (mono_metadata_type_equal_full): added and exported
	as MONO_INTERNAL.

2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: added a bunch of stack_slot_* functions to
	make access to stack slot type easier. This is required to
	allow optional flags, like null literal, boxed value and
	this pointer.
	All access paths to IlStackDesc::stype have been changed 
	to use these new funcions.
	Removed a bunch of unused functions and cleared all warnings.
	This patch introduces the usage of the this pointer and 
	boxed value flags.

2008-01-07  Zoltan Varga  <vargaz@gmail.com>

	* boehm-gc.c (mono_gc_deregister_root): Fix win32 build.

2008-01-06  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
	match managed version.

	* appdomain.c: Bump corlib version.
	
	* appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
	argument.

2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>

	* icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
	Set public key token to zero-length byte array if assembly is not
	strongnamed.

2008-01-05  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
	writing a vtype array elem.

2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>

	* assembly.c (build_assembly_name): return FALSE if length of token is
	not 16 (if not "null").
	(mono_assembly_name_parse_full): return FALSE if value of version,
	culture, token or key is 0.
	* icall.c (fill_reflection_assembly_name): add boolean arguments to
	specify whether public key and public key token must be set to default
	value (zero-length byte array) if not available. Set versioncompat to
	SameMachine. If public key is available or the default is set, then
	set PublicKey flag.
	(ves_icall_System_Reflection_Assembly_FillName): if no public key
	is available, use empty byte array as default value. On the 2.0
	profile, use default value for public key token if not set.
	(ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
	profile, use default value for public key if not set. On the 2.0
	profile, use default value for public key token if not set.
	(ves_icall_System_Reflection_AssemblyName_ParseName): do not set
	default values for public key and public key token.

2008-01-05  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
	field to keep it in synch with the managed object.

	* marshal.c (emit_marshal_object): Add support for byref marshalling of
	delegates. Fixes #351520.

	* sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
	contains defined memory.
	
	* sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.

	* sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
	
	* sgen-gc.c (check_consistency): New helper function to do a consistency check
	of the GC data structures.

	* gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.

	* *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
	
	* object.c (mono_array_full_copy): Fix detection of whenever to use a write
	barrier.
	(mono_array_clone_in_domain): Ditto.
	(mono_array_clone_in_domain): Ditto.

	* threads.c (start_wrapper): Register the thread start argument as a GC root.
	(cache_culture): Use a write barrier.

	* icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
	(ves_icall_get_property_info): Ditto.

	* object.h (MONO_STRUCT_SETREF): New macro.

	* class-internals.h (MonoStats): Add some GC statistics.

	* boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().

2008-01-04  Andreas Faerber  <andreas.faerber@web.de>

	* exception.c (mono_exception_from_name_two_strings):
	Break from loop after method is found.

2008-01-04  Dick Porter  <dick@ximian.com>

	* process.c (process_module_string_read): Rename variable to
	reflect correct usage, after fixing bug 345972.

2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_type_create_fnptr_from_mono_method): 
	created a MonoType function pointer instance to be used during
	verification. The verifier releases this memory at end.

	* verify.c (mono_method_is_constructor): extracted repeated
	checks for constructor into a single class.

	* verify.c (do_push_field): use new extracted method
	for constructor check.

	* verify.c (do_newobj): same.

	* verify.c (do_ldftn): renamed to do_load_function_ptr
	and make it verify ldvirtftn too.

	* verify.c (mono_method_verify: proper verification
	of ldvirtftn. release created MonoMethod instances.

2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (token_bounds_check): added.

	* verify.c (do_ldftn): added.

	* verify.c (mono_method_verify): proper verificartion of ldftn.

2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>

	* metadata.c (mono_metadata_decode_row): Assert if index is bigger
	than the table row count. It's the resposibility of the caller to
	make the bounds check and raise the correct error.

	* metadata.c (mono_metadata_decode_row_col): Same.

	* loader.c (mono_get_method_from_token): perform bounds check
	on token for methoddef table.

2007-12-29  Miguel de Icaza  <miguel@novell.com>

	* icall.c
	(ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
	assert into a negative result, the managed code already coped with
	that.

	Some folks on Windows reported this error. 

2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>

	* appdomain.c: Bump corlib version.
	* icall.c:
	(ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
	CultureInfo.CreateCulture to create CultureInfo for name.
	(fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
	create CultureInfo for name. Fixes bug #347174.

2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
	flags.

	* verify.c (is_valid_branch_instruction): allow branching to the
	first instruction of the protected block.

	* verify.c (is_valid_cmp_branch_instruction): same.

	* verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
	avoid double initialization.

	* verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
	detect which cases the eval stack should just be copied.

	* verify.c (mono_method_verify): check if the eval stack
	is empty when entering a protected block.

2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: added is_clause_in_range, is_clause_inside_range,
	is_clause_nested and verify_clause_relationship. They perform
	the verifications stated in P1 12.4.2.7.

	* verify.c (mono_method_verify): remove some unused variables,
	add the new exception clause checks, add instruction border
	checks for protected block start/end, improved some error 
	messages and fixed a bug in the way invalid instruction access
	is detected.

2007-12-26  Zoltan Varga  <vargaz@gmail.com>

	* boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
	from GC 7.0 if available.

	* object.c: Remove an unused define.
	
	* object.c (mono_class_compute_gc_descriptor): Fix a warning.

	* boehm-gc.c (mono_gc_make_descr_for_array): Implement.

	* null-gc.c (mono_gc_make_descr_for_array): Implement.

	* object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.

	* gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
	to take the same arguments as the other make_descr functions.

	* boehm-gc.c null-gc.c: Add implementation for make_descr functions.

	* objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
	directly.

	* boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
	mini.c.

	* object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
	call to boehm-gc.c.

	* boehm-gc.c (mono_gc_register_root): Fix a warning.

	* null-gc.c (mono_gc_register_root): Fix a warning.

	* reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.

	* boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
	(mono_gc_base_init): Call GC_init ().

	* null-gc.c: Define mono_gc_register_root () as a no-op.

	* domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().

2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: add prototype for merge_stacks at top

	* verify.c (do_switch): added.

	* verify.c (merge_stacks): on some cases the stack merging
	was not happening properly. Unequal stack sizes at merge
	points should be invalid.

	* verify.c (mono_method_verify): added more debug info on stack state.
	verify switch properly.

2007-12-24  Zoltan Varga  <vargaz@gmail.com>

	* method-builder.h: New file, moved the mono_mb_ declarations here from 
	marshal.h.

	* boehm-gc.c marshal.c: Include method-builder.h.

	* marshal.c: Use mono_mb_emit_branch_label () in a few places.

	* marshal.c: Remove some code which is now in method-builder.c.

2007-12-23  Zoltan Varga  <vargaz@gmail.com>

	* method-builder.c: New file, extraction of the method builder functionality 
	from marshal.c.

	* marshal.c: Move the mb functions into method-builder.c.

	* marshal.h marshal.c: Export some mono_mb_... functions.

	* marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.

	* loader.c (field_from_memberref): Remove the dynamic case, it is handled in
	the caller.

	* class.c (mono_class_get_full): Check the token type in the dynamic case.

	* loader.c (mono_field_from_token): Ditto.	

	* loader.c (mono_get_method_from_token): Change the check so it checks memberref
	type as well.
	
	* loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
	Fixes #342565.

	* class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
	a helper function for setting it.

	* loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.

	
	* assembly.c: Significally simplify code now that referenced assemblies are 
	loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.

	* threads.h: Don't include  the internal threads-types.h header file. Fixes
	#349952.

2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
	instructions that were target of branches or are at protected block boundaries.

	* verify.c (in_same_block): handle filter clauses.

	* verify.c (is_valid_branch_instruction): added. checks the target of
	instructions br or brtrue/false.

	* verify.c (is_valid_cmp_branch_instruction): added. checks the target of
	binary branch instructions such as beq and bge.

	* verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
	and made it pin the instruction as been part of the exception block.

	* verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
	of in_same_block.

 	* verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
	of in_same_block.

	* verify.c (do_ret): ret from a protected block is unverifiable and
	not invalid.

	* verify.c (do_static_branch): verify br and br.s instructions.

	* verify.c (merge_stacks): add extra param to support detection
	of branches in the middle of instructions.
	
	* verify.c (mono_method_verify): verify branches and exception blocks
	that target the middle of instructions. Proper verification of br and br.s.

2007-12-21  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
	skip_visibility field.
	(reflection_methodbuilder_from_dynamic_method): Ditto.

	* object.c (mono_class_compute_gc_descriptor): Remove more unused icall
	registrations. Fixes #348193.

	* threads.h: Move the internal mono_thread_get_pending_exception () to
	threads-types.h and rename it to mono_thread_get_undeniable_exception ().

2007-12-20  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
	icall registration. Fixes #348193.

	* marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
	for corlib classes into object. Fixes #349621.

2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>

	* icall.c (property_accessor_nonpublic): new function to determine
	whether an accessor allows a property to be considered non-public.
	Returns false for private accessor(s) from parent class, and internal
	accessor(s) from parent on 2.0 profile (and higher).
	(ves_icall_Type_GetPropertiesByName): Use newly introduced function
	to determine whether property should be included if NonPublic flag
	is set. Fixes bug #349078.

2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (init_stack_with_value): added.

	* verify.c (mono_method_verify): extracted common
	code for exception initialization into init_stack_with_value.

	* verify.c (mono_method_verify): initialize the exception
	for handler clauses as well.

	* verify.c (mono_method_verify): fix the exception clause
	ordering rules, it should use handler end offset and not
	start offset.

Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>

	* rawbuffer.c: remove useless warning.

Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>

	* threads.h, threads-types.h: move functions to the correct header
	(fixes bug#349952).

2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): proper verification
	of exception handling clauses ranges and fallthru in
	and out of protected blocks.

2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): fixed compilation issue.

2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): a printf slipped in, changed
	to use verifier debug macro.

2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_correct_leave): check for filter clauses.

	* verify.c (do_filter): added.

	* verify.c (mono_method_verify): property verification of leave.


2007-12-18  Mark Probst  <mark.probst@gmail.com>

	* threads.c: Disable calls to _wapi_thread_signal_self() to fix
	Win32 build, until we figure out how to do the proper thing on
	Win32.

2007-12-17  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
	by the previous patch.
	
	* appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
	the assembly resolve handler for refonly assemblies.

2007-12-17  Mark Probst  <mark.probst@gmail.com>

	* threads.c, thread-types.h, icall.c: New shutdown safeguards.
	Make sure only one thread is allowed to commence shutdown, and
	don't allow new threads to be started once shutdown is in
	progress.

2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_correct_endfilter): added.

	* verify.c (is_unverifiable_endfilter): added.

	* verify.c (do_endfilter): added.

	* verify.c (mono_method_verify): property verification of endfilter
	and fixed a corner case or endfinally.

2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.h: new flags to support fail fast of unverifiable code and
	do non-strict verification. Non-strict verification is required to
	have MS runtime compatibility. There are a huge amount of unverifiable
	code that it accepts as verifiable. The strict mode verifies the code
	as the specs says.
	Non-strict mode will be required in cases where code needs to be
	accepted as verifiable but fails under strict mode.

	* pedump.c: added support to fail fast and non-strict verification.

	* verify.c: added support for both fail fast and non-strict verification.

2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (is_correct_endfinally): added.

	* verify.c (mono_method_verify): property verification of endfinally.

2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (in_any_block): check for filter clauses.

	* verify.c (is_correct_rethrow): added.

	* verify.c (mono_method_verify): property verification of rethrow.

	* metadata.h: added MONO_OFFSET_IN_FILTER macro.

2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_throw): added.

	* verify.c (mono_method_verify): property verification of throw

2007-12-11  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
	assemblies. Fixes #346425.

2007-12-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
	FieldBuilders.

	* icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.

	* class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
	prevent asserts when this is called with a token which might not be valid.

	* icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
	lookup_dynamic_token_class with valid_token == FALSE.

	* icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.	

	* icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.

	* icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
	
2007-12-10  Mark Probst  <mark.probst@gmail.com>

	* gc.c: Don't delay threadpool thread finalization unless Mono is
	shutting down.

Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>

	* threads.c: turn an assert into a non-fatal warning.

2007-12-09  Robert Jordan  <robertj@gmx.net>

	* icall.c (GetVirtualMethod): Add missing argument validation.

2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_cast): added.

	* verify.c (mono_method_verify): property verification of castclass and isinst.


2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_type_from_opcode): added opcodes for stelem.X.

	* verify.c (do_stelem): added.

	* verify.c (mono_method_verify): property verification of stelem.X.

2007-12-07  Mark Probst  <mark.probst@gmail.com>

	* class.c, class-internals.h: Introduce an environment variable
	(MONO_GENERIC_SHARING) through which the extent of generic code
	sharing can be controlled (share all classes, share only corlib
	classes, or share nothing).

	* object.c: Only create runtime generic context for classes for
	which sharing is enabled.

2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_ldelem): refactor it to work with ldelem.any.

	* verify.c (mono_method_verify): property verification of ldelem.any.

2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
	added ldelem.X opcodes.

	* verify.c (do_ldelema): fixed possible invalid usage of MonoType.

	* verify.c: proper verification of ldelem.X 

2007-12-06  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.

2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): null literal requires special handling,
	the value pushed on stack need to be flagged as so.

	* verify.c (do_ldelema): Verify ldelema properly.

2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Verify ldlen properly.

2007-12-05  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
	to the target object's type. Fixes #346160.

2007-12-05  Dick Porter  <dick@ximian.com>

	* threadpool.c (socket_io_add_poll): Asynchronous connect() on
	Solaris needs the same workaround as BSD-derived systems.  Fixes
	bug 323524, patch by Burkhard Linke
	<burkhard.linke@CeBiTec.Uni-Bielefeld.DE>

2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>

	* process.c: When ProcessStartInfo.ErrorDialog is true, pass window
	handle to use when error dialog is shown; otherwise, update mask
	to show no error dialog when an error occurs.

2007-12-03  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.

	* class.c (mono_class_get_field_default_value): New helper function to initialize
	field->def_type and field->data.

2007-11-30  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
	the general one.

	* object.c (mono_runtime_create_delegate_trampoline): New helper function.

	* marshal.c: Avoid depending on delegate->method_info being set.

	* object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
	
	* object.c (mono_delegate_ctor): Set delegate->method.

	* object-internals.h (struct _MonoDelegate): Add 'method' field.

	* appdomain.c: Bump corlib version.

2007-11-27  Raja R Harinath  <harinath@gmail.com>

	* metadata.c (mono_generic_inst_equal_full): Short-circuit
	equality check if we're comparing canonicalized MonoGenericInsts.

2007-11-23  Zoltan Varga  <vargaz@gmail.com>

	* class.c (generic_array_methods): Call mono_class_setup_methods () before
	accessing class->methods.

2007-11-22  Dick Porter  <dick@ximian.com>

	* threads.c: Ensure that the synch_cs is set before trying to use
	it.

Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>

	* profiler.c: r89126 broke the statistial profiler, unbreak.

2007-11-22  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.

	* mono-debug.c
	(mono_debug_debugger_version): Bump to 3.
	(mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
	-> mono_debugger_class_initialized().

	* mono-debug-debugger.c
	(mono_debugger_add_type): Renamed into mono_debugger_class_initialized().

	* class.c
	(mono_debugger_start_class_init_func): Removed.
	(mono_debugger_class_loaded_methods_func): Added.
	(mono_class_setup_methods): Call it here.

2007-11-22  Martin Baulig  <martin@ximian.com>

	* mono-debug.c
	(mono_debug_add_delegate_trampoline): New public method.
	(MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.

	* mono-debug.h
	(MonoSymbolTable): Added `global_data_table'.
	(MonoDebuggerTypeKind): Removed.

2007-11-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
	these methods.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
	
Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>

	* object.c: some fields don't have a valid rva: ignore them (bug #343083).

2007-11-20  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.

	* mono-debug-debugger.c
	(mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
	(mono_debugger_remove_breakpoint): Likewise.
	(mono_debugger_check_breakpoints): Likewise.
	(mono_debugger_register_class_init_callback): New public method.
	(mono_debugger_remove_class_init_callback): Likewise.
	(mono_debugger_add_type): Likewise.

	* mono-debug-debugger.h
	(MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.

Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: more interface implementations needed for the
	array enumerator (fixes bug #341112).

2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>

	* icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
	fix ParamName of ArgumentNullExceptions.

2007-11-17  Miguel de Icaza  <miguel@novell.com>

	* reflection.c (mono_reflection_encode_sighelper): Generate the
	modopts and modreqs.   I have a useless test that crashes monodis,
	but that shows the code working.

2007-11-17  Zoltan Varga  <vargaz@gmail.com>

	* boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
	(mono_gc_get_managed_allocator): Enable the string allocator on amd64.

2007-11-15  Dick Porter  <dick@ximian.com>

	* threads.c (ves_icall_System_Threading_Thread_Join_internal):
	When joining a thread, it's the thread that's calling Join that
	gets WaitSleepJoin state not the target.  Fixes the standalone
	test case in bug 334740, and hopefully the whole bug too.

2007-11-15  Dick Porter  <dick@ximian.com>

	* process.c: Read file version info from the files pointed at by
	process modules, not the current process.  Fixes bug 315969.

	Use windows typedef names in some places to fix warnings on the
	windows build.

2007-11-15  Mark Probst  <mark.probst@gmail.com>

	* image.c, metadata-internals.h: Added a generic_class_cache hash
	to MonoImage for looking up generic classes when sharing generics.

Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: warning cleanups.

2007-11-15  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
	inherited properties.

2007-11-14  Mark Probst  <mark.probst@gmail.com>

	* object.c, class-internals.h: Added more information to the
	runtime generic context.

2007-11-13  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
	instead of just the target method. Generalize the abstract method handling to
	handle any non-static method.

	* icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
	mono_marshal_get_delegate_invoke () signature change.

2007-11-13  Mark Probst  <mark.probst@gmail.com>

	* class.c, class-internals.h: Made
	mono_type_get_basic_type_from_generic () public.  Fixed member
	access check for shared generics.

	* loader.c: Don't insert field into field cache if it's part of a
	non-inflated generic class.

	* domain.c, domain-internals.h: The generic sharing context is now
	part of the jit info data structure.  Added two accessor
	functions.

2007-11-12  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
	the array Get/Set/Address methods, since the JIT inlines them.

	* metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.

	* image.c (mono_image_close): Free runtime_invoke_direct_cache.
	(mono_image_init): Initialize runtime_invoke_direct_cache.	

	* icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
	mono_marshal_get_delegate_invoke signature change.

	* marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
	an additional argument. Add support for invoking abstract methods.

	* metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.

	* image.c (mono_image_close): Free delegate_abstract_invoke_cache.	

2007-11-09  Mark Probst  <mark.probst@gmail.com>

	* class.c: Do field layout for open generic classes as well.

2007-11-09  Mark Probst  <mark.probst@gmail.com>

	* gc.c, gc-internal.h: Don't finalize threadpool threads with
	other objects, because the threadpool is still around.  Put them
	in a list instead and after finalizing all other objects in the
	root domain shut down the thread pool and then finalize the
	threads.  Fixes bug #337383.

	* threads.c, thread-types.h: New mono_thread_create_internal()
	function for marking a thread with the threadpool flag before it
	started.  Set synch_cs to NULL after freeing it.

	* threadpool.c: Mark threadpool threads before they start.

Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: don't export random functions
	and lazy load dbnull and missing objects.

2007-11-07  Jonathan Chambers <joncham@gmail.com>

	* class.c: Initialize COM types if COM interfaces
	are present (not just COM classes).
	
	Code is contributed under MIT/X11 license.

2007-11-07  Massimiliano Mantione  <massi@ximian.com>
	* reflection.c:
	create_dynamic_mono_image: hook module profiler events (dynamic case).
	mono_image_basic_init: hook assembly profiler events (dynamic case).

2007-11-07  Massimiliano Mantione  <massi@ximian.com>
	* profiler.c:
	simple_appdomain_unload: completely terminate the profiler
	instead of only processing the statistical samples.
	simple_shutdown: make sure this is really called exactly once,
	even in multithreaded applications, and always listen to
	appdomain events.
	* gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
	here, the "[un]load" functions will do it.
	Fixes bugs #333791 and #325261.

2007-11-07  Geoff Norton  <gnorton@novell.com>

	* socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
	rather than depend on __APPLE__.

2007-11-07  Mark Probst  <mark.probst@gmail.com>

	* icall.c: Safety checks in InitializeArray.  Fixes bug #324535.

2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 

	* object.c: Fix mono_string_to_utf8 to handle NULL values inside the
	UTF16 MonoString. Fix the crash from bug #335488

2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>

	* marshal.c: Correct (for non-Win32 OS) length != size in 
	mono_string_from_bstr. Fix #339530.

2007-11-06  Geoff Norton  <gnorton@novell.com>

	* socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
	to succeed

2007-11-05  Kornél Pál  <kornelpal@gmail.com>

	* process.c: Added run-time GetProcessId API detection for Windows.

2007-11-04  Miguel de Icaza  <miguel@novell.com>

	* reflection.c 	(mono_param_get_objects): If a parameter has the
	attribute [System.Runtime.InteropServices.Optional] we should
	set the DefaultValue of the ParameterInfo to be
	System.Reflection.Missing instead of DBNull.

	See bug #339013.

	(mono_get_reflection_missing_object): New method,
	returns the System.Reflection.Missing.Value singleton instance.

2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2007-11-02  Jonathan Chambers <joncham@gmail.com>

	* icall.c: Use GetEnvironmentStrings on windows
	so we are using the same environment block as 
	GetEnvironmentVariable/SetEnvironmentVariable. Fixes
	#333740.
	
	Code is contributed under MIT/X11 license.

2007-10-31  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.

	* mono-debug-debugger.h
	(MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.

2007-10-30  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
	classes.

2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2007-10-30  Robert Jordan  <robertj@gmx.net>

	* icall-def.h, icall.c:
	Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().

	Code is contributed under MIT/X11 license.

2007-10-29  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable): Find the inflated methods in the
	inflated class instead of inflating them again.
	
	* class.c (mono_class_setup_vtable): Inflate the override methods in the 
	dynamic case.

	* class.c (mono_generic_class_get_class): Set klass->property.count as well.
	Call setup_supertypes () after klass->parent is set.
	(mono_class_setup_properties): Enable this to work on dynamic generic classes.

	* reflection.c (mono_type_get_object): Only return a MonoGenericClass object
	for inflated instances of not yet created dynamic generic classes.
	(ctorbuilder_to_mono_method): Handle the case when this is called multiple
	times from inflated_method.
	(methodbuilder_to_mono_method): Ditto.

Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>

	* gc.c: code cleanup and removed old untested option of not creating the
	finalizer thread.

2007-10-29  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
	creating a jump trampoline for dynamic methods.

2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>

	* reflection.c (mono_image_create_token): Correctly encode methods and constructors of
	generic TypeBuilders when called from another method of the same type (bug #335131).


2007-10-27  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (methodbuilder_to_mono_method): Revert the last change as it
	doesn't seem to work perfectly.
	
	* reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
	called multiple times.
	(methodbuilder_to_mono_method): Ditto.
	(resolve_object): Inflate FieldBuilder's.

Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* string-icalls.c, string-icalls.h, appdomain.c: patch from
	Tyler Larson <mono-devel@tlarson.com> to fix the handling of
	RemoveEmptyEntries in the string.Split implementation (bug #322375).

2007-10-26  Dick Porter  <dick@ximian.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump version because of
	Thread initialisation changes

2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>

	* verify.c: fix compatibility check between arrays and System.Array

2007-10-26  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
	too. Fixes #336999.

2007-10-25  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_value_box): Use typed allocation here.

2007-10-23  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
	trampoline instead of compiling the method right away.

	* class-internals.h object.c: Add a JIT callback to create a jump trampoline.

2007-10-21  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
	related fields for dynamic classes. Fixes #334493.

2007-10-20  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_generic_class_get_class): Set klass->field.count as well.
	
	* class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.

	* class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
	(mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.

	* class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.

	* reflection.c (create_generic_typespec): Initialize klass->generic_container
	if needed.
	(reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.

2007-10-18  Jonathan Chambers <joncham@gmail.com>

	* marshal.c: Use correct key when removing item
	from ccw_hash.
	
	Code is contributed under MIT/X11 license.

2007-10-17  William Holmes  <billholmes54@gmail.com>

	*marshal.c: Adding a case to marshal booleans to U1

	Code is contributed under MIT/X11 license.

2007-10-18  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_from_name): Search the modules compromising dynamic
	assemblies. Fixes #331601.

2007-10-16  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
	exception if the type name contains an assembly component. Fixes #334203.

	* reflection.c (mono_reflection_get_type_with_rootimage): Search all the
	modules inside dynamic assemblies. Fixes #334200.
	
	* reflection.c: Set image->public_key and image->public_key_length;

	* metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
	fields.

	* image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.	
	
2007-10-16  Mark Probst  <mark.probst@gmail.com>

	* metadata.c: Implemented correct comparing of generic classes.
	An inflated generic class can be equal to a non-inflated one if it
	is inflated with generic type variables as type arguments.  Fixes
	bug #333798.

2007-10-15  Dick Porter  <dick@ximian.com>

	* monitor.c (mono_monitor_try_enter_internal): Set thread state to
	WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
	81646.

	* threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
	instead of a monitor lock.  This means that monitor_try_enter and
	co can set the thread state safely.
	(ves_icall_System_Threading_Thread_Interrupt_internal): Always set
	thread_interrupt_requested, so interrupt actually works.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
	ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
	state accessor function

2007-10-15  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
	the debugger with the current runtime.

Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* object.c, object-internals.h: added the ability to set a single
	trampoline for all the slots in a vtable.

Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: deal with a possible race condition during multicast
	delegate invocation.

Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: ensure value type methods don't have the synchronized
	flag set.

Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* string-icalls.c, string-icalls.h: reverted unapproved patch that
	breaks the build.

2007-10-11  Joel Reed  <joelwreed@comcast.com>

	* string-icalls.c, string-icalls.h: modify System_String_InternalSplit
	to take an options parameter so that empty entries can be removed during
	the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>

Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: make sure we don't store the signature from a dynamic
	method into the runtime invoke cache (bug #327189).

Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: make sure the wrapper methods are properly initialized.

2007-10-11  Mark Probst  <mark.probst@gmail.com>

	* metadata.c, metadata-internals.h: Generalized
	mono_type_stack_size() to mono_type_stack_size_internal() which
	takes an additional argument specifying whether it allows open
	types.

2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_invoke_method): handle typedbyref params
	correctly and check for unverifiable return values.

	* verify.c (do_newobj): fix a warning.

2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: don't tread typedbyref as allways unverifable,
	so uses, like (ld/st)loc.0 are valid. verify for the cases
	that it matters, like boxing related operations.

2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: add verification of the newobj opcode. verification
	of delegate instantation still missing due ldftn and virldftn not
	pushing the function type on stack

2007-10-08  Mark Probst  <mark.probst@gmail.com>

	* class-internals.h: Runtime generic context data structure
	definition.

	* object.c: Initialization of runtime generic context at runtime
	vtable creation time.

2007-10-08  Massimiliano Mantione  <massi@ximian.com>
	* class.c (mono_class_create_from_typedef,
	mono_class_from_generic_parameter, mono_ptr_class_get,
	mono_fnptr_class_get, mono_bounded_array_class_get)
	* domain.c (mono_domain_create, mono_domain_free)
	* assembly.c (mono_assembly_load_from_full, mono_assembly_close)
	* image.c (do_mono_image_load, mono_image_close):
	Hooked up load-unload profiler events.

Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* domain.c: track statistics about the actual amount of native code
	allocated.

Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: the valuetype enumerators don't have the additional
	supertypes interfaces.

Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: need more interfaces setup for the IEnumerator<T>
	object created for arrays (tests/ienumerator-interfaces.2.cs).

2007-10-05  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.

2007-10-05  Alp Toker  <alp@atoker.com>

	* icall.c (ves_icall_MonoType_GetElementType): For enums, return null
	rather than the underlying type. Based on a patch by Ben Maurer. Fixes
	#315863.

2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (verify_type_compatibility_full): verification of
	compatibility improved, validates correctly non-strict checks between
	native int and I4 types different than (unsigned)int32.

	* verify.c (do_store_indirect): added, do all verification of
	ldind.X opcodes. 

	* verify.c (get_load_indirect_mono_type): renamed to
	get_indirect_op_mono_type, as it now returns the MonoType for 
	ldind.X and stind.X opcodes.

2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: Fix the encoding of generic type definition for
	TypeBuilders.

	* reflection.c (mono_image_typedef_or_ref_full: do the same thing as
	mono_image_typedef_or_ref but allows to specify if typespec lookups should
	be made. Typespec check is done prior to typeref cache lookup.

	* reflection.c (mono_image_typedef_or_ref): now just delegate to
	mono_image_typedef_or_ref_full.

	* reflection.c (encode_generic_class): encode the generic class
	directly instead of calling encode_type.

	* reflection.c (encode_type): encode the generic type definition
	MonoClass as a generic instantiation.

	* reflection.c (create_typespec): cache typespec tokens in
	the assembly->typespec cache. Don't create typespec for a generic
	instance MonoClass. Create typespec for the generic type defintion.

	* reflection.c (create_generic_typespec): encode the generic
	class directly instead of calling encode_type.

	* reflection.c (mono_image_create_token): encode the generic
	type definition not using a typespec for MonoType instances.


2007-10-04  Raja R Harinath  <rharinath@novell.com>

	Fix #328812
	* class.c (mono_image_init_name_cache): Don't return nested
	'protected internal' classes.
	(mono_class_from_name_case): Likewise.

2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>

	* icall-def.h, icall.c : get_bundled_machine_config() is now the
	  common function used by both DefaultConfig in System.dll and
	  InternalConfigurationHost in System.Configuration.dll.

Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: automatically add to vectors only a few essential explicit
	generic interfaces. The rest of the interfaces that arrays should
	provide are currently implicitly added (but still not lazily, see the
	design in the discussion of bug#325495 for the details of what is
	needed for that). Additionally, implicit interfaces are assigned the
	same vtable slot as the explicit interfaces (as they are compatible):
	this enables huge memory savings since we don't need to instantiate
	as many memthods and as large vtables anymore. Also, Since
	GetEnumerator<T> returns an instance of a type that is required to
	support a similarly large set of interfaces as arrays, we add
	implicit interfaces and interface offset sharing support to those
	types, too. This change adds all the required interfaces so that
	the anonarray.cs test case in the bug report works (we don't add
	all the interfaces to arrays of arrays 3-level deep and more because
	of the memory requirements explained in the bug and since they are much
	less common: the lazy-loading support will enabled them to work, too).

2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (merge_stacks): major clean up, all type compatibility
	checks are done by verify_type_compatibility. This fix my earlier lack
	of understanding of the CLR type system and merge_stacks no longer looks
	scary.

	* verify.c: fixed some bad spelling.

2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_type_from_stack_slot): added. returns the MonoType for
	a given stack slock.
	
	* verify.c: killed verify_type_compat in favor of verify_type_compatibility and
	verify_type_compatibility_full. This removed a near indentical function and fixed
	handling of Int32 and IntPtr across all opcodes.

Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: only vectors have the additional generic interfaces.

2007-10-01  Jonathan Chambers <joncham@gmail.com>

	* mono-config.c: Use g_strcasecmp instead of
	strcasecmp like everywhere else to fix
	compilation with MSVC.
	
	Code is contributed under MIT/X11 license.

Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* object.c, object-internals.h: refactored the IMT code to enable
	building a single slot at a time and lazily creating the IMT trampolines
	and thunks.

2007-09-29  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.

	* metadata.c (mono_metadata_free_inflated_signature): Free the signature itself	too.
	Fixes #328501.
	
2007-09-29  Raja R Harinath  <harinath@gmail.com>

	* loader.c (method_from_methodspec): Rearrange to avoid
	un-necessary exposition.  Don't assert out if the method's
	declaring type is a generic type definition.

2007-09-28  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.

Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class-internals.h: optimize field layout of MonoClass to
	requires less cachelines at runtime and save a few bytes on 64 bit
	systems.

2007-09-28  Jb Evain  <jbevain@novell.com>

	* reflection.c: when encoding type names in custom attributes,
	if the type is a closed generic type, its generic arguments
	have to be serialized as AssemblyQualifiedName, so that when
	they are deserialized, it's possible to re-create them properly.
	Fixes #329450.


Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* object.c, class-internals.h: added delegate-creation counter.

Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: cleanup of the code that synthetizes interfaces for
	arrays in 2.0: saves quit a bit of corlib mempool memory.
	Code to fix bug #325495 ifdeffed out for now until the issues
	with memory usage and O(n^2) behaviour are fixed.

Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: when possible, do not duplicate the name of the methods
	in the method builder and in the generated MonoMethod.

2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
	* verify.c: added support for type checking ldind_* opcodes.

2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>

	* class-internals.h (struct _MonoGenericClass): new field is_tb_open
	which is used to distinguish the fully open instantiation of a TypeBuilder
	with the rest. This temporary hack is required to restore the property that
	the fully open instantiation is the same type of the generic type definition.

	* class-internals.h (mono_generic_class_is_generic_type_definition):
	new function as part of the internal API.

	* class.c (inflate_generic_type): return NULL when the generic inst is
	fully open. The fully open generic type is now the same as the generic type
	definition for non TypeBuilder types.

	* class.c (mono_generic_class_get_class): removed assert since it is
	no longer valid, gklass->cached_class can point to the generic type definition.

	* class.c (mono_generic_class_is_generic_type_definition): new.

	* metadata.c (mono_generic_class_hash): added is_tb_open field
	to the hash calculation.

	* metadata.c (free_generic_class): if the generic class is associated
	with the generic type definition, its field will come from the mempool and
	must not be freed.

	* metadata.c (mono_metadata_is_type_builder_generic_type_definition):
	new, this function identifies the corner case of a TypeBuilder fully open
	instantiation.

	* metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
	for lookup. Set gclass->cached_class to be the container class in case of
	the fully open instantiation of non TypeBuilder types.

	* metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
	to compare generic classes.

	* reflection.c (method_encode_methodspec): remove assert that
	no longer is valid.

	* reflection.c (mono_reflection_generic_class_initialize): add
	an aditional assert to ensure the proper type is used.

2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
	to enjoy it.

2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (push_arg): Fixed support for ldarga
	* verify.c (set_stack_value): Removed superfluous parameter, fixed the
	MonoType used as first arg in case of instance calls.

2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: Support for verifying VAR and MVAR types, 

2007-09-25  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_get_property_info): Set the reflected type of the
	accessors correctly.

Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* threads.c: support OSX and other systems in
	mono_thread_get_stack_bounds (bug #328026).

2007-09-25  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.

2007-09-24  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(MonoDebugClassEntry): Moved the definition of this struct into
	mono-debug.c to make it private.

	* mono-debug.c
	(MonoDebugClassEntry): Removed `symfile_id'; since we now use one
	type table per symbol file, we don't need to store the symfile id
	any longer.

2007-09-24  Martin Baulig  <martin@ximian.com>

	Create one type table per symbol file, since a `MonoClass *' gets
	invalid when its image is unloaded.

	* mono-debug.h (MonoSymbolTable): Removed `type_table'.
	(MonoDebugHandle): Added `type_table'.

Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* mempool.c, mempool.h: added mono_mempool_new_size () API
	to be able to specify a smaller initial size for the pool.
	Adjusted the code to slowly increase pool size before using
	the previous default size.
	* image.c: use a small initial size for image mempools.

2007-09-23  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_array): Generate valid IL for byref array case.
	Fixes ##320990.

	* icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
	Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.

2007-09-22  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_type_create_from_typespec): Remove an invalid
	free. Fixes #327438.

2007-09-21  Raja R Harinath  <harinath@gmail.com>

	* metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
	generic instantiations, etc.
	<MONO_TYPE_ARRAY>: Likewise.

2007-09-21  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
	these structs were never defined.
	(MonoDebugHandle): Removed the `_priv' field, it was never used.

2007-09-21  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.

Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* image.c: removed the guid hash tables: we can get the same info
	without the additional memory usage hit (partially fixes also bug #327052).

2007-09-10  Massimiliano Mantione  <massi@ximian.com>

	* profiler.h, profiler-private.h, profiler.c: add a new profiler
	event to handle unloading methods. After the event is called, the
	corresponding MonoMethod* must be considered invalid.
	* loader.c (mono_free_method): call the new mono_profiler_method_free
	event.

2007-09-20  Mark Probst  <mark.probst@gmail.com>

	* domain-internals.h: New flag in MonoJitInfo which marks shared
	generic methods.  New hash table (shared_generics_hash) in
	MonoDomain to keep track of shared generic methods.  Prototypes
	for functions to register and lookup shared generic methods.

	* domain.c: Support for registering and looking up shared generic
	methods via a hash table (shared_generics_hash) in MonoDomain.

	* class-internals.h: New exception to signal failure of shared
	compilation of a generic method.  New counters for generics
	sharing in MonoStats.

Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* image.c, metadata-internals.h: don't keep a file descriptor open
	for loaded assemblies (bug#325988).

2007-09-19  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (signature_in_image): New.  Carve out of type_in_image.
	(ginst_in_image, gclass_in_image): Simplify.  Change signature to
	use the corresponding datatypes.
	(type_in_image): Update to changes.
	(CleanForImageUserData): Simplify.
	(steal_gclass_in_image): Carved out of old 'gclass_in_image'.
	Avoid quadratic behaviour in handling the "stolen" list by
	separating the filter predicate out, and by prepending the stolen
	items rather than appending them.
	(steal_ginst_in_image): Likewise.
	(mono_metadata_clean_for_image): Update to changes.

2007-09-19  Martin Baulig  <martin@ximian.com>

	* domain.c (mono_cleanup): Call mono_debug_cleanup() here.

2007-09-19  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_cleanup): Don't call
	mono_debugger_cleanup(); this is now called earlier from mini_cleanup().

2007-09-19  Raja R Harinath  <harinath@gmail.com>

	Fix crash on 'make run-test' in mcs/errors
	* metadata.c (type_in_image): New.  Carve out of ginst_in_image.
	Avoid more potential allocations in mono_class_from_mono_type.
	(ginst_in_image): Update to changes.
	(gclass_in_image): Rearrange slightly.

2007-09-18  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_init): Move the code that sets up class->methods to 
	mono_class_setup_methods () for inflated generic classes too. Ditto for properties.

	* metadata.c (mono_metadata_get_inflated_signature): New function to return a
	canonical instance of an inflated generic signature.
	(mono_type_create_from_typespec): Remove an invalid free.

	* loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.	

2007-09-18  Marek Habersack  <mhabersack@novell.com>

	* domain-internals.h: added a declaration of the
	mono_assembly_load_full_nosearch internal function.

	* assembly.c (mono_assembly_load_with_partial_name): use
	mono_try_assembly_resolve return value properly.
	(mono_assembly_load_full_nosearch): copied the function body from
	mono_assembly_load_full, without the code to invoke assembly
	search hooks.
	(mono_assembly_load_full): calls the above new function and if the
	assembly is not resolved, invokes the search hooks.

	* appdomain.c (mono_runtime_init): restore the global postload
	assembly search handlers.

2007-09-18  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_init): Make sure class->methods and class->properties
	are never NULL in the generics case.

	* metadata.c (free_generic_class): Enable this again, skip the dynamic case.

2007-09-17  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (free_generic_class): Disable some code to fix the build.

	* domain.c (mono_cleanup): Fix a crash introduced by a previous patch.

	* marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
	from the image mempool.

	* metadata.c (free_generic_class): Free more data from the inflated class.

	* class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.

	* metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
	mempool.
	(mono_type_create_from_typespec): Ditto.

	* domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
	MonoImage to the caller.
	(mono_init_internal): Save the opened image in a global variable.
	(mono_cleanup): Close the image opened in get_runtimes_from_exe.

	* reflection.c (resolve_object): Fix a leak.

	* metadata.c: Fix the freeing of data in the generics caches.
	
	* metadata.c (free_generic_inst): Comment this out to fix the build.
	(free_generic_class): Ditto.

	* metadata.c: Free cached generic methods, instantinations and classes when
	they are removed from the caches.
	(mono_metadata_free_type): Free the type itself.

	* class.c: Free the result of mono_class_inflate_generic_type () in a few
	places.

Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* boehm-gc.c: restrict managed allocs to __thread supporting
	architectures.

2007-09-16  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
	(mono_generic_class_get_class): Fix a leak.

	* metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
	mono_metadata_free_type ().
	(mono_metadata_inflate_generic_inst): Fix a leak.

2007-09-14  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c (free_header_data): Fix a leak missed earlier.

	* metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
	mempool.

	* mono-debug.c (mono_debug_close_image): Fix call to 
	g_hash_table_remove ().

Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* icall-def.h: redirect all the string ctor to the managed
	CreateString () methods.
	* string-icalls.c, string-icalls.h: removed dead code for string
	ctors and icalls.

2007-09-14  Zoltan Varga  <vargaz@gmail.com>

	* mono-debug.c: Fix memory leaks.

2007-09-14  Jonathan Chambers <joncham@gmail.com>

	* threads-types.h: Implement mono_hazard_pointer_set and 
	mono_hazard_pointer_clear macros using do/while(0) to fix
	compilation with MSVC.
	
	Code is contributed under MIT/X11 license.

2007-09-14  Zoltan Varga  <vargaz@gmail.com>

	* gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
	-2 to communicate to managed code that the handle is not pinned. Fixes #82848.

Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* icall-def.h, string-icalls.c: get rid of old, no longer used, string
	icalls.

Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* boehm-gc.c, gc-internal.h, object.c: allow strings to be
	managed-code allocated as well.

2007-09-13  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_is_assignable_from): Add support for generic variance.

Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* boehm-gc.c: fixed the build after the AOT changes.

2007-09-13  Zoltan Varga  <vargaz@gmail.com>

	* wrapper-types.h: Add an ALLOC wrapper type.

	* gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
	reference managed allocator methods.

2007-09-12  Marek Safar  <marek.safar@gmail.com>

	* icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
	of Type array and not MonoType, a fix suggested by Hari.
	
2007-09-12  Jonathan Chambers <joncham@gmail.com>

	* domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
	and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
	
	Code is contributed under MIT/X11 license.

2007-09-10  Massimiliano Mantione  <massi@ximian.com>

	* domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.

2007-09-12  Marek Habersack  <mhabersack@novell.com>

	* image.c (do_mono_image_open): if assembly file fails to open and
	MONO_IOMAP is in effect, try to find the path in a
	case-insensitive way.

	* appdomain.c (mono_runtime_init): do not install postload hooks -
	tests show that MS.NET doesn't use anything of that sort to
	trigger the AppDomain.AssemblyResolve event.
	(mono_try_assembly_resolve): renamed from try_assembly_resolve and
	made non-static.
	(mono_runtime_init): init portability helpers here.

	* assembly.c (mono_assembly_load_with_partial_name): if other	
	attempts fail, trigger the AppDomain.AssemblyResolve event handler
	to resolve the assembly.

	* domain-internals.h: added mono_try_assembly_resolve and marked
	it as internal.

2007-09-11  Jb Evain  <jbevain@novell.com>

	* object-internals.h (MonoReflectionDynamicMethod): add
	a `MonoReflectionType *owner` field. The owner is used
	* reflection.c:
	(mono_reflection_create_dynamic_method): use the owner of the dynamic
	method as the class declaring the dynamic method.
	(reflection_methodbuilder_from_dynamic_method): copy the owner of the
	dynamic method to the declaring type of the methodbuilder.

2007-09-11  Mark Probst  <mark.probst@gmail.com>

	* icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
	rules for calling methods via reflection.

2007-09-11  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (resolve_object): Add support for MonoGenericClass. 
	Inflate MonoType's.

Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
	provide a managed method that does fast allocations without needing
	a managed->unmanaged transition. Boehm GC implementation currently
	enabled for ptrfree objects on sane architectures.

Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c, marshal.h: exported a couple of useful functions and
	added mono_mb_get_label () to easily handle backward branches.

2007-09-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (resolve_object): Inflate generic methods. Fixes #82782.

2007-09-10  Massimiliano Mantione  <massi@ximian.com>

	* loader.c (find_method): Fixed the regression introduced while
	fixing bug #81466.

2007-09-09  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_lookup_dynamic_token_class): Pass along the context here as
	well.
	
	* class.c loader.c metadata.c object.c class-internals.h object-internals.h
	icall.c reflection.c: Pass a MonoGenericContext argument to 
	mono_lookup_dynamic_token ().

	* reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
	#82744.
	
2007-09-09  Robert Jordan  <robertj@gmx.net>

	* object.c (mono_class_proxy_vtable): Don't create remoting trampolines
	for generic methods.

	* object.c (mono_object_get_virtual_method): Handle generic methods.
	Fixes bug #78882.

	Code is contributed under MIT/X11 license.

Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* image.c: fix locking in mono_image_load_file_for_image ().

Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* reflection.c, icall.c, icall-def.h: the methodinfos name field is
	used only as a cache: added an icall to fill it.

2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.h: exposed mono_reflection_free_type_info
	* reflection.c (mono_reflection_get_type_internal): type_args is always freed
	since mono_reflection_bind_generic_parameters makes a copy of it.
	* reflection.c (free_type_info): subinfos should be freed.
 	* reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
	made non static.
	* icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
	replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
	this fixes #82695 and #81726.
   

2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>

	* process.h, process.c:  added support for user profile/info in
	  ProcessStartInfo. For now only Windows works.

Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* metadata.c: consider the generic arguments when comparing
	signatures (bug #82614).

Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* cil-coff.h, image.c: updated assembly loader to cope with the
	PE32+ 64 bit file format.

Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* assembly.c, class.c, domain.c, loader.c: remove useless
	inclusion of cil-coff.h.

2007-08-29  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (cominterop_get_ccw): Walk up interface hierarchy
	if interface is marked with CoClassAttribute. 
   
	Code is contributed under MIT/X11 license.

Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: ensure no object from the to space is copied again or finalized
	if it's seen twice in major collections.

Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: big objects are not copied to the gray area, but they
	need to be considered for scanning, too, if they are brought alive
	by an object ready for finalizations or a survived one.

Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: properly account the number of disappearing links when
	they are nullified.

Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: share the code to scan the registered roots between the
	different types of collections.

2007-08-28  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.

2007-08-28  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_proxy_vtable): Use max_interface_id instead of
	class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.

2007-08-28  Mark Probst  <mark.probst@gmail.com>

	* security-manager.c (mono_security_manager_get_methods):
	LinkDemandSecurityException now has 2 arguments instead of 3.

2007-08-27  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_layout_fields): Only do the struct alignment hack on
	platforms which need it.

Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: unregister thread data structures with a pthread_key_t
	dtor.

Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* threads.c: free the thread static data on thread exit.

Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: walk the hierarchy to find the generic definition for
	a class (fixes runtime part of bug #82498).

2007-08-24  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
	...

	* image.c (mono_image_close): Here. Hopefully fixes #82510.

2007-08-24  Mark Probst  <mark.probst@gmail.com>

	* monodiet.c (handle_cattrs): Fixed a custom attr leak.

2007-08-24  Robert Jordan  <robertj@gmx.net>

	* appdomain.c: don't perform the ':'->';' substitution on Win32.

2007-08-24  Jb Evain  <jbevain@novell.com>

	* class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
	for byref types.

2007-08-24  Mark Probst  <mark.probst@gmail.com>

	* threads.c: Make sure a thread gets cleaned up only once.  Fixes
	#82286.

2007-08-24  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c: Fix a warning.
	
2007-08-23  Marek Habersack  <mhabersack@novell.com>

	* appdomain.c: parse the <runtime> section looking for the probing
	element with the 'privatePath' attribute, which sets additional
	directories in which the runtime should look for assemblies.

2007-08-23  Robert Jordan  <robertj@gmx.net>

	* marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
	Fixes #82499.

2007-08-23  Martin Baulig  <martin@ximian.com>

	* mono-debug.[ch]: Rename mono_debug_init_corlib() into
	_mono_debug_init_corlib() and remove it from the header file.

2007-08-23  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
	don't notify the debugger about it.

	* mono-debug-debugger.h
	(MonoDebuggerEvent): Removed `THREAD_ABORT'.

2007-08-23  Robert Jordan  <robertj@gmx.net>

	* icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
	Code is contributed under MIT/X11 license.

Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.

2007-08-22  Martin Baulig  <martin@ximian.com>

	* mono-debug.c: Store debugging info on a per-domain basis and
	free it on domain unload.  Add support for unloading symbol files.

	* mono-debug.h
	(MonoDebugList): New typedef.
	(MonoSymbolTable):
	- add `data_tables and `type_table'.
	- replace 'symbol_files' and `num_symbol_files' with a
	  `MonoDebugList *'.
	(mono_debug_data_table): Removed.
	(mono_debug_list_add): New public function.
	(mono_debug_list_remove): New public function.
	(mono_debug_init_1): Renamed into mono_debug_init_corlib().
	(mono_debug_init_2_memory): Renamed into
	mono_debug_open_image_from_memory().
	(mono_debug_close_image): New public function.
	(mono_debug_domain_create): Likewise.
	(mono_debug_domain_unload): Likewise.
	(MONO_DEBUGGER_VERSION): Bump to 60.

	* mono-debug-debugger.h
	(MonoDebuggerEvent):
	- remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
	- rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
	- add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
	- rename `THREAD_CREATED' and `THREAD_EXITED' into
	  `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
	- re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
	  meaning.
	(mono_debugger_add_symbol_file): Removed.
	(mono_debugger_add_type): Removed.
	(mono_debugger_lookup_type): Removed.
	(mono_debugger_lookup_assembly): Removed.

	* domain.c
	(mono_domain_create): Call mono_debug_domain_create().
	(mono_init_internal): Call mono_debug_init_corlib().

	* assembly.c
	(mono_assembly_close): Call mono_debug_close_image().

Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
	mmap call.

Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: ensure section->pin_queue_end is initialized
	correctly when non pinning objects in the section have been found.

2007-08-22  Marek Habersack  <mhabersack@novell.com>

	* appdomain.c (set_domain_search_path): cope with PrivateBinPath
	containing a list of directories separated by ':'. MSDN docs say
	the directories should be separated with ';'. Part of a bugfix for
	bug #81446

2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_type_retrieve_from_typespec) : fixed the return type
	it should MonoType and not MonoClass.

2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2007-08-20  William Holmes  <billholmes54@gmail.com>

	*file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
	 to call ReplaceFile Kernel32 on windows or in io-layer.
	*file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
	*icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
	 as an internal call.

	Code is contributed under MIT/X11 license.

2007-08-20  Jb Evain  <jbevain@novell.com>

	* class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
	and MONO_EXCEPTION_FIELD_ACCESS.

	* debug-helpers.[c|h]: new mono_field_full_name function.

2007-08-20  Mark Probst  <mark.probst@gmail.com>

	* class.c: Removed class_security_level() and moved it to
	security-core-clr.c.

	* security-core-clr.c, security-core-clr.h: class_security_level()
	is now public and renamed to mono_security_core_clr_class_level().
	It also looks for security attributes in the classes a class is
	nested in.

2007-08-20  Mark Probst  <mark.probst@gmail.com>

	* security-core-clr.c, security-core-clr.h: CoreCLR security
	utility functions.

	* Makefile.am: Added security-core-clr.[ch].

	* security-manager.c, security-manager.h: Functions and enum for
	setting and getting the security mode.

	* class.c: CoreCLR security checks.

Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* icall-def.h, process.c, process.h: implemented icall to get
	user/system processor times.

2007-08-17  Mark Probst  <mark.probst@gmail.com>

	* domain.c, threads.c, class-internals.h, domain-internals.h: New
	reader-lock-free jit_info_table.

2007-08-17  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.

	* marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.	

	* object-internals.h (MonoException): Add missing _data member.

2007-08-08  Massimiliano Mantione  <massi@ximian.com>

	* loader.c (find_method, find_method_in_class): Fixed bug #81466,
	checking that only methods with matching qname or fqname are picked
	from implemented interfaces.

2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_newarr):added, do type verification of
	newarr ops, push the right value on the eval stack.
	* verify.c (mono_method_verify): use do_newarr


2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_ldobj_value, do_unbox_value and do_box_value):
	factored the common code into get_boxable_mono_type, which
	is now using mono_type_get_full, this fixed byref related tests.

2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: added mono_type_get_full, this function has the same
	behavior of mono_class_get_full but the returned MonoType has
	all metadata of the associated token in case of a typespec token.
	* class.c: added mono_type_retrieve_from_typespec, used by 
	mono_type_get_full to retrieve the token type.
	* class.c (mono_class_create_from_typespec): changed to use
	mono_type_retrieve_from_typespec.
	* class.c (mono_ldtoken): changed to use mono_type_get_full
	for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
	* class-internals.h: exported mono_type_get_full for internal use.

2007-08-16  Jb Evain  <jbevain@novell.com>

	* domain.c (supported_runtimes): add entry for
	the 'moonlight' runtime version.

2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (mono_method_verify): small typo sliped in.  

2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (do_unbox_value): added, do type verification of
	unboxing ops
	* verify.c (mono_method_verify): use do_unbox_value


2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (dump_stack_value): fixed typo, was printing string
	instead of object on stack.
	* verify.c (do_box_value): moved the byref check up as it leads
	to invalid code and should be done earlier.
	* verify.c: improved error messages for and ldobj

2007-08-15  William Holmes  <billholmes54@gmail.com>

	* marshal.c (emit_marshal_custom): Omit the call to 
	  marshal_native_to_managed when calling native to managed 
	  and the argument is specified as an out argument.

	Code is contributed under MIT/X11 license.

2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: fixed the type checks for generics, function pointers and vectors.
	Added type verification for ldobj and ldtoken. The verifier
	would segfault if header or signature of a method contained references
	to non-existant types.

2007-08-15  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (cominterop_get_ccw): Patch from
	Bill Holmes to no walk up interface hierarchy. 
	All parent methods should be present in the interface for COM.
   
	Code is contributed under MIT/X11 license.

2007-08-15  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (emit_marshal_com_interface): Patch from
	Bill Holmes to handle COM Interfaces as return values
	for native->managed calls.
   
	Code is contributed under MIT/X11 license.

2007-08-14  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (cominterop_get_idispatch_for_object): Implement
	for runtime callable wrappers.
   
	Code is contributed under MIT/X11 license.

2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>

	* pedump.c (main): changed from mono_init to mono_init_from_assembly
	so 2.0 types are accessible


2007-08-13  Miguel de Icaza  <miguel@novell.com>

	* domain.c (mono_init_internal): Call mono_assembly_load_friends
	once we load mscorlib.   Due to the order in which we initialize,
	the mono_assembly_load_full routine that loads mscorlib did not
	load friends.   We now load it once we load the
	mono_defaults.internals_visible_class class. 

	* assembly.c: Expose the mono_load_friend_assemblies method.

2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>

        * verify.c: improved the handling of boxing, better
        type checking for unary ops and conversion. Fix bug
        regarding managed pointer compatibility checking

2007-08-11  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.

	* threads.c threads-types.h: Export mono_thread_get_stack_bounds.

2007-08-09  Raja R Harinath  <rharinath@novell.com>

	* reflection.c (dup_type): Remove.
	* class.c (dup_type): Remove.
	(mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
	instead of the dodgy 'dup_type'.
	(inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
	handle the case where 'dup_type' needed the second argument.

2007-08-08  Zoltan Varga  <vargaz@gmail.com>

	* domain.c: Fix a warning.

2007-08-08  Massimiliano Mantione  <massi@ximian.com>

	* class.c (mono_class_setup_vtable_general): Fixed bug #77127,
	checking that methods with the same fqname are not overridden
	with a method from an ancestor.

2007-08-07  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (free_thread_static_data_helper): Avoid a crash if
	thread->static_data is not yet set.

2007-08-07  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: Use correct image when emitting
	native wrapper for COM calls.
   
	Code is contributed under MIT/X11 license.

2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>

	* icall-def.h, security.c, security.h :
	  added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().

2007-08-07  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h
	(MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.

	* domain.c (mono_domain_free): Call
	`mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.

2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (check_underflow, check_overflow): error message now returns IL offset
	* verify.c (in_same_block): code should test if either offset is inside the clauses
	* verify.c (mono_method_verify): push the exception into the eval stack of exception
	and filter blocks

2007-08-03  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_close): Fix a leak.

	* object.c (mono_runtime_invoke_array): Avoid using alloca.

	* icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.	

Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* domain.c, threads.c, threads-types.h: fix memory retention issue
	with thread static variables not being cleared on domain unload.
	Reuse thread static slots after domain unload.

2007-08-03  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
	nullable type.

	* marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
	now done in mono_runtime_invoke_array.

	* marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
	receiver is a nullable type.

	* class.c (mono_class_is_assignable_from): Handle the case when klass is a 
	generic parameter.

2007-08-03  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: Implement COM Objects as return type for 
	managed->unmanaged calls. Added Release calls for COM Object
	out/return values in managed->unmanaged calls.

	Code is contributed under MIT/X11 license.

Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* threads.h, threads-type.h: move the hazard pointer declarations
	to the private header.

Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* file-io.c, appdomain.c: memory leak fixes.

2007-08-02  Dick Porter  <dick@ximian.com>

	* socket-io.c
	(ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
	SO_REUSEADDR setting into io-layer/sockets.c.

2007-08-01  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
	from Object when called on a generic parameter. Fixes #82211.

2007-08-01  Dick Porter  <dick@ximian.com>

	* file-io.c (convert_share): Test FileShare values bit-by-bit.
	Fixes bug 79250 yet again.

2007-07-30  Martin Baulig  <martin@ximian.com>

	Merged the `debugger-dublin' branch.

	* mono-debug.h
	(MonoDebugDataTable): New typedef.
	(MonoDebugMethodAddressList): New typedef.
	(MonoDebugWrapperData): Removed.
	(MonoDebugSymbolTable): Removed `current_data_table',
	`current_data_table_size', `current_data_table_offset'.
	(MonoDebugDataItemType): Moved into mono-debug.c.
	(MonoDebugMethodJitInfo): Remove `address'.
	(mono_debug_data_table): New global variable.
	(mono_debug_lookup_method_addresses): New public function.
	(mono_debug_find_method): Take a `MonoMethod *', not a
	`MonoDebugMethodInfo *'.

	* mono-debug.c: Drop support for the old symbol tables.

2007-06-28  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_debugger_version): New public variable.

2007-07-31  William Holmes  <billholmes54@gmail.com>

	* metadata.c Changed mono_type_create_from_typespec to not insert
	  the type into the hash map until after
	  do_mono_metadata_parse_type has completed.
	Fixes Bug #82194
	Code is contributed under MIT/X11 license.

2007-07-31  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
	generic parameter. Fixes #82211.

2007-07-27  Jb Evain  <jbevain@novell.com>

	* pedump.c (dump_metadata, dump_metadata_header): dump
	versions contained in the metadata header.

Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* threads.c: register small_id_table with the GC.

2007-07-27  Mark Probst  <mark.probst@gmail.com>

	* threads.c, threads.h, class-internals.h, object-internals.h:
	Hazard pointers, to be used by lock-free parallel algorithms.

2007-07-26  Dick Porter  <dick@ximian.com>

	* appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
	routine on non-windows platforms, as I've not managed to think of
	a non-kludgy way of doing this.  Finishes off bug 78739.

Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* object.c: properly setup interface_bitmap in proxy vtables.

2007-07-25  Marek Habersack  <mhabersack@novell.com>

	* appdomain.c (get_shadow_assembly_location): do not use TickCount
	to create unique shadow copy target directories, use the domain's
	serial number instead. Each domain gets a unique target directory
	that way.

	* domain.c (mono_domain_create): added code to increment domain
	shadow copy serial number and cache the value in the current
	domain structure.

	* domain-internals.h (struct _MonoDomain): added a new field -
	shadow_serial to hold the serial number used in generation of
	shadow-copy directories. This is to make sure that the directory
	name is unique for each and every domain created. We avoid a race
	condition with overriding assemblies already in use by other app
	domains.

2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_bounded_array_class_get): fixed memory leak when 
	binding generic parameters.

2007-07-24  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (do_mono_metadata_parse_generic_class): Use
	mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
	error.

Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* loader.c, class-internals.h, reflection.c: removed the per-method
	generics hashtable: we use the global one through the call of
	mono_class_inflate_generic_method ().

Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c, metadata.c, class-internals.h: introduce yet another
	generics global cache for inflated methods (fixes 98% of the perf
	issue in bug #81806).

2007-07-23  Raja R Harinath  <rharinath@novell.com>

	Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
	* metadata.c (mono_metadata_lookup_generic_inst): Kill.
	(mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
	return a MonoGenericInst containing (a copy) of those types.
	(mono_metadata_inflate_generic_inst): Update to changes.
	(mono_metadata_parse_generic_inst): Likewise.
	(mono_get_shared_generic_inst): Likewise.
	* reflection.c (mono_class_bind_generic_parameters): Likewise.
	(mono_reflection_bind_generic_method_parameters): Likewise.
	* metadata-internals.h: Likewise.
	* icall.c (free_generic_context): Kill.
	(init_generic_context_from_args): Use mono_metadata_get_generic_inst.

	* reflection.c (reflection_methodbuilder_to_mono_method): Use
	mono_metadata_type_dup.
	* marshal.c (mono_mb_create_method): Likewise.

	* metadata.c (mono_metadata_type_dup): Rename from
	mono_metadata_type_dup_mp.  Take an optional mempool instead of a
	MonoImage.  Handle a few more cases, esp. when no mempool is given.
	* marshal.c, metadata-internals.h: Update to changes.

Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class.c: fixed a small leak for array classes and removed warning.

2007-07-22  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_get_param_token): Make this work on generic methods.
	Return 0x8000000 for return parameters. Fixes #82161.

2007-07-21  Marek Habersack  <grendello@gmail.com>

	* appdomain.c (get_shadow_assembly_location): append the current
	ticks value to the path. Avoids overwriting the same assemblies by
	several threads at the same time.

2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
	and Raja R Harinath  <rharinath@novell.com>

	* icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
	Simplify slightly.
	(ves_icall_MonoMethod_GetGenericMethodDefinition): Update
	property for testing if a method is a generic method definition.

2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>

	* domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.

2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: used function from private branch, reverted to the one in class.h 

2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: a typo slipped in and the code wont compile

2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
	disabled box instruction as it is doing the wrong thing
	improved stack dump messages, now it is easier to debug type related issues


2007-07-19  Juraj Skripsky  <js@hotfeet.ch>

	* icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 

2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
	TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
	grouped with class and valuetype. This change will simply 
	the code as it should be handled just like unmanaged pointers.

2007-07-19  Mark Probst  <mark.probst@gmail.com>

	* class.c (concat_two_strings_with_zero): Fixed a silly bug.

2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: several stack merge issues fixed, reference comparisons now
	check the type size. strict type check now works correctly.
	added more uses of IS_MANAGED_POINTER macro.
	fixed issues pointed by running the test suite against .net.
	

2007-07-19  Mark Probst  <mark.probst@gmail.com>

	* class.c, loader.c, class-internals.h: Removed the
	MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
	defines.

	* icall.c: Better error checking in some internal reflection
	methods.

2007-07-18  William Holmes  <billholmes54@gmail.com>

        * filewatcher.c : removed unused variable 'filename' in 
	  ves_icall_System_IO_FSW_SupportsFSW

Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
	obsolete, removed.

2007-07-15  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
	
	* icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.

2007-07-14  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
	Implement generics support.
	(ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.

	* icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
	type_args and method_args arguments.
	(ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
	(ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
	(ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.

2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>

	* reflection.c: patch from Thong Nguyen to fix atribute resolution.
	  It adds a rootimage parameter to mono_reflection_get_type_internal,
	  adds new function mono_reflection_get_type_with_rootimage and use
	  the rootimage to resolve the types instead of the current image

2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* culture-info-table.h: Forgot to update after r78304.

2007-07-13  Raja R Harinath  <rharinath@novell.com>

	* class.c (mono_class_is_open_constructed_type)
	<MONO_TYPE_GENERICINST>: Don't recompute a computed field.

2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_bounded_array_class_get):  method fails if used with
	an incomplete TypeBuilder enum (no basetype field), fixed it by 
	avoiding calculating the size for such array as it cannot be instantiated.
	Fix bug #82015

2007-07-12  Raja R Harinath  <rharinath@novell.com>

	* class-internals.h (_MonoGenericInst::is_reference): Remove bogus
	field.
	* metadata.c, reflection.c: Update to changes.

2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
	mono_class_is_valid_enum, they are used to valide a enum when loading.
	* reflection.c: used new functions to throw TypeLoadException when and
	invalid enum is build with TypeBuilder. Fixes #82018
  
Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* object.c: forgot commit of mono_class_setup_methods () to access
	iface->methods.
	* object-internals.h: added a few more handy fields to
	MonoIMTCheckItem.

2007-07-11  Zoltan Varga  <vargaz@gmail.com>

	* object.c (build_imt): Call mono_class_setup_methods () before accessing 
	iface->methods.

Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, object-internals.h, object.c: IMT-based
	interface invocation core from Massimiliano Mantione
	(massi@ximian.com) with a reworked arch-specific interface,
	bsearch implementation and a few bugfixes and memory savings by me.

2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c (mono_class_create_from_typedef): mono would segfault if 
	an enum did not have a __value field. It now throws a TypeLoadException
	for such cases. Fix bug #82022

2007-07-10  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.

2007-07-09  Mark Probst  <mark.probst@gmail.com>

	* class.c (mono_class_init): If a class is already inited but has
	an exception_type set, return FALSE, not TRUE.  Fixes: 82050.

2007-07-09  Mark Probst  <mark.probst@gmail.com>

	* class.c: Properly handle the case of an unimplemented interface
	method.  Fixes: 81673.

Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, object.c: cleanup patch from massi: use
	MonoVTable->interface_bitmap since the vtable interfaces offset array
	is going away.

2007-07-10  Zoltan Varga  <vargaz@gmail.com>

	* icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
	GetMDStreamVersion icall instead.

Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
	not use mono_dl_build_path() with a full library name: makes
	fallbacks to libgaim and libfam work.

2007-07-06  William Holmes  <billholmes54@gmail.com>

	* assembly.c: Added a continue statement in probe_for_partial_name when
	 parse_assembly_directory_name fails.  Fixes : 82002

2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
	and added a verification  for TYPEDBYREF.
	* verify.c (verify_stack_type_compatibility): fix handling of byref types,
	make native int interchangeable with int32 and some small cleanup and formating.
	* verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
	handle byref of byref.
	* verify.c (push_local): handle byref of byref.
	* verify.c (do_binop): invalid mix of values is unverifiable
	* verify.c (do_invoke_method): fixed the handling of bad params on stack and
	added visibility checks
	* verify.c (field related method): added visibility checks
	* verify.c (do_push_field): cannot take the address of a temporary valuetype field

2007-07-06  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
	string.

2007-07-05  Zoltan Varga  <vargaz@gmail.com>

	* profiler.c (mono_profiler_load): Fix an off-by-one error.

	* marshal.c (emit_marshal_string): When returning a string from managed code,
	allways make a copy even for unicode strings. Fixes #81990.

Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* object.c: cleaned up mono_runtime_invoke_array () and fixed handling
	of byref generic inst types (bug #81997).

2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>

	* class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
	* class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()

2007-07-02  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_string): Add support for unicode strings in
	MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.

2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>

	* verify.c: field load/store are now verified, missing only access checks now

2007-06-28  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_debugger_version): New public variable.

2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>

	* locales.c: When constructing DateTimeFormat or NumberFormat for
	MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
	MonoCultureInfo contructed from the current locale is always
	read-only and has UseUserOverride set to true. All MonoCultureInfo
	instances returned for GetCultures have both IsReadOnly and
	UseUserOverride set to true. Fixes part of bug #81930.

2007-06-22  Jonathan Chambers  <joncham@gmail.com>

       * icall-def.h: Update System.__ComObject icalls
       * marshal.c: Avoid managed transition (and object creation)
       when looking up COM interface in RCW.
       * marshal.h: Ditto.
       
       Code is contributed under MIT/X11 license.

2007-06-22  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
	to avoid crashes during assembly unloading.

2007-06-22  Raja R Harinath  <rharinath@novell.com>

	Fix MethodInfo.IsGenericMethodDefinition
	* reflection.c (mono_reflection_bind_generic_method_parameters):
	Rearrange code to ensure we always uses a generic method definition.
	* class.c (mono_class_inflate_generic_method_full): Set
	'generic_container' field only for generic method definitions.
	* icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
	Use presense of 'generic_container' field as indication of being a
	generic method definition.

2007-06-21  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* object-internals.h: Reflect changes in the layout of the managed Delegate
	class.
	
	* object-internals.h reflection.c icall-def.h: Applied patch from Robert
	Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
	runtime memory used by the dynamic method. Fixes #77146.

2007-06-21  Dick Porter  <dick@ximian.com>

	* file-io.h: 
	* file-io.c (convert_share): Cope with FileShare.Delete.  Patch
	from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
	81767.

2007-06-21  Raja R Harinath  <rharinath@novell.com>

	* reflection.c (method_encode_methodspec): Add a tripwire.
	* class.c (inflate_generic_type): The fully open generic type is
	not the same as the generic type definition.

2007-06-21  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.

	* mono-debug-debugger.h
	(MonoDebuggerBreakpointInfo): Removed.
	(mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
	(mono_debugger_remove_breakpoint): Likewise.
	(mono_debugger_breakpoint_callback): Likewise.
	(mono_debugger_start_add_type): Renamed into mono_debugger_add_type().

2007-06-21  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (mono_metadata_lookup_generic_class): The fully open
	generic type is not the same as the generic type definition.
	* class.c (mono_generic_class_get_class): Likewise.

2007-06-20  Geoff Norton  <gnorton@customerdna.com>

	* icall.c: The second argument to 
	System.Reflection.MethodBase.GetMethodFromHandleInternalType
	is a MonoType not a MonoClass.

2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c: support for function pointers in the verifier

2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)

Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* assembly.c: removed Mono.Data.SqliteClient from the list of
	forward-compatible assemblies as it breaks the ABI (bug #81899).

2007-06-19  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (mono_metadata_lookup_generic_class): Protect cache
	lookup/update with the loader lock.
	* reflection.c (mono_class_bind_generic_parameters): No need to
	protect mono_metadata_lookup_* with the loader lock.
	* class.c (inflate_generic_type): Likewise.
	
	* metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
	on a generic instantiated type.

2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>

	*verify.c: produce meanfull error messages on verification error
	*verify.c: fixed some cases of verification errors reported as validation errors
	*pedump.c: fixed the error name array, now it shows validation errors properly
	*verify.h: fixed the contant that should be used for verification errors

Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* metadata.c, image.c, metadata-internals.h: part of the fixes needed
	for bug #77596, 81858 and 80743 (generics data structures on domain
	unload).

2007-06-15  Raja R Harinath  <rharinath@novell.com>

	Avoid allocating 'MonoGenericContext' on the heap.
	* class-internals (_MonoMethodInflated::context): Make field
	inline, not a pointer.
	* loader.c (method_from_methodspec): Allocate 'new_context' on the
	stack. 	Use the context embedded within the inflated method as the
	hash key, rather than 'new_context'.
	* class.c (inflate_generic_context): Simplify.  Return a struct
	rather than allocating on the heap.
	(mono_class_inflate_generic_method_full): Update to changes.  Now,
	doesn't salt away a copy of the context -- simplifying the
	lifetime rules of a 'MonoGenericContext *'.
	(mono_method_get_context): Return pointer to embedded context.
	(setup_generic_array_ifaces): Allocate temporary context on stack.
	* reflection.c (inflate_mono_method): Likewise.
	(mono_reflection_bind_generic_method_parameters): Likewise.
	Use the context embedded within the inflated method as the hash key.

	Avoid a source of allocation of 'MonoGenericContext'.
	* class-internals.h (_MonoGenericClass::context): Combine 'inst'
	and 'cached_context' fields into embedded 'MonoGenericContext' field.
	* class.c: Update to changes.
	(mono_generic_class_get_context): Simplify drastically.  Now just
	returns a pointer to the field.
	* metadata-internals.h (mono_metadata_generic_context_hash): Mark
	argument as a const pointer.
	(mono_metadata_generic_context_equal): Likewise.
	* metadata.c, loader.c, icall.c, reflection.c, verify.c:
	Update to changes.

2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c improved the handling of brtrue/brfalse, factored out common code

2007-06-14  Raja R Harinath  <rharinath@novell.com>

	Kill MonoGenericMethod.
	* class-internals.h (MonoGenericContext::method_inst): Rename from
	'gmethod' and convert to a MonoGenericInst.
	(MonoGenericMethod): Remove.
	* metadata.h (MonoGenericMethod): Note that the name is obsolete.
	* loader.c (method_from_methodspec): Update to changes.  Use a
	MonoGenericContext as the key to the hashtable.
	* metadata.c (mono_metadata_generic_context_equal): Rename from 
	'mono_metadata_generic_method_equal' and take MonoGenericContext.
	(mono_metadata_generic_context_hash): Likewise from
	'mono_metadata_generic_method_hash'.  Change hash function.
	(mono_metadata_load_generic_params): Update to changes.
	(mono_get_shared_generic_method): Remove.
	* metadata-internals.h (mono_get_shared_generic_method): Remove.
	* class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
	(inflate_generic_context): Likewise.
	(mono_class_inflate_generic_method_full): Likewise.
	(setup_generic_array_ifaces): Likewise.
	(mono_class_create_from_typespec): Likewise.
	* reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
	(method_encode_methodspec): Update callsite.
	(reflection_methodbuilder_to_mono_method): Update to changes.
	(mono_reflection_bind_generic_method_parameters): Likewise.  Use a
	MonoGenericContext as the key to the hashtable.
	(inflate_mono_method): Update to changes.

	* class-internals.h (MonoGenericMethod::container): Remove.
	* class.c, loader.c, metadata.c, reflection.c: Update to changes.

Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* profiler-private.h, profiler.c, profiler.h: added API to profile
	exception events.

2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 

2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>

	* verify.c: method invocation is now validated, now we verify parameter types on stack.
	Fixed overflow and underflow not aborting the verification process.

2007-06-13  Mark Probst  <mark.probst@gmail.com>

	* class-internals.h (MonoStats): Added stats entries for dynamic
	code allocations.

2007-06-12  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_free_method): Free header->locals and header->clauses.

	* marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
	dynamic case.

	* threads.c (mono_thread_get_stack_bounds): Fix memory leak.

	* class.c (setup_interface_offsets): Allocate memory from the image mempool.

2007-06-12  Raja R Harinath  <rharinath@novell.com>

	* verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
	the tables.

2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>

	*pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting

2007-06-11  Raja R Harinath  <harinath@gmail.com>

	MonoGenericMethod on a diet
	* class-internals.h (_MonoMethodInflated::reflection_info): Move
	here ...
	(_MonoGenericMethod::reflection_info): ... from here.
	* icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
	Update to changes.
	* reflection.c (inflate_mono_method): Likewise.
	(mono_reflection_bind_generic_method_parameters): Likewise.

2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>

	*verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
	*verify.c: factored long ldarg forms to share code with short forms

2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>

	*verify.c: fixed code formating factored some duplicate code
	into a new function

	*verify.h: fixed binary incompatibility introduced earlier

	*pedump.c: fixed formating

2007-06-11  Raja R Harinath  <harinath@gmail.com>

	Fix assertion when disassembling Mono.C5.dll
	* loader.c (method_from_methodspec): Avoid inflating a method
	twice with the same context.  If the methodref is inflated, use
	the declaring method instead.

	* class.c (mono_class_from_generic_parameter): Fix case similar to
	bug #81830 handled below, but for method containers.

2007-06-10  Raja R Harinath  <harinath@gmail.com>

	* class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
	get_shared_generic_class.  Directly inflate the instance.
	[MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
	(inflate_generic_class): Delete.
	(get_shared_generic_class): Delete.  Move setting of
	'cached_class' and 'cached_context' ...
	* metadata.c (mono_metadata_lookup_generic_class): ... here.

	* metadata.c (mono_metadata_lookup_generic_class): Change
	signature to take the components of a MonoGenericClass rather than
	an allocated MonoGenericClass.  Change semantics to be intern-like.
	* reflection.c (mono_class_bind_generic_parameters): Update to
	changes.  Make locking region tighter.
	* class.c (inflate_generic_class): Update to changes.
	(get_shared_generic_class): Likewise.
	* metadata-internals.h: Likewise.

	* reflection.c (mono_class_bind_generic_parameters): Take and
	return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
	(mono_reflection_bind_generic_parameters): Use
	'mono_class_bind_generic_parameters' rather than duplicate the code.
	* class.c (mono_bounded_array_class_get): Update to changes.
	* object-internals.h: Likewise.

	* reflection.c (mono_class_bind_generic_parameters): Only support
	parameterizing generic type definitions.  Remove support for other
	open types.

2007-06-08  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_free_method): Free method->signature as well. Fixes #81832.

	* marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
	in the dynamic case.

2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>

	* threads.c: When cleaning up thread, reset the Background bit.
	Fixes bug #81720.

2007-06-08  Jonathan Chambers  <joncham@gmail.com>

       * metadata.c: Move variable declarations to top of scope.
       * verify.c: Move variable declarations to top of scope.

       Code is contributed under MIT/X11 license.

2007-06-08  Raja R Harinath  <rharinath@novell.com>

	* reflection.c (mono_class_bind_generic_parameters): Replace
	open-coded loop with mono_metadata_inflate_generic_inst.

	* class.c (get_shared_generic_class): Don't call
	mono_get_shared_generic_inst.  Use the container's own
	'class_inst'.

	* metadata.c (mono_metadata_load_generic_params): Move
	initialization of 'context' field here from ...
	* class.c (mono_class_create_from_typedef): ... here, and ...
	* loader.c (mono_get_method_from_token): ... here.

	* class.c (get_shared_generic_class): Rename from
	mono_get_shared_generic_class and make static.
	(mono_get_shared_generic_inst): Move to metadata.c.
	* loader.c (mono_get_shared_generic_method): Likewise.
	* class-internals.h, metadata-internals.h: Update to changes.

	Fix #81830
	* class.c (mono_class_from_generic_parameter): Don't assume a
	generic container owner exists.  Generic containers from monodis
	don't have any.

2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>

	* pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
	* verify.h: new typedefs to returns the non-verifiable status
	* verify.c: initial implementation of generics, stack merging and object compatibility check

2007-06-06  Mark Probst  <mark.probst@gmail.com>

	* class.c, image.c, class-internals.h (MonoImage): class_cache is
	a MonoInternalHashTable again (fixed bug in internal hash table
	code).

2007-06-06  Mark Probst  <mark.probst@gmail.com>

	* domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
	MonoInternalHashTable again (fixed bug in internal hash table
	code).

2007-06-06  Mark Probst  <mark.probst@gmail.com>

	* class.c, image.c, class-internals.h, domain.c,
	domain-internals.h (MonoImage): Reverting MonoInternalHashTable
	changes.  Have to figure out what makes them break the SWF
	regression.

2007-06-04  Mark Probst  <mark.probst@gmail.com>

	* class.c, image.c, class-internals.h (MonoImage): class_cache is
	a MonoInternalHashTable now.

2007-06-04  Mark Probst  <mark.probst@gmail.com>

	* domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
	MonoInternalHashTable now.

2007-05-31  Zoltan Varga  <vargaz@gmail.com>

	* domain-internals.h (MonoDomain): Add two new hash tables to store delegate
	invoke_impl code.

	* object-internals.h (_MonoDelegate): Reflect changes to managed object layout.

	* object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
	dependent trampoline.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.

2007-05-29  Robert Jordan  <robertj@gmx.net>

	* marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.

2007-05-28  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.

2007-05-25  Jonathan Chambers  <joncham@gmail.com>

       * marshal.c: Fix interface lookup loops for
       cominterop_get_com_slot_for_method and 
       cominterop_get_method_interface. Only need to lookup
       if type is a class, else use interface type method is on.

       Code is contributed under MIT/X11 license.

2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>

	* reflection.c: HasSecurity can be present even if no specially 
	encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
	SecurityAttribute). Fix CAS regression tests on buildbot.

2007-05-24  Jonathan Chambers  <joncham@gmail.com>

       * appdomain.c: Add configure checks for header files.
       * image.c: Add configure checks for header files.
       * file-io.c: Add configure checks for header files.
       * debug-mono-symfile.c: Add configure checks for header files.
       * threadpool.c: Add configure checks for header files.
       * console-io.c: Add configure checks for header files.
       * profiler.c: Add configure checks for header files.
       * rawbuffer.c: Add configure checks for header files.
       * icall.c: Add configure checks for header files.
       * rand.c: Add configure checks for header files.
       * socket-io.c: Add configure checks for header files.

       Code is contributed under MIT/X11 license.

2007-05-24  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_custom_attrs_from_builders): Remove the 
	assertion as it breaks the build.
	
	* reflection.c (mono_custom_attrs_from_builders): Add an assertion.

	* reflection.c (lookup_custom_attr): Make a copy here too.

	* image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
	dynamic images.

	* class.c (mono_class_init): Avoid accessing the metadata in dynamic
	images.

	* reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
	info.

2007-05-22  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
	(load_cattr_value): Ditto.

2007-05-20  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.

2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>

	* threads.c: In "start_wrapper", set apartment_state to MTA if
	apartment_state is Unknown and we're running on 2.0 profile or
	higher.
	* object.c: In "mono_runtime_exec_main", if STAThread is not applied
	to main method, then set apartment_state to Unknown on 1.0 profile,
	and MTA on 2.0 profile.

2007-05-16  Jb Evain  <jb@nurv.fr>

	* class-internals.h (MonoDefaults): Add an attribute_class and
	  customattribute_data_class.
	* domain.c (mono_init_internal): Populate them.
	* reflection.c: Use them to remove duplicates. Make a vew
	MonoClass variables `static'.

2007-05-15  Massimiliano Mantione  <massi@ximian.com>

	* class-internals.h: Added "MonoVTable.interface_bitmap" as a next
	step in implementing IMT, so that all isinst checks now can go
	through the bitmap.
	This was needed because vtables for TransparentProxy need to look
	like the vtable of the "target" class, so they need to point to
	its interface bitmap directly.

	* object.c: inside "mono_class_create_runtime_vtable" and
	"mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".

2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>

	* object-internals.h
	  culture-info.h : added territory field in MonoCulture and
	  CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
	* locales.c : fill territory field above too.
	* culture-info-table.h : regenerated.

2007-05-12  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
	Fixes #81599.

2007-05-11  Jonathan Chambers  <joncham@gmail.com>

	* object.c: Always initialize apartment, even if 
	there is no custom attributes on entry point.
	
	Code is contributed under MIT/X11 license.

2007-05-10  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
	* metadata.c: If no encoding is set, check for unicode
	on class.
	
	Code is contributed under MIT/X11 license.

2007-05-09  Jonathan Chambers  <joncham@gmail.com>

	* threads.c: Handle if mono_thread_current returns NULL 
	
	Code is contributed under MIT/X11 license.

2007-05-09  Jonathan Chambers  <joncham@gmail.com>

	* threads.c: Initialize Thread.AprtmentState and set on Thread.Start
	in start_wrapper. Added mono_thread_init_apartment_state and
	mono_thread_cleanup_apartment_state.
	* object.c: Initialize thread apartment state on main thread
	by checking for STAThreadAttribute on entry point.
	* object-internals.h: Add apartment_state field to MonoThread.
	* threads-types.h: Add unmanaged definition of 
	System.Threading.ApartmentState, MonoThreadApartmentState.
	
	Code is contributed under MIT/X11 license.
	
2007-05-08  Jonathan Chambers  <joncham@gmail.com>

	* class.c: Fix windows build.
	* class-internals.h: Fix windows build.
	
	Code is contributed under MIT/X11 license.

2007-05-08  Robert Jordan  <robertj@gmx.net>

	* process.c (CreateProcess_internal):
	Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
	.CreateNoWindow was specified. Fixes #81496.

2007-05-08  Massimiliano Mantione  <massi@ximian.com>

	* class-internals.h: Removed "MonoClass.interface_offsets" as a first
	step in implementing IMT, replaced it with two compact arrays
	(interfaces_packed and interface_offsets_packed) and a bitmap that
	is used for isinst checks (interface_bitmap).

	* class.c: (compare_interface_ids): compare function to pass to
	bsearch when looking for an interface with a given id.
	(mono_class_interface_offset): reimplemented using bsearch on
	interfaces_packed, getting the offset from interface_offsets_packed.
	(print_implemented_interfaces): utility debugging function.
	(setup_interface_offsets): reworked to initialize interfaces_packed,
	interface_offsets_packed and interface_bitmap.

	* object.c: replaced all accesses to "MonoClass.interface_offsets"
	with uses of interfaces_packed and interface_offsets_packed.

2007-05-08  Massimiliano Mantione  <massi@ximian.com>

	* class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
	mono_class_interface_offset prototype to wrap all accesses to
	"MonoClass.interface_offsets".

	* class.c: Implemented mono_class_interface_offset, and wrapped all
	accesses to "MonoClass.interface_offsets".

	* monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
	"MonoClass.interface_offsets".

Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* icall.c, icall-def.h: implemented new GetFieldFromHandle and
	GetMethodFromHandle overloads (bug #78637).

Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* assembly.c: parse ProcessorArchitecture in assembly name and ignore
	it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).

2007-05-01  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
	#81498.

	* reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
	gracefully.
	(mono_custom_attrs_from_index): Ditto.

	* icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
	Fixes #81501.

2007-04-30  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
	is now allocated from a mempool.

2007-04-28  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
	caller holds threads_lock, leading to deadlocks. Fixes #81476.

2007-04-26  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
	mono_loader_clear_error () too late. Fixes #81463.

2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2007-04-25  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
	is missing.

2007-04-25  Dick Porter  <dick@ximian.com>

	* Makefile.am: Put the mingw enforced-optimisation back into the
	PLATFORM_WIN32 section.

2007-04-24  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
	patch.

	* image.c (mono_image_load_module): New API function to load a module reference.

	* image.c (load_modules): Load modules lazily. Fixes #80812.

	* class.c (mono_class_from_typeref): Use mono_image_load_module.
	
	* reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.

	* object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
	to mono_image_load_module_dynamic.

2007-04-23  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: Fix calling convention for CCW on non-windows
	platforms. STDCALL on windows, CDECL everywhere else to work 
	with XPCOM and MainWin COM.
	
	Code is contributed under MIT/X11 license.

2007-04-23  Martin Baulig  <martin@ximian.com>

	Fix #80969.

	* loader.c
	(method_from_memberref): Added `gboolean *used_context' argument.
	(mono_get_method_from_token): Likewise.
	(mono_get_method_full): Don't insert the method in the cache when
	`used_context' is true.

2007-04-23  Raja R Harinath  <rharinath@novell.com>

	* monodiet.c (add_types_from_method): Fix "wrong type" warning.

	* reflection.c (mono_reflection_bind_generic_parameters): Don't
	create new MonoTypes for returned types.
	* class.c (mono_generic_class_get_class): Export mono-internal.
	* class-internals.h: Update to changes.

Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* threadpool.c, threadpool.h, icall-def.h: patch from
	Robert Jordan to implemnt ThreadPool.SetMaxThreads.

2007-04-18  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (mono_thread_get_stack_bounds): Fix windows build.
	
	* threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.

	* threads.c (mono_thread_get_stack_bounds): New helper function.

	* threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
	Correctly compute stack bounds when attaching. Fixes #81394.

Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix handling of doubles in custom attributes
	for the arm-fpa format (bug #81368).

2007-04-18  Raja R Harinath  <rharinath@novell.com>

	* reflection.c (assembly_add_win32_resources): Mildly relax an
	bounds check to let the end pointer point just past the end of the
	allocated buffer.  (may fix #81384)

2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2007-04-07  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
	the thread is aborted early.

2007-04-05  Dick Porter  <dick@ximian.com>

	* file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
	FindFirstFile()/FindNextFile() to find entries.  This lets the
	io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
	81038.

	* appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
	the parameters of
	ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.

2007-04-04  Martin Baulig  <martin@ximian.com>

	* debug-helpers.c
	(mono_method_desc_full_match): Add support for nested classes.

2007-04-02  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.

2007-04-01  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (abort_appdomain_thread): Avoid handle leakage if we are
	waiting for too many threads.

2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>

	* environment.c: Fix return value check on uname so we can get the 
	executing version on Solaris operating systems.

2007-03-28  Jb Evain  <jbevain@gmail.com>

	* class.c (mono_type_get_name_recurse): Complete the
	fix for the creation of assembly qualified names for
	pointer types. Fixes #81208.

2007-03-27  Dick Porter  <dick@ximian.com>

	* appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
	of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
	changed.

	* threads.c
	(ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
	the value of ReleaseMutex().

2007-03-27  Dick Porter  <dick@ximian.com>

	* socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
	in little-endian order, not network endian, so must be converted
	to host endian here.  Fixes bug 80593.

2007-03-22  Jb Evain  <jbevain@gmail.com>

	* class.c (mono_type_get_name_recurse): Fix the creation of assembly
	qualified names for pointer types. Fixes #81208.

2007-03-21  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: Add support for PreserveSigAttribute. 
	
	Code is contributed under MIT/X11 license.

2007-03-14  Zoltan Varga  <vargaz@gmail.com>

	* process.c: Fix endianness issues. Fixes #81126.

	* reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
	multiple circular calls made from the same DynamicMethod work. Fixes #81141.

	* image.c (mono_image_lookup_resource): Make this work on big-endian
	machines.Change API contract so the caller needs to free the return value.
	
	* process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
	API change.
	
2007-03-14  Martin Baulig  <martin@ximian.com>

	* debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
	mono_type_get_desc() as well.

2007-03-13  Jonathan Chambers  <joncham@gmail.com>

	* icall.c:  Fix environ access in VS.  
	
2007-03-13  Alp Toker  <alp@atoker.com>

	* icall.c (ves_icall_MonoType_GetElementType): For enums, return null
	rather than the underlying type. Based on a patch by Ben Maurer. Fixes
	#63841.

2007-03-12  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_create_dynamic_method): Add support for 
	circular references among dynamic methods. Fixes #81091.

	* object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.

2007-03-09  Martin Baulig  <martin@ximian.com>

	* reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.

2007-03-09  Jonathan Chambers  <joncham@gmail.com>

	* appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
	of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
	
	Code is contributed under MIT/X11 license.
        
2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>

	* loader.c: Reapply patch for bug #79424.

2007-03-06  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_type_to_unmanaged): Only convert object to
	MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.

Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, class.c, metadata.c, reflection.c: removed unused
	(and incorrectly set) is_reference field from MonoGenericInst.

2007-03-06  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
	a little earlier.

	* icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.

	* icall-def.h: Rename Type:Equals to Type:EqualsInternal.

2007-03-05  Miguel de Icaza  <miguel@novell.com>

	* file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
	FileOptions.1 value to mean "temporary", map that to
	FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.

	Fixes 80688

2007-03-03  Marek Habersack  <mhabersack@novell.com>

	* appdomain.c: implement MS .Net style shadow copying. Copies of
	the assemblies are made in a subdirectory of the dynamic base
	directory, the assembly names are preserved.
	Copy .mdb and .config files along with the assemblies being shadowed.

2007-02-28  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
	(emit_marshal_handleref): Ditto.

	* profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
	on Visual C++. Fixes #80671.

Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>

	* boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
	for clone operations.

2007-02-28  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Fix warnings.

Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>

	* loader.c: allow case-insensitive matching of the dll name
	in dllmap handling when prefixed with "i:".

2007-02-20  Jonathan Chambers  <joncham@gmail.com>

	* threads.c: Fix #ifdef for dummy_apc function for VS.

Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>

	* threads.c: don't throw in MemoryBarrier (), use lock/unlock.

2007-02-19  Massimiliano Mantione  <massi@ximian.com>
	* class.c (mono_class_setup_vtable_general): Fix bug 75903,
	giving precedence to the methods with a fully qualified name
	(InterfaceName.MethodName) when building the interface sections
	of the vtable.

2007-02-16  Dick Porter  <dick@ximian.com>

	* threadpool.c (append_job): Fix fast-path array handling, so it's
	less likely the array will grow exponentially when the load is
	heavy.

Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>

	* metadata-internals.h, loader.c: fix dllmap lookup order
	for non-function maps, too, and prepare for fallback code.

2007-02-12  Robert Jordan  <robertj@gmx.net>

	* marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
	to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
	and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
	GlobalFree. Fixes a part of bug #77075.

Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>

	* loader.c: implemented typedef parent in field memberref.

2007-02-11  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: Fix warnings and remember to call Release on
	IUnknown of RCW.
	
	Code is contributed under MIT/X11 license.

2007-02-10  Miguel de Icaza  <miguel@novell.com>

	* class-internals.h: Add MonoHandleRef definition, and
	handleref_class to mono_defaults. 

	* metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
	structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.

	* marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
	(do nothing on this stage)
	(emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
	(emit_marshal_handleref): New method, used for argument handling
	of HandleRefs. 

2007-02-08  Jonathan Chambers  <joncham@gmail.com>

	* class.c (mono_class_setup_parent): Lazily init com types.
	* domain.c (mono_init_internal, mono_init_com_types): Lazily 
	init com types.
	* object.c (mono_remote_class_vtable): Lazily init com types.
	* class-internals.h: Add iunknown and idispatch to MonoDefaults.
	* object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
	* domain-internals.h: Expose mono_init_com_types.
	* icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
	* marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
	Add support for COM Callable Wrapper marshalling.
	* marshal.h: Add icall definitions.
	* gc.c: Handle freeing of CCWs in finalizer code.
	
	Code is contributed under MIT/X11 license.

Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>

	* reflection.c: changed all the signature encoding code to use
	a variable-sized buffer.

Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: locking fixes: never take the loader lock
	or other runtime locks when holding the marshal lock
	(fixes bug#80664).

Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: make the delegate function pointer mapping
	work for the moving GC.

Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: fix from Robert Jordan (robertj@gmx.net)
	for bug #80618.

Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>

	* image.h, loader.c, metadata-internals.h: use mono-dl instead of
	gmodule.

Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>

	* threadpool.c: made the code moving-GC safe.

Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>

	* assembly.c, boehm-gc.c, class-internals.h, class.c,
	debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
	monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
	warning cleanup.
	* reflection.c: warning cleanup, some threading and moving GC fixes.

Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>

	* class.c, loader.c: create the needed Set/Get/Address array methods
	as well as the .ctors in mono_class_init (), fixes bug #80567.

2007-01-24  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_layout_fields): When force-aligning a field, make sure
	we doesn't decrease its alignment. Should fix the sparc build.

2007-01-24  Dick Porter  <dick@ximian.com>

	* socket-io.c
	(ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
	Create the returned object if we need to ignore an unsupported
	socket option.  Fixes a segfault reported by Atsushi.

Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>

	* class.c, object.c: restrict GC-tracked fields to
	UIntPtr fields used inside corlib, so we provide better
	type info to the GC and also allow broken packing as in
	bug #80580.

Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: removed duplicated function.

2007-01-19  Miguel de Icaza  <miguel@novell.com>

	*  socket-io.c (convert_sockopt_level_and_name): return -2 as a
	value that means that the value is not supported, but that we
	should not return a failure, but instead report this as a
	successful operation.

2007-01-19  Raja R Harinath  <rharinath@novell.com>

	Fix tests/bug79956.2.il
	* class.c (mono_type_get_underlying_type): Handle genericinst enums.
	(mono_generic_class_get_class): If the generic definition in an
	enum, copy over other fields related to it.

Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>

	* metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
	genericinst enums (bug #79215).

2007-01-17  Massimiliano Mantione  <massi@ximian.com>
	* class.c: Fix bug 80307.

Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>

	* image.c: if the file table is not present, try to load
	all the modules, since we don't have info about them
	having or not metadata (bug #80517).
	* assembly.c: allow mono_assembly_load_references () to
	work for netmodules.

Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>

	* image.c, metadata-internals.h, object.c: execute module
	cctors when running on the 2 runtime if present (bug #80487).

Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>

	* icall.c: optimized InitializeArray() on bigendian.

Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix for the broken ARM FPA double format.

Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>

	* icall.c: handle endian issues for r4 and r8 types, too, in
	the InitializeArray() icall.

2007-01-15  Miguel de Icaza  <miguel@novell.com>

	* loader.c (mono_loader_error_prepare_exception): Clear the error
	once we have extracted the information from it, do this before we
	call into the JIT's class loading mechanisms.

	* object.c (mono_class_create_runtime_vtable): Do not clear the
	loader error before calling mono_class_get_exception_for_failure
	as the loader error is needed inside
	mono_class_get_exception_for_failure to throw the error (thinko).

	Fixes #80521
	
Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>

	* reflection.c: align fields rva data so it's faster to load at
	runtime.

2007-01-12  Raja R Harinath  <rharinath@novell.com>

	Prepare to simplify GenericMethod handling.
	* class-internals.h (mono_method_get_context): New accessor function.
	* class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
	rather than directly accessing '->context' field.

	* class-internals.h (_MonoGenericParam.method): Move ...
	(_MonoGenericContainer): ... here.  Add into union with klass field.
	* class.c, icall.c, loader.c, metadata.c, reflection.c:
	Update to changes.

Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, class-internals.h, debug-helpers.c: consolidate
	the wrapper type enum and reduce relocations.

2007-01-12  Raja R Harinath  <rharinath@novell.com>

	* reflection.c (inflate_mono_method): Reuse method instantiation
	from the generic method, if available.

2007-01-11  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (emit_marshal_variant): Fix conv_arg
	type in last commit, based on whether parameter is byref.
	
2007-01-11  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (emit_marshal_variant): Handle unmanaged->managed
	marshalling.
	(mono_marshal_emit_managed_wrapper): Convert byref arguments of type
	MONO_TYPE_OBJECT back for VARIANT support.

2007-01-11  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c, marshal.h, icall-def.h: Implement 
	Marshal.ReAllocCoTaskMem.

Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>

	* marshal.c: memory retention fixes: use the proper
	image cache for runtime_invoke method lookups.

Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>

	* mempool.c: added code to help debug mempool allocations.

2007-01-11  Dick Porter  <dick@ximian.com>

	* socket-io.c (convert_sockopt_level_and_name): Add DontFragment
	support (experimenting with faking it with IP_MTU_DISCOVER for
	systems that don't have IP_DONTFRAGMENT.)
	(ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
	icall.

	* icall-def.h: new System.Net.Sockets.Disconnect icall.

	* socket-io.h: Add new fields to MonoSocketAsyncResult
	corresponding to the new ones in Socket.cs.

2007-01-11  Raja R Harinath  <rharinath@novell.com>

	Fix IronPython regression mentioned in #80249
	* metadata.c (do_mono_metadata_parse_generic_class): Clear
	'cached_context' field, since it may have been initialized as a
	side-effect of metadata parsing.

	* class-internals.h (_MonoGenericClass.is_inflated): Remove.
	(_MonoGenericClass.cached_class): Move here and rename from lone
	remaining field of ...
	(_MonoInflatedGenericClass): ... this.  Remove.
	* metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
	to changes.

	Fix mcs/tests/test-128.cs regression.
	* reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
	2007-01-10 change below.
	[MONO_TYPE_OBJECT]: Recurse into array case.

2007-01-11  Raja R Harinath  <harinath@gmail.com>

	* class-internals.h (mono_get_inflated_generic_class): Remove.
	* class.c (mono_get_inflated_generic_class): Remove.
	(mono_generic_class_get_class): Rename from
	mono_class_create_generic.
	(mono_class_from_mono_type) [GENERICINST]: Use it.
	* reflection.c, metadata.c: Update to changes.  Use
	'mono_class_from_mono_type'.

Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>

	* reflection.c: use passed type when encoding an array element
	in custom attributes (patch from David Mitchell, dmitchell@logos.com).

2007-01-09  Robert Jordan  <robertj@gmx.net>

	* marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
	result arguments (someDelegate.EndInvoke (unrelatedAres)).
	Fixes bug #80392.

2007-01-09  Raja R Harinath  <rharinath@novell.com>

	* class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.

	* object.c (set_value): Avoid aliasing between type->data.klass
	and type->data.generic_class.

	* class.c (mono_class_create_generic): Don't use 'is_initialized' field.

2007-01-08  Raja R Harinath  <rharinath@novell.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
	between type->data.klass and type->data.generic_class.

2007-01-08  Lluis Sanchez  <lluis@ximian.com>

	* marshal.c: In MS.NET, StringBuilder objects are not copied by
	value in out parameters.

2007-01-08  Raja R Harinath  <rharinath@novell.com>

	Simplify invariant for MonoGenericClass::klass field.
	* class.c (mono_class_create_generic): Verify 'klass' is null.
	* metadata.c (do_mono_metadata_parse_generic_class): Don't
	initialize 'klass' field.

2007-01-05  Raja R Harinath  <rharinath@novell.com>

	Ongoing work to avoid redundant data and simplify invariants.
	* class-internals.h (_MonoGenericMethod.class_inst): Rename from
	'generic_class', and change type to a GenericInst.
	(_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
	* class.c, loader.c, metadata.c, reflection.c: Update to changes.

2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>

	* class.c : skip io-layer under PLATFORM_WIN32.

2007-01-03  Tor Lillqvist  <tml@novell.com>

	Fix #80305: In a bundled executable, look in the bundled exe
	assembly to determine the runtime version. Add the possibility to
	bundle also the machine.config file.
	
	* assembly.c (mono_assembly_open_from_bundle): Make
	non-static. Allow being called even if we have no bundled
	assemblies, and return NULL right away in that case.

	* domain-internals.h: Declare mono_assembly_open_from_bundle()
	here.

	* domain.c (app_config_parse): Take an assembly exe file name as
	parameter instead of a config file name. Check for a bundled
	config file for that assembly by calling
	mono_config_string_for_assembly_file() (see below) before looking
	for one in the file system.
	(get_runtimes_from_exe): Corrsponding change to call of
	app_config_parse().
	(get_runtimes_from_exe): Check for bundled assembly exe file first
	by calling mono_assembly_open_from_bundle(). If no bundled
	assembly exe file is found, call mono_image_open() as before to
	look it up in the file system.

	* mono-config.c: Add variable bundled_machinec_onfig.
	(mono_config_string_for_assembly_file): New function.
	(mono_config_for_assembly): Move code snippet that looks for a
	bundled assembly .config file into the above new function. Call
	it.
	(mono_register_machine_config, mono_get_machine_config): New
	functions to set and retrieve

	* assembly.h: Declare mono_register_machine_config().

	* mono-config.h: Declare mono_get_machine_config() and
	mono_config_string_for_assembly_file().

	* icall.c: No declaration of environ necessary on Win32. It is
	declared (as a macro expanding to a function call) in stdlib.h.
	(ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
	New internal mono function. Returns the value of
	mono_get_machine_config() as a Mono string.

	* icall-def.h: Add get_bundled_machine_config().

2007-01-04  Raja R Harinath  <rharinath@novell.com>

	Remove redundant field
	* class-internals.h (_MonoGenericContext.container): Remove field.
	* loader.c (mono_method_get_signature_full): Don't parse a
	"container" for a signature parse when the signature is inflated
	immediately.
	(method_from_methodspec): Likewise, for a generic_inst.
	* class.c, metadata.c, reflection.c: Update to changes.

2006-01-04  Raja R Harinath  <rharinath@novell.com>

	* class-internals.h (_MonoGenericClass): Rename 'context' field to
	'cached_context', and change semantics -- it starts off NULL, and
	is initialized on demand.
	* class.c (mono_generic_class_get_context): New accessor to
	replace 'context' field accesses.
	(mono_class_get_context): New helper.
	(*): Update to changes.
	* icall.c, loader.c, metadata.c, reflection.c: Update to changes.

2007-01-03  Miguel de Icaza  <miguel@novell.com>

	* marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
	before the memcpy.   Fixes Marshal2 regression.

2007-01-02  Jb Evain  <jbevain@gmail.com>

	* blob.h: add a MONO_TYPE_ENUM definition
	* reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
	fix the encoding of arrays of enums in custom attributes.

	Fixes #79666.

2007-01-01  Miguel de Icaza  <miguel@novell.com>

	* marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
	string is null terminated, but only cut the string short if it
	overflows the buffer.   
	
	(mono_string_to_byvalstr): Also fix this routine.   The code here
	was not properly terminating a string (it was only terminated
	because of the previous catch-all memset). 

	I left the memset, because I do not know if applications expect
	the runtime to clear this region. 

	Fixes #79944.

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
	Clear the error before returning to unmanaged code to prevent the
	runtime from being confused later on (fixes  80420).
	(ves_icall_type_from_name): Always call mono_loader_clear_error
	after parsing a type that could have failed.
	(ves_icall_System_Reflection_Assembly_GetTypes): ditto.

	* loader.c (mono_loader_clear_error): Fix indentation.

2006-12-28  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.

Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: patch from Rolf Bjarne Kvinge to fix
	getting a token for an EnumBuilder.

Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: be more careful in case resource generation
	fails to create the data array.

Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: write barrier for clone and fix unregister handles.

Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: some fixes needed in the generics code for the moving GC.

2006-12-22  Robert Jordan  <robertj@gmx.net>

	* icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
	account. Fixes bug #80299.

2006-12-21  Raja R Harinath  <rharinath@novell.com>

	Fix WaitHandle usage in delegates.
	* object-internals.h (mono_wait_handle_get_HANDLE): Declare.
	* object.c (mono_wait_handle_new): Use the property set method to
	initialize the handle.
	(mono_wait_handle_get_handle): New.
	* threadpool.c (mono_async_invoke): Use it.
	* threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
	Likewise.
	(ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.

2006-12-21  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (emit_marshal): Call emit_marshal_variant and
	emit_marshal_com_interface when applicable.
	(emit_marshal_variant, emit_marshal_com_interface): Add
	methods for this case and remove if's from emit_marshal_object.
	
Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>

	* filewatcher.c: updated to use the mono-dl API instead of gmodule.

2006-12-19  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
	ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
	and GlobalFree on Windows. Remove FIXME.

Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>

	* mono-mlist.h, mono-mlist.c, Makefile.am: linked list
	implementation for managed objects.

Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.c: implemented code to be used for checking
	that no reference field overlaps with non-references.

Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>

	* threadpool.c: fix queue code to be compatible with the
	moving GC.

2006-12-18  Miguel de Icaza  <miguel@novell.com>

	* marshal.c (emit_object_to_ptr_conv): Handle null safehandles
	in structures by throwing ArgumentNullException.

	(emit_marshal_safehandle): Also when they are null parameters.

	(emit_marshal_safehandle): Add support for ref
	SafeHandles parameters

Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>

	* profiler.c: updated to use the mono-dl API instead of
	gmodule.

Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>

	* profiler.c: updated to use the mono-dl dynamic loading
	API instead of gmodule.

Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>

	* profiler.c: use readlink, older versions of glib don't have
	g_file_read_link ().

Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>

	* profiler.c: try to detect the path to mono if libc fails to provide
	a useful name (bug #80286).

2006-12-16  Raja R Harinath  <rharinath@novell.com>

	Fix #80242
	* icall.c (ves_icall_Type_GetNestedType): If the type is a generic
	instance, use the generic type definition instead.
	(ves_icall_Type_GetNestedTypes): Likewise.
	* class.c (mono_class_create_generic): Always set the
	nested_classes of a generic instance to NULL, even if the generic
	type definition has nested types.

2006-12-15  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c (mono_string_from_bstr): Revert previous Windows change
	and fix on Linux.
	
2006-12-15  Miguel de Icaza  <miguel@novell.com>

	* marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
	my arguments were in the wrong order.   I also fixed the Windows
	version which seems to have had the same issue.

	(mono_free_bstr): On Unix, this is g_free.
	(mono_string_from_bstr, mono_string_to_bstr): Implement bstr
	conversions (for the tests in corlib to pass).

2006-12-14  Miguel de Icaza  <miguel@novell.com>

	* marshal.c (emit_ptr_to_object_conv): For now, ignore
	MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
	exception if a ref SafeHandle in a struct has changed).
	
	(emit_struct_conv): Do not perform layout checks for classes
	derived from SafeHandle, as those are specially handled. 

	(emit_object_to_ptr_conv): Add support for
	MONO_MARSHAL_CONV_SAFEHANDLE conversion. 

	(emit_marshal_safehandle): Implement conversion of return values
	of safehandles (MARSHAL_ACTION_CONV_RESULT).
	
	* threads.c: WaitHandle now is compiled with two different handles
	"IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
	for 2.0.
	
	(ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
	(ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
	these routines to cope with both kinds of fields.

2006-12-12  Miguel de Icaza  <miguel@novell.com>

	* metadata.c (mono_type_to_unmanaged): Handle the case where
	type->data.klass is a SafeHandle, and in that case, return the
	size of a pointer (MONO_NATIVE_INT) and set the conversion to be
	MONO_MARSHAL_CONV_SAFEHANDLE. 

2006-12-11  Miguel de Icaza  <miguel@novell.com>

	* marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
	MONO_TYPE_OBJECT cases and check for a SafeHandle here before
	calling emit_marshal_object.

	(emit_marshal_safehandle): Implement marshalling of
	SafeHandle parameters (no ref support yet).

	(MarshalAction): Document the defines as I implement
	them for SafeHandle.

	(emit_marshal_object): indentation police.

	* class-internals.h: Define MonoSafeHandle.
	Add safehandle_class to MonoDefaults type.

	* verify.c: Add System.Runtime.InteropServices.SafeHandle to the
	list of classes to check for fields. 

	* domain.c (mono_init_internal): Add SafeHandle to the list of
	mono_defaults loaded.

2006-12-15  Raja R Harinath  <rharinath@novell.com>

	Fix #80253
	* reflection.c (mono_reflection_bind_generic_parameters): If the
	generic type definition is a type builder, ensure that it is fully
	initialized before instantiating it.  Kill some dead code.

Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.c: clear the loader_error () before loading
	more metadata stuff (bug #80258).

Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c, icall-defs.h: type modifiers icalls for
	parameters and properties.

Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.c, icall.c: fixed warnings.

Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>

	* marshal.c: fixed a couple of leaks and coding style in a few places.

2006-12-08  Dick Porter  <dick@ximian.com>

	* process.c: Cope with NULL ProcessStartInfo arguments on windows
	too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
	80173.

Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>

	* process.c: ProcessStartInfo may have only filename set and
	arguments can be NULL.

Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix leak found by Robert Jordan.

Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>

	* marshal.c, marshal.h: generate managed method to access an element
	of a multi-dimensional array.

2006-11-30  Paolo Molaro (lupus@ximian.com)

	* metadata.c, marshal.c: locking fixes when writing to image->mempool.

Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: back out GetFields () fix until the serialization code is
	fixed to not depend on the incorrect behaviour.

Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>

	* profiler.c: provide defaults if none are set.

Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, attrdefs.h: new public header file with
	constants for attributes for use by embedders.

Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: GetFields () fix for bug #80064.

Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>

	* filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
	removed long unused icalls.

2006-11-27  Jonathan Chambers  <joncham@gmail.com>
  
	* marshal.c: 
		(mono_marshal_emit_managed_wrapper): Level of indirection for 
		mono_marshal_get_managed_wrapper so that a wrapper for a managed method
		can be generated without a delegate class.
		(mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
	
	Signed-off-by: Jonathan Chambers <joncham@gmail.com>

2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* console-io.c: add the 'signal' call removed by mistake. Fixes bug
	#80069.

Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>

	* boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
	icall-def.h: added icalls needed by System.GC.

Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>

	* loader.c: ensure the class in catch clauses is handled
	correctly for generics methods (fixes bug#79980).

Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>

	* monitor.h, monitor.c: added mono_locks_dump () function
	to help debug deadlocks involving managed locks.

2006-11-13  Dick Porter  <dick@ximian.com>

	* file-io.c (get_file_attributes): If the file is a symlink try
	and get the stat data for the target, but also add the
	FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
	the specs for the windows symlink support, but will probably have
	to be reworked when I have test data from a vista machine.  Fixes
	bug 79887.

2006-11-13  Dick Porter  <dick@ximian.com>

	* gc.c (mono_domain_finalize): 
	* marshal.c (mono_delegate_begin_invoke): 
	* threadpool.c (socket_io_init, mono_thread_pool_init)
	(mono_thread_pool_finish): 
	* monitor.c (mono_monitor_try_enter_internal): 
	* threads.c (mono_thread_resume, mono_thread_init)
	(mono_thread_suspend_all_other_threads)
	(mono_thread_execute_interruption): 
	* appdomain.c (mono_domain_unload): Check for NULL error returns
	from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
	75733.

2006-11-11  Miguel de Icaza  <miguel@novell.com>

	* process.c
	(ves_icall_System_Diagnostics_Process_CreateProcess_internal):
	Only close the handle if the value of the handle is not
	INVALID_HANDLE_VALUE.  This just makes the process a bit more
	robust.

	Improvement for #75733, so that we do not run into this problem. 

	
	* assembly.c (check_path_env, check_extra_gac_path_env): Do not
	include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
	internal variables.  Fixes #79462 
	

2006-11-09  Dick Porter  <dick@ximian.com>

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
	Use poll() not select().  Fixes bug 79397.

2006-11-09  Raja R Harinath  <rharinath@novell.com>

	Fix #79872
	* assembly.c (mono_assembly_load_from_full): Check that the given
	image has an assembly manifest.

2006-11-09  Ankit Jain  <jankit@novell.com>

	* tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
	(ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
	(ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.

2006-11-07  Dick Porter  <dick@ximian.com>

	* socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
	Put the old resolver behaviour back for pre-2.0 profiles.

Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>

	* threadpool.c: precise GC and locking fixes.

Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c: don't load types that have an explicit unaligned
	managed reference. Provide better info in the TypeLoad exception.
	Part of the fix for bug #79744.
	* object.c: use the correct check for class type load issues.

Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c: enforce alignment of fields with managed references
	even when Pack=1 is forced by the user (bug #77788).

2006-11-03  Dick Porter  <dick@ximian.com>

	* socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
	If the address reverse lookup fails, return it as the hostname
	anyway.  Fixes bug 79721.

2006-11-03  Dick Porter  <dick@ximian.com>

	* threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
	Fix build on Windows.

2006-11-02  Dick Porter  <dick@ximian.com>

	* icall-def.h: 
	* object-internals.h: 
	* exception.c (mono_get_exception_thread_interrupted): 
	* threads.c: Implement Thread.Interrupt and Thread.SpinWait.
	Fixes bug 74525.

	* monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
	Check for pending Thread.Interrupt.

2006-10-27  Massimiliano Mantione  <massi@ximian.com>
	* loader.c: Fixed bug 79684.

2006-10-27  Dick Porter  <dick@ximian.com>

	* file-io.c (get_file_attributes): Force symlinks to directories
	to be returned as a regular file.  Fixes bug 79733.
2006-10-26  Dick Porter  <dick@ximian.com>

	* file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
	CreateFile to open a directory then we need to set the
	FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.

2006-10-23  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_method_get_object): Cache the MonoMethod class and its
	friends.

Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* sgengc.c: small cleanup of timer code.

Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: fix some warnings and start adding support for
	complete object removal on domain unload.

2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>

	* assembly.c: build_assembly_name should not consider a version
	number without build or revision number invalid. Fixes bug #79715.

2006-10-18  Jonathan Chambers  <joncham@gmail.com>

	* icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
	call kernel32 function OutputDebugString directly.
	
	Signed-off-by: Jonathan Chambers <joncham@gmail.com>
	
Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: small cleanup, using a function to insert a MonoString
	in the string heap.

Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: moving GC fixes.

Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
	all the objects with finalizers belonging to an unloading appdomain.

Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* sgen-gc.c: added ability to allocate even when the nursery is fully
	pinned and fixed a couple of bugs.

2006-10-15  Zoltan Varga  <vargaz@gmail.com>

	* threads.h: Revert the last change for now.

	* threads.h (mono_thread_get_pending_exception): Rename this to
	mono_thread_get_undeniable_exception ().

2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>

	* appdomain.c: Use mono_get_exception_bad_image_format2 to construct
	BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
	when fname does not refer to valid assembly. This result in a more
	meaningful error message.
	* exception.c: added mono_get_exception_bad_image_format2 which 
	constructs a BadImageFormatException using the ctor taking a custom
	message and the file name. Passing in a NULL msg results in a default
	message.
	* exception.h: define mono_get_exception_bad_image_format2 function.
	* icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
	when file name pointed to an invalid IL image. Use 
	mono_get_exception_file_not_found2 to construct FileNotFoundException,
	as this results in a more meaningful error message.

2006-10-15  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
	#79465.

2006-10-12  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_type_size): Change the align parameter to guint32 for
	consistency with the other _size functions.
	(mono_type_stack_size): Ditto.

	* class.c object.c icall.c: Fix warnings caused by the above change.

	* class.c (mono_class_get_method_from_name_flags): Fix a typo.

	* image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.

	* metadata.c class.c loader.c: Add proper support for uncompressed metadata.

Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
	process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
	socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
	threadpool.h, threads-types.h: mark more internal functions.

2006-10-11  Dick Porter  <dick@ximian.com>

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
	Fix typo spotted by Robert Jordan in bug 79352 (though I can't
	reproduce the bug even before applying the fix.)

Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: allow retrieving attributes for arguments in generic
	methods (bug #79241).

Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* debug-mono-symfile.c: properly check fopen () result (found by
	coverity).

Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: make error message clearer and fixed two
	issuelets found by Coverity.

2006-10-10  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().

Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* object-internals.h, gc-internal.h, profiler-private.h:
	mark internal functions.

Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: put data in the text section.
	* icall.c: recognize more types in type_from_typename ().
	* process.c, marshal.c: added some GC FIXMEs.

Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* loader.c: check for NULL before initializing.

2006-10-09  Zoltan Varga  <vargaz@gmail.com>

	* gc.c (finalizer_thread): Use a non-alertable wait here.

	* class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
	until the correct solution is found.

2006-10-06  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_module_get_object): Avoid an assert when operating on
	modules with no metadata. Fixes #79596.

	* image.c (load_metadata_ptrs): Put back the error message when
	the #- heap is encountered since the support is not complete yet.

Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* gc.c: do not allow the user to SuppressFinalize () a
	delegate because it would leak the trampoline if present.

2006-10-06  Zoltan Varga  <vargaz@gmail.com>

	* class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
	PropertyPtr table.

2006-10-05  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.

	* metadata.c (mono_metadata_get_param_attrs): Ditto.

	* row-indexes.h: Add definitions for *Ptr tables.

	* metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.

	* metadata.c (mono_metadata_translate_token_index): New helper function to
	translate table indexes used in uncompressed metadata.
	(mono_metadata_decode_table_row): Ditto.
	(mono_metadata_decode_table_row_col): Ditto.

	* metadata.c: Add table schema for *Ptr tables.

	* class.c loader.c: Use the new helper function to access the affected metadata
	tables.
	
	* image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
	#38532.
	
2006-10-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
	sequences which can be unbounded in size. Fixes #79583.

2006-10-02  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_runtime_class_init): Handle a corner case in handling failure of
	static initialization.

	* domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.

	* class-internals.h (MonoVTable): Add an 'init_failed' flag.

	* domain.c (mono_domain_free): Free up type_init_exception_hash.

	* object.c (mono_runtime_class_init): Implement correct semantics when a static
	ctor fails, i.e. throw the same exception on subsequent accesses.
	
2006-09-0  Jonathan Chambers  <joncham@gmail.com>

	* domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
	* marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
	Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
	Handle marshalling of interfaces and VARIANTs contained in structs.
	
	Code is contributed under MIT/X11 license.
	
2006-09-30  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_custom): Fix some corner cases. Fixes	#79471.
	
	* marshal.c (mono_marshal_load_type_info): Allocate memory from the image
	mempool.

2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* console-io.c: ignore previous SIGINT handler.

2006-09-27  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
	(ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
	#79460, #79461, #79485.

	* class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.

	* marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
	#79217.

2006-09-26  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
	could be generated from it.

Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* rand.c: fix read loop to correctly handle EINTR.

Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, icall-def.h, icall.c, verify.c: changed the way
	internal calls are defined to keep methods closer to the declaring
	type and allow a significant reduction in runtime relocations and
	memory usage.

2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>

        * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
        exception message to have FileNotFoundException use the default
        assembly load error message. Fixes bug #79426.
        * exception.c: Support NULL msg in mono_get_exception_file_not_found2.

2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: (start_thread_or_queue) use the root domain when
	creating the thread instead of the async object one.

Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* class.c, object.c, class-internals.h, reflection.c:
	for arrays, store element_size inside MonoClass (speedup
	for array object creation).

Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: fixed CodeBase to use the file name and not the module
	name (bug #79365).

Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* mono-debug.c, mono-debug.h: export find_method as
	mono_debug_find_method ().

Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* debug-helpers.c, class-internals.h: added a few functions useful
	when debugging under gdb.

2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
	characters that need special handling.

Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* mono-config.c: make the os/cpu specification more flexible,
	allowing lists and negation.

2006-09-18  Jonathan Chambers  <joncham@gmail.com>

	* marshal.c: COM Interop fixes. Handle case where method->klass.
	is interface. Handle BSTR/MonoString when null. Use CDECL as 
	calling convention on non-windows platforms. This is for
	compatibility with XPCOM and MainWin COM.
	
	Code is contributed under MIT/X11 license.
	

2006-09-18  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
	correctly. Fixes #79217.

	* class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.

Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* mono-config.c: allow both an os and cpu attribute for dllmap
	and dllentry elemnets to enable a single config file to be used
	for multiple architectures.

2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>

	* loader.c: MonoLoaderError was cleared too soon on load failure.
	Fixes bug #79424.

Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: use the defining class vtable when accessing a
	static field, not a pobblibly derived class.

2006-09-17  Zoltan Varga  <vargaz@gmail.com>

	* icall.c string-icalls.c: Remove references to unicode.h.

	* unicode.h unicode.c Makefile.am: Remove these unused source files.

	* NOTES: Moved to ../../docs and renamed to thread-safety.txt.

	* marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
	indicating the image where custom marshaller types should be looked up.
	(mono_ftnptr_to_delegate): Use the image of the delegate type to look up
	custom marshallers, instead of corlib. Fixes #79425.

2006-09-14  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.

2006-09-14  Jonathan Chambers  <joncham@gmail.com>

	* environment.c (ves_icall_System_Environment_get_ProcessorCount): 
	Implement Environment.ProcessorCount.
	
	* environment.h (ves_icall_System_Environment_get_ProcessorCount): 
	Implement Environment.ProcessorCount.
	
	* icall.c: 
	Add Environment.ProcessorCount icall.
	
	Patch by Jason McFall.

2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c: don't append .exe/.dll when the filename already contains
	one of those extensions.

2006-09-12  Martin Baulig  <martin@ximian.com>

	* class.c (mono_bounded_array_class_get): Also add `IList<object>'
	to array interfaces.

2006-09-11  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_build_metadata): Create the
	MethodImpl's after emitting all types and methods, so we don't
	need another fixup pass for them.

2006-09-11  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_from_name_case): Fix regression introduced by the last
	change.

Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
	unload.

2006-09-10  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_method_return_message_restore): Avoid a crash if one of the out
	args is not set. Fixes #78926.

2006-09-08  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_init): Init class->no_special_static_fields from the cached info.

	* image.c (load_class_names): Move this to class.c, and rename it to 
	'mono_image_init_name_cache'.
	(load_modules): Fix a warning.

	* class.c icall.c image.c: Initialize image->name_cache lazily.

	* class-internals.h (MonoGetClassFromName): New hook function to find a class based
	on its name using information in the AOT file.

	* class.c (mono_class_from_name): Use the new hook function.

2006-09-06  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_param_get_objects): Handle enum default parameter values
	correctly.

	* marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
	Fixes #79289.
	
2006-09-06  Martin Baulig  <martin@ximian.com>

	* icall.c (mono_lookup_internal_call): Small fix.

2006-09-05  Raja R Harinath  <rharinath@novell.com>

	* debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
	double g_free.

2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>

	* debug-mono-symfile.c: Fix *some* memory leaks that happens only 
	when --debug is specified.

2006-09-04  Zoltan Varga  <vargaz@gmail.com>

	* class.c (setup_generic_array_ifaces): Fix a warning.

2006-09-04  Miguel de Icaza  <miguel@novell.com>

	* Temporarily remove the patch to assemly.c that checks the
	assembly versions as it breaks our gacutil.

2006-09-03  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.

	* assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
	a net 1.0 runtime.

	* marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
	created using the default ctor. Fixes #79152.
	(mono_string_builder_to_utf16): Ditto.

2006-09-01  Martin Baulig  <martin@ximian.com>

	Fix handling of the generic array interfaces.

	* class-internals.h
	(MonoDefaults): Removed `generic_array_class' and added
	`generic_ilist' class.

	* class.c
	(mono_bounded_array_class_get): Add the new generic array interfaces.
	(setup_generic_array_ifaces): New static method; create vtable
	entries for each method in the generic array interfaces.

	* metadata.c
	(select_container): Allow "parent-less" generic methods.

	* marshal.c
	(mono_marshal_get_generic_array_helper): New public method.

	* icall.c
	(ves_icall_System_Array_InternalArray_GetGenericValueImpl):
	Renamed into ves_icall_System_Array_GetGenericValueImpl() and
	moved the interncall into System.Array.

2006-09-01  Raja R Harinath  <rharinath@novell.com>

	A few more cases of avoiding work on types with ->byref set.
	Has the real fix for #79238
	* icall.c (is_generic_parameter): New helper.
	(ves_icall_Type_GetGenericParameterPosition): Use it.
	(ves_icall_Type_GetGenericParameterAttributes): Likewise.
	(ves_icall_MonoType_get_IsGenericParameter): Likewise.
	(ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
	(ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
	reference types.
	(ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
	reference types.
	(ves_icall_Type_get_IsGenericInstance): Likewise.
	(ves_icall_Type_get_IsGenericType): Likewise.

2006-09-01  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
	class if possible.

	* mempool.h (mono_mempool_get_allocated): New helper function.

	* object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
	change.

	* mempool.c: Fix warnings and the calculation of stats.

	* object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.

	* class.c (mono_class_setup_vtable): Update generic_vtable_count stat.

	* loader.c (mono_get_method_from_token): Update method_count stat.

	* class-internals.h (MonoStats): Add some stats.

2006-08-31 Robert Jordan  <robertj@gmx.net>

	* icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
	with managed variants.
	All code is contributed under the MIT/X11 license.
	
2006-08-31  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (reflection_methodbuilder_to_mono_method): Set 
	method->skip_visibility based up the skipVisibility parameter of DynamicMethods.

	* class-internals.h (MonoMethod): Add a 'skip_visibility' field.

	* marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
	with cycles in classes.

	* icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.

	* marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
	missing a [MarshalAs] directive. Fixes #79203.

	* marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
	klass->marshal_info. Fixes #79217.

2006-08-30  Martin Baulig  <martin@ximian.com>

	Committing a patch from Joachim Ante <joe@otee.dk>:
	Add support for binary data symbol stores.

	* debug-mono-symfile.c
	(mono_debug_open_mono_symbol_file): Renamed into
	mono_debug_open_mono_symbols() and added `raw_contents' and `size'
	arguments.

	* mono-debug.c
	(mono_debug_open_image): Added `raw_contents' and `size' args.
	(mono_debug_init_2_memory): New public function.

Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: handle TypedReference in GetTypeCode (bug #79150).

2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: implement support for ShadowCopyFiles.

2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>

	* string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
	when value is NULL (and should remove CID #51).

2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* image.c: moved 2 functions to ../utils.

Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* gc.c: cope with the target object of a GC handle being NULL
	(bug #78877).

Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* class.c: recursively check parent's explicit implementations
	of interface methods (fixes bug #79125).

2006-08-19  Miguel de Icaza  <miguel@novell.com>

	* filewatcher.c: Avoid warnings when building, do not redefine
	constants that are defined.

	Remove warnings.

2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* image.c: don't fail when the link points to an absolute path.

2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>

	* decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
	Fix CID #3.

2006-08-17  Miguel de Icaza  <miguel@novell.com>

	* image.c (full_path): A new method used to obtain the actual path
	of an assembly even in the presence of symbolic links.  

	This is necessary for the case where we are running a binary that
	has been GACed, but we are using the "published" path name
	($prefix/mono/1.0/blah.exe) which happens to point to the real
	file in the GAC.

	This was the source of the failure for the `xsp' command with the
	recent AppDomain changes, as far as the runtime was concerned,
	there were two different assemblies: $prefix/mono/1.0/blah.exe and
	$prefix/mono/gac/blah/version/blah.exe.

	(do_mono_image_open): use full path

2006-08-17  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_create_runtime_vtable): Add a FIXME.

2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>

	* marshal.c: Fix mono_marshal_check_domain_image if an invalid 
	domain_id is supplied. Fix CID #241 and corlib's unit tests.

2006-08-17  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_layout_fields): Set min_align to a bigger value for
	small structures. Fixes #78990.

2006-08-17  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.

	* appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.

2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	* marshal.c: don't load all the assemblies from a domain into newly
	created ones. The new domains might have different rules and load
	assemblies from different locations. Fixes bug #76757.

	Patch by Lluis. Conflicts resolved by Brian Crowell.

2006-08-16  Alp Toker  <alp@atoker.com>

	* socket-io.c: First half of the fix for #79084.
	Set sa_size to the length of the content, not that of the struct.
	Don't add NULL suffix to the content, this should be done in
	managed code if needed.

2006-08-14  Raja R Harinath  <rharinath@novell.com>

	Fix part of #79012
	* metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
	mono_metadata_parse_type returns NULL.

2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>

	* normalization-tables.h : new file for string normalization data.
	* locales.c, locales.h, icall.c :
	  added load_normalization_resource() for string normalization,
	  and icall as well.
	* Makefile.am : added normalization-tables.h to the sources.

2006-08-13  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Add more helper functions to reduce code duplication and use them
	everywhere.

2006-08-12  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Fix non-x86 stdcall warnings.
	
	* marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
	them everywhere.

2006-08-11  Jonathan Chambers  <joncham@gmail.com>

	* class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
	type check on multi-dimensional arrays. Fixes #79000.

2006-08-10  Jonathan Chambers  <joncham@gmail.com>

	* class.c (mono_class_setup_parent): setup is_com_object during class initialization.
	* object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
	to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
	* class-internals.h: add is_com_object to class structure.
	* marshal.c: Fixed marshalling for IDispatch and IUnknown, added
	null checks to COM object marshalling. Fix .ctor call on RCW.
	* icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
	
	All code is contributed under the MIT/X11 license.

2006-08-09  Dick Porter  <dick@ximian.com>

	* monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
	racing mono_monitor_allocator_lock() somewhere, so don't delete
	the critical section for now.  Found by running and exiting
	monodevelop.

2006-08-10  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (cominterop_get_native_wrapper): Fix a warning.
	(ves_icall_System_ComObject_FindInterface): Ditto.
	(ves_icall_System_ComObject_CacheInterface): Ditto.

	* metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
	(roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.

2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: treat pipes from process asynchronous reads as sockets
	when reading from them, so we get select/poll or epoll to wait for
	data.

2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>

	* loader.c: Fix a typo (CID #233) in the null check.

2006-08-07  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
	Hopefully fixes #78949.
	
	* metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
	Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
	bytes. Fixes #78972.

2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.c: we need to set errno here.

2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.c: let Win32Exception get the error value.

2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.c: translate errno into win32 errors for Win32Exception
	to know what happened.

2006-08-01  Zoltan Varga  <vargaz@gmail.com>

	* threadpool.c: Fix more warnings.

	* assembly.c (search_loaded): Fix warnings.

	* threadpool.c (mono_thread_pool_finish): Fix warnings.
	(mono_async_invoke): Ditto.

2006-07-28  Jonathan Chambers  <joncham@gmail.com>

	* object.c (mono_remote_class_vtable): Need to create proxy vtable
	entries for __ComObject type in addition to ComImport types.
	* marshal.c: Added support for marshalling COM RCWs. Fixed warning
	about hash table.
	
	All code is contributed under the MIT/X11 license.

Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* image.c: avoid tentative loading of modulerefs that contain
	no metadata (P/Invoke library names).

2006-07-28  Dick Porter  <dick@ximian.com>

	* loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
	mono_loader_lock() somewhere, so don't delete the critical section
	for now.  Found by running and exiting monodevelop.

2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.c: define the inotify syscalls when we're building on
	linux and have sys/syscall.h. The build system might not have support
	for inotify but the target system might have it.

2006-07-26  Miguel de Icaza  <miguel@novell.com>

	* domain.c: Documentation updates.

	* loader.c (mono_free_method): Do not release the method
	information if we are being profiled, as profilers will use this
	information at shut down to present some data to the user.

	This is needed so that the profiler does not crash, as the
	profiler tends to keep MonoMethods around, and they might become
	invalid if we free these.

	(mono_get_method_constrained): Return the original CIL stream
	method as well, so verification can be performed against it.

2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.[ch]: support for inotify file system watcher.
	* icall.c: add new internal calls for the inotify file system watcher.

2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: Windows also misbehaves on async. connects. Fixes bug
	#78888.

2006-07-20  Dick Porter  <dick@ximian.com>

	* file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
	warning.

2006-07-20  Dick Porter  <dick@ximian.com>

	* threads.c (start_wrapper): Do the thread cleanup while we still
	hold a reference to its object.  Fixes bug 78123.

2006-07-18  Kornél Pál  <kornelpal@gmail.com>

	* class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
	* debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
	  "managed-to-managed".
	* icall.c: Redirect string constructors that take sbyte* to
	  ves_icall_System_String_ctor_RedirectToCreateString.
	* marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
	  to CreateString () methods with matching signature.
	* reflection.c: Use original security informations for
	  MONO_WRAPPER_MANAGED_TO_MANAGED.
	* security-manager.c: Use original security informations for
	  MONO_WRAPPER_MANAGED_TO_MANAGED.
	* string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
	  that is a placeholder and only its address should be used.
	* string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
	  that is a placeholder and only its address should be used.

2006-07-15  Jonathan Chambers  <joncham@gmail.com>

	Begin implementing COM Interop.
	* appdomain.c: Increment corlib version.
	* class.c: Set ComImport classes' parent to __ComObject.
	* loader.c: Mark cominterop methods as such.
	* domain.c: Add __ComObject class to MonoDefaults structure.
	* image.c: Add 2 hashtables to the image for COM Interop related methods
	* metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
	using the mempool allocator
	
	* metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
	* metadata.h: Added cominterop field to _MonoMethodSignature struct and
	declaration for mono_metadata_type_dup_mp.
	
	* debug-helpers.c: Added strings for two additional wrapper types
	* object.c: Create proxy objects for ComImport classes
	* class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
	and added __ComObject class to MonoDefaults structure.
	
	* object-internals.h: Finish MonoRealProxy definition, and add definition of
	MonoComInteropProxy and MonoComObject.
	
	* marshal.c: Added support for COM Interop
	(signature_cominterop): Converts managed signature to corresponding
	unmanaged COM signature.
	(cominterop_get_function_pointer): gets unmanaged function pointer via
	COM object vtable
	(cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
	(cominterop_get_method_interface): returns interface type that method is defined on
	(mono_mb_emit_cominterop_call): emits native call to function pointer
	gotten from vtable
	(cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
	that matches signature of unmanaged function.
	(cominterop_get_native_wrapper): wrapper around adjusted method call.
	(cominterop_get_invoke): forwards call from proxy to __ComObject
	(ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
	(ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
	(ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
	
	* marshal.h: Added Marshal icall declarations.
	* icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
	so we can access them in finalizer
	
2006-07-14  Dick Porter  <dick@ximian.com>

	* object.c (mono_type_initialization_cleanup): Fix a race
	condition by temporarily commenting out the critical section
	deletion.

2006-07-14  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (create_custom_attr): Fix some warnings.
	(create_custom_attr_data): Ditto.
	(typebuilder_setup_properties): Save custom attrs for properties in dynamic
	types. Fixes #78855.

2006-07-11  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.

	* reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.

2006-07-08  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (resolve_object): Add support for DynamicMethod.

	* domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
	Joachim Ante (joe@otee.dk). Fix some shutdown leaks.

2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>

	* process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
	don't leak GPtrArray's pdata has we have no use (nor free) for it.

2006-07-01  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
	Fixes #77888.

2006-06-30  Raja R Harinath  <rharinath@novell.com>

	* icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
	slightly: remove a shadow local variable.

2006-06-29  Raja R Harinath  <rharinath@novell.com>

	* icall.c (ves_icall_MonoMethod_get_base_definition): Return the
	definition that introduces the virtual function slot.
	Also fix Coverity #105.

2006-06-29  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
	for dynamic assemblies. Fixes #78724.

2006-06-28  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
	Fixes #78722.

2006-06-21  Martin Baulig  <martin@ximian.com>

	* reflection.c
	(method_encode_clauses): Don't assert on `ex_info->handlers' here;
	fixes #76484.

2006-06-21  Zoltan Varga  <vargaz@gmail.com>

	* object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.

2006-06-20  Raja R Harinath  <rharinath@novell.com>

	Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
	nor TYPEREFs.
	* class.c (mono_class_create_from_typespec): Add 'context' argument.
	Inflate result if necessary.
	(mono_class_get_full): Remove old version.  Rename from
	'mono_class_get' and add 'context' argument.  Pass it to
	..._create_from_typespec.
	(mono_class_get): New.  Simple wrapper to mono_class_get_full.
	(mono_ldtoken): Revert change below.

2006-06-20  Martin Baulig  <martin@ximian.com>

	* class.c (mono_ldtoken): Don't pass the generic context to
	mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.

2006-06-15  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
	and later freeing it. Fixes #78638.

2006-06-15  Miguel de Icaza  <miguel@novell.com>

	* icall.c (mono_class_get_throw): Revert over-zealous error
	throwing, the caller for mono_class_get_throw will cope with
	errors when classes are not properly initialized already.

	The code still copes with loader exceptions though.

	Fixes the regression in reftype1 and reftype3 from the CAS tests.
	
2006-06-14  Miguel de Icaza  <miguel@novell.com>

	Fixes the `make run1' version of RuntimeAbort (to be commited,
	source is in Bugzilla).
	
	* metadata.c (mono_metadata_interfaces_from_typedef_full): Return
	FALSE on class loading failure instead of returning true.

	* class.c (mono_class_create_from_typedef): It is possible for
	mono_metadata_interfaces_from_typedef_full to fail if a class is
	not found, cope with this.
	

2006-06-14  Dick Porter  <dick@ximian.com>

	* socket-io.c: 
	* process.c: Fix a bunch of signed/unsigned warnings from gcc
	4.1.1

2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : oops, forgot to make it nsync with r61548.

2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>

	* icall.c: Another fix for building mono in Visual Studio.

2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>

	* marshal.c icall.c: Minor fixes for building mono in Visual Studio.
	
2006-06-09  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c: Put this back and really fix it this
	time. Sorry for all the trouble.

2006-06-08  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (mono_class_get_throw): Fix a warning.
	(ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
	ReflectionTypeLoadException if needed. Fixes #78606.

	* class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
	(mono_class_init): Ditto.

	* loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
	ref_only exceptions.
	(mono_loader_clear_error): Make this work even if there is no error.

2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>

	* object-internals.h marshal.c marshal.h icall.c: Implement method 
	Marshal.GetComSlotForMethodInfo using internal call.

2006-06-07  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
	a function for signalling it.

	* class.c (mono_class_from_typeref): Use the new kind of loader error when
	a referenced assembly is not found.

	* loader.c (mono_loader_error_prepare_exception): Add support for 
	LOADER_ERROR_ASSEMBLY. Fix formatting.

2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>

	* domain.c appdomain.c class-internals.h marshal.c: Add support 
	for VARIANT marshalling on windows and increment corlib version
	since Variant struct was added.

2006-06-03  Miguel de Icaza  <miguel@novell.com>

	* debug-mono-symfile.c: Revert Martin's previous patch which broke
	stack trace line information:

	(Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
	(Martin) when looking up B which is between A and C, return A not C.

	Bug is #78573.

	Thanks to Alexander Olk for tracking this down.

2006-06-02  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_set_last_error_windows): Fix build.
	
	* marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
	avoid clobbering its value.
	(mono_string_to_lpstr): Fix a warning on windows.

2006-05-31  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h (MonoClass): Removed obsolete 'dummy' flag.

	* reflection.c loader.c: Removed references to 'dummy' flag.

	* loader.c (mono_loader_error_prepare_exception): Fix a warning.

	* threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
	it gets GC tracking.

	* object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
	GC tracking.
	
	* object.c (mono_async_result_new): Add an additional parameter 'object_data'.

	* marshal.c threadpool.c: Update callers of mono_async_result_new.

	* appdomain.c: Bump corlib version.

2006-05-30  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
	CEE_STIND_REF when working with object references.

2006-05-31  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
	Fixes #78539.

2006-05-30  Miguel de Icaza  <miguel@novell.com>

	* loader.c (method_from_memberref): Fix argument value for
	mono_loader_set_error_method_load (I was passing the MonoClass
	instead of the class name char *).

2006-05-30  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
	CEE_STIND_REF when working with object references.

2006-05-30  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_print_stack_frame): Reverted the
	mono_method_full_name() change and replace the ':' with a '.'
	here.

2006-05-30  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c
	(mono_debug_symfile_lookup_location): Fix the algorithm:
	when looking up B which is between A and C, return A not C.

2006-05-29  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(MonoDebugMethodInfo): Make the typedef public.
	(MonoDebugSourceLocation): New public struct.

	* mono-debug.c
	(mono_debug_source_location_from_address): Removed.
	(mono_debug_source_location_from_il_offset): Removed.
	(mono_debug_il_offset_from_address): Removed.
	(mono_debug_address_from_il_offset): Removed.
	(mono_debug_lookup_method): New public function.
	(mono_debug_lookup_source_location): New public function; replaces
	the old mono_debug_source_location_from_*() functions; see the
	inline documentation.
	(mono_debug_free_source_location): New public function.
	(mono_debug_print_stack_frame): New public function; see the
	inline documentation.

	* debug-mono-symfile.c
	(mono_debug_find_source_location): Renamed into
	mono_debug_symfile_lookup_location(); only take a
	`MonoDebugMethodInfo *' and an `offset' argument; added inline
	documentation.
	(mono_debug_find_method): Renamed into
	mono_debug_symfile_lookup_method().

2006-05-27  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_open_full): Dont overwrite the status
	returned by mono_image_open_full ().

	* appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
	MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
	#78517.

	* object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
	#78518.

2006-05-27  Miguel de Icaza  <miguel@novell.com>

	* class.c (mono_class_from_typeref): handle missing images
	earlier, deals with bug #78418.   Refactor code; 

	Fix a warning introduced in my previous commit (some stale code
	from before I revisited my patch).

	* class.c (mono_class_create_from_typedef): On failure, remove the
	class from the MonoImage->class_cache as the class is not
	initialized;   Fixes the leak pointed out by Paolo.

2006-05-25  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_cleanup): Build fix.  Comment out the
	DeleteCriticalSections until I figure out which one may still be
	sometimes locked when mono_thread_cleanup is called.

2006-05-24  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_cleanup): Move the threading cleanup out
	of mono_thread_manage and back into its own function, so it can be
	called after the finalizer thread has finished.

	* appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup

2006-05-24  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
	Fixes #78495.

	* marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
	with non-blittable elements.
	(emit_object_to_ptr_conv): Ditto. Fixes #78492.

2006-05-24  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerEvent): Added
	`MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.	

	* mono-debug-debugger.c (mono_debugger_cleanup): Send a
	`MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
	`mono_debugger_event_handler' to NULL.

2006-05-24  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.

2006-05-24  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h
	(mono_debugger_create_notification_function): Added
	`MonoCodeManager *' argument.

Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.

Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
	* sgen.-gc.c, sgen-gc.h: simple generational compacting GC
	implementation.

Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: precise GC support: objects can't be stored in unmanaged
	memory anymore, even if they are kept alive by other references: since
	they can move the GC needs to be able to always find them.

Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* object.c: precise GC support for static fields. Support
	for moving GCs: write barriers and pinned allocation for interned
	strings.

Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* domain.c, domain-internals.h: precise GC support for the MonoDomain
	structure.

Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* class.c, gc.c: sgen and precise GC updates.

Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* marshal.h, marshal.c: added write barrier wrapper and precise type
	fixes.

Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* object.h, null-gc.c, boehm-gc.c: more write barrier functions and
	support.

Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c: precise and sgen GC updates.

Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* debug-helpers.c, class-internals.h: added write barrier wrapper type.

2006-05-22  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (start_wrapper): Fix a missed guint32 tid declaration.

2006-05-20  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
	MONO_TYPE_OBJECT. Fixes #78462.

2006-05-18  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
	and blittable types.

2006-05-17  Miguel de Icaza  <miguel@novell.com>

	* class.c (mono_class_get_exception_for_failure): Implement parts
	of a TODO: if the loader error is set (instead of the class
	error), we return a Loader exception that can be properly thrown
	elsewhere.

	This was exposed by some Winforms 2.0 code that I tried to run
	(Atsushi pointed me to it).

2006-05-17  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
	uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
	
	* marshal.c (emit_marshal_vtype): Add limited support for 
	UnmanagedType.LPStruct. Fixes #78427.

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
	Applied a patch from kangaroo to fix #77523.

2006-05-17  Martin Baulig  <martin@ximian.com>

	* threads.c
	(debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
	(debugger_thread_created): Removed.
	(debugger_thread_exited): Removed.

2006-05-15  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* object-internals.h (MonoReflectionResource): Sync with managed version.

2006-05-12  Wade Berrier <wberrier@novell.com>

	* threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6

2006-05-12  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
	functions try to allocate from the image mempool.

2006-05-12  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_attach): Fix usage of GetCurrentThread().

2006-05-12  Lluis Sanchez  <lluis@ximian.com>

	* object.c: The FieldGetter and FieldSetter methods require the full
	name of the class, not only the name. Fixes bug #78277.

2006-05-11  Miguel de Icaza  <miguel@novell.com>

	* loader.c (method_from_memberref): Do not pass the NULL klass to
	mono_loader_set_error_() methods.  Pass the non-NULL value
	(class). 

2006-05-11  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
	(mono_assembly_close): Null out assembly->image->references after freeing it.

	* image.c (mono_image_close): Free image->references.
	
	* reflection.c (mono_image_basic_init): Fix a small memory leak.

2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>

	* marshal.c: In function mono_mb_add_local don't use the mb pointer 
	before checking if it's NULL (g_assert).

2006-05-10  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
	I thought I already killed that two months ago, but now it somehow reappeared.

2006-05-10  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.

2006-05-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c: Allocate memory for dynamically created methods in the image
	mempools.

2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
	don't use the ad pointer before checking if it's NULL (g_assert).

2006-05-09  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
	a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.

	* marshal.c: Allocate all signatures from mempools.

	* marshal.c: Allocate some more signatures from mempools.

2006-05-09  Miguel de Icaza  <miguel@novell.com>

	* object.c (mono_load_remote_field): The code used to provide a
	temporary variable for returning results if the user did not
	provide a result pointer.  But our temporary variable was allocted
	on the satck.

	Fix calling code to always pass a result area.   Coverity ID 103.

2006-05-06  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
	value, not the old. Fixes #78312.
	(ves_icall_System_Threading_Interlocked_Add_Long): Ditto.

	* class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
	(mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
	per-image cache.

	* assembly.c (mono_assembly_close): Free image->references.

	* assembly.c (mono_assembly_names_equal): Fix a warning.
	(mono_assemblies_cleanup): Cleanup more global data.

	* metadata-internals.h (MonoImage): Add 'ptr_cache'.

	* image.c (mono_image_close): Free up the contents of 'array_cache', free up
	ptr_cache and image->modules.

	* image.c (mono_image_init): Allocate array_cache lazily.
	
2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
	behavior was changed recently and has bad side effects.

2006-05-05  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
	
	* assembly.c (mono_assembly_close): Remove a debug printf.

	* profiler.c (create_profiler): Use mono_aligned_addr_hash.

	* metadata-internals.h image.c assembly.c: Change the reference counting scheme
	to also allow for temporary references between mono_image_open ()/close ().

	* domain.c (get_runtimes_from_exe): Add a FIXME.	

2006-05-04  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c: Fix support for dynamic methods.

	* appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().

	* marshal.c (mono_marshal_cleanup): New cleanup function.

	* marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
	image mempools.

	* class.c (mono_class_init): Fix leaking class->nested_classes.

	* metadata-internals.h (MonoImage): Add a couple of new wrapper caches.

	* image.c (mono_image_init): Initialize the new cashes.

	* image.c (mono_image_close): Destroy the new cashes.

	* marshal.c: Get rid of most of the static caches in favor of per-image caches.

	* mempool.c (mono_mempool_strdup): New helper function.

	* class-internals.h: Add prototype for mono_loader_unlock ().

	* domain.c (mono_jit_info_table_find): Fix a warning.
	(mono_debugger_check_runtime_version): Ditto.

	* rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
	class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
	functions to these modules.

	* domain-internals.h domain (mono_cleanup): New internal method to cleanup most
	metadata modules.
	
	* marshal.c (mono_free_bstr): Fix a warning.

	* assembly.c (mono_assembly_open_full): Fix another small leak.

	* object.c: Fix some unload leaks in the remoting code.

	* object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
	function.

	* assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.

	* reflection.c: Fix some unload leaks in dynamic assemblies.

2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>

	* marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
	* marshal.h: Add BSTR support on Win32
	* icall.c: Add BSTR icalls
	* metadata.h: Add BSTR enums

2006-04-28  Miguel de Icaza  <miguel@novell.com>

	Work to catch the crash from #76795 and turn it into an
	exception.   As I stubbed out pieces of the VisualBasic support,
	I found a number of places where the code was failing and I added
	checks to those places. 
	
	* metadata.c (do_mono_metadata_parse_generic_class): Make this
	function return a status code.  If we fail to parse the signature
	from mono_metadata_parse_generic_inst, return FALSE.

	* loader.c (mono_get_method_from_token): If we fail to load the
	method (mono_class_get) return NULL.   

	* (method_from_memberref): Return NULL if we are unable to parse
	the method signature

	(mono_loader_error_prepare_exception): Since we now use the
	loader_error flag internally to stop processing, and obtaining
	exceptions that might be thrown will walk this code path the
	proper way of going from a MonoLoaderError into a
	MonoException was convoluted.   This new routine encapsulates the
	process of turning the error into an exception and *clearing* the
	error afterwards.
	
2006-04-27  Miguel de Icaza  <miguel@novell.com>

	Work to catch the crashes from 75075 (cope in Assembly.GetTypes
	with missing assemblies), and to cope with:

		* Missing fieldref from a non-existing assembly.
		* Missing methodref from a non-existing assembly.

	The first batch of work to address *some* of the issues from 76661.
	
	* object.c (mono_class_create_runtime_vtable): If we fail to
	initialize the class raise the exception here. 

	* metadata.c (mono_class_get_overrides_full): If any methods fail
	to load return the failure to the caller.

	* assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
	flagging assemblies that failed to load.   

	Do not crash if we are unable to load the assembly.

	(mono_assembly_close): Do nothing with REFERENCE_MISSING
	assemblies. 

	* loader.c (mono_loader_set_error_type_load): Change the
	convention to always pass unallocated strings, so we make our own
	copies (I know our own code had duplicated strings before, but
	this keeps the normal conventions).
	(method_from_memberref): Call mono_loader_set_error_method_load
	for all possible failures of loading the class. 
	Remove assert, turn into a loader error.

	(mono_loader_error_to_exception): Move this routine from mini
	(mini_loader_error_to_exception) there was no need to have that in
	mini. 

	* class.c (mono_class_from_typeref): If we were not able to load
	the assembly with mono_assembly_load_reference, call the
	mono_loader_set_error_type_load to register the problem.

	(mono_class_setup_fields): If we fail to load the type from
	mono_metadata_parse_type_full, call mono_class_set_failure and
	break from the loop.

	If class->exception_type is set, we do not layout the fields as
	that might crash the runtime, and instead return (from breaking
	from the previous loop).

	(mono_class_setup_vtable): This now returns a boolean indicating
	whether the table was properly setup.   The decision is driven by
	mono_class_get_overrides_full which might run into non-existing
	methods. 
	
	(mono_class_init): Returns TRUE on success or FALSE if there was a
	problem in loading the type (incorrect assemblies, missing
	assemblies, methods, etc).

	When we call mono_class_setup_fields we also check for a potential
	error inside this call (either a class exception or a general
	loader exception).

	(mono_class_create_from_typedef): If the parent fails to load
	(calling mono_class_get_full) return NULL.
	
	** Important **

	calls to mono_metadata_parse_type_full should be checked
	everywhere and set the mono_class_set_failure
	(MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.

	The current patch checks the places where my manually constructed
	tests show the errors are showing up, but we should do it
	everywhere. 

	** Important2 **

	mono_class_init return values should be tested everywhere, like
	the previous case this is something that we should audit
	everywhere and not only on the cases exposed by the tests I
	created. 

2006-04-26  Miguel de Icaza  <miguel@novell.com>

	* file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
	boolean parameter and instead pass the information on `options'
	parameter (FileOptions).

	* icall.c: Register the new signature for MonoIO.Open.

	* debug-helpers.c (dis_one): Trying to understand how coverity
	works.  Fix Run 5, item 78.

2006-04-26  Dick Porter  <dick@ximian.com>

	* socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
	dereference.

2006-04-25  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.

	* threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
	debugger_thread_created().
	(debugger_gc_push_all_stacks): Don't handle the main thread in any
	special way.
	(mono_debugger_init_threads): Removed the `main_thread_stack' arg.
	(mono_debugger_finalize_threads): New function; undo the effects
	of mono_debugger_init_threads().
	(mono_debugger_create_all_threads): Removed.

2006-04-24  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_close): Tidy up trace messages.

	* assembly.c (mono_assembly_close): Ditto.

	* assembly.c (mono_assembly_close): Clear out image->assembly so the image
	no longer references an already freed assembly. Fixes #78168.

2006-04-21  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_detach): Fix reference counting when
	detaching threads.

2006-04-21  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
	#78155.

2006-04-19  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
	(mono_type_to_stind): Ditto.

	* marshal.c: Use the new helper functions to simplify code.

	* image.c (mono_image_close): Add some code for help debug assembly unloading
	problems.

	* metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
	image mempool.

	* assembly.c (mono_assembly_open_full): Invoke the load hook when the
	assembly was already loaded in another appdomain. Fixes #78083.

2006-04-13  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c (mono_assembly_load_reference): Increase the refcount of the
	referenced assemblies.
	(mono_assembly_close): Decrease the refcount of the referenced assemblies.

	* domain.c (mono_domain_free): Add a trace message.

	* appdomain.c (add_assemblies_to_domain): Ditto.	

	* metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
	field.	

2006-04-12  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.

2006-04-12  Martin Baulig  <martin@ximian.com>

	* threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
	`USE_INCLUDED_LIBGC'.	

2006-04-12  Zoltan Varga  <vargaz@gmail.com>

	* image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
	the patch contains ../ and a small directory name later. Hopefully fixes
	#78035.

2006-04-10  Martin Baulig  <martin@ximian.com>

	Clean up the debugger's thread-handling code.

	The debugger's thread-handling code has been moved from
	../mini/debug-debugger.c to threads.c.  We now iterate directly
	over the `threads' hash, keep track of exiting threads and also
	use proper locking.

	We can now debug XSP and XSP based applications with the debugger.

	* object-internals.h (MonoThread): Added `gpointer end_stack'.

	* threads.h
	(MonoThreadCallbacks): Removed; this was only used by the debugger.
	(mono_install_thread_callbacks): Likewise.	

	* threads.c (mono_thread_callbacks): Removed.
	(debugger_thread_created, debugger_thread_exited): New static functions.
	(start_wrapper): Call debugger_thread_created().
	(thread_cleanup): Call debugger_thread_exited().
	(mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
	(mono_debugger_init_threads): New public function.
	(debugger_thread_vtable): Moved here from debug-debugger.c; we now
	iterate directly over the `threads' hash and also use proper locking.

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.

	* mono-debug-debugger.h
	(MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.

2006-04-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
	argument type=array. Fixes #78057.

2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated. Fixed bug #69652.

2006-04-07  Zoltan Varga  <vargaz@gmail.com>

	* loader.c metadata.c: Reapply a variant r59116.
	
	* loader.c metadata.c: Revert r59116 to see if it fixes the breakage.

	* class.c (mono_class_setup_interface_offsets): New internal function.

	* reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
	interfaces too. Fixes #77398.

	* reflection.c (encode_cattr_value): Add support for 
	parameter type=object, argument type=array.
	(load_cattr_value): Ditto. Fixes #77916.

	* marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
	(emit_ptr_to_object_conv): Ditto. Fixes #77960.

	* metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
	a byval char array and CharSet is Ansi.

	* metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.

2006-04-06  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c: Add some locking comments.
	
	* metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
	mempool.
	(mono_metadata_free_method_signature): Don't free the signature itself.

	* loader.c (mono_free_method): Don't free the signature in non-dynamic methods.	

	* assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
	reference the same MonoImage.
	(mono_assembly_load_from_full): Add an assert.

2006-04-05  Zoltan Varga  <vargaz@gmail.com>

	* image.c (mono_image_close): Don't put the image we are about to free into the
	loaded_images_guid_hash.

	* marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
	to reduce code duplication.

	* marshal.c: Register the native functions called by this module as icalls, to
	somewhat centralize the creation of MonoMethodSignature's.

	* loader.c (mono_method_signature): Add a cache for method signatures.

	* metadata.c (mono_metadata_get_param_attrs): New helper function to return
	the parameter attributes of a method.
	(mono_metadata_parse_method_signature_full): Refactored the computation of
	parameter attributes into a separate function. Also avoid one allocation in
	most cases.

	* assembly.c (mono_assembly_close): Ditto.

	* image.c (mono_image_close): Log trace messages with INFO level.

	* metadata-internals.h (MonoImage): Add a new 'method_signature' cache.

	* image.c reflection.c: Correct reference counting of image modules.
	
	* metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
	of this function from the image mempool.
	
	(mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
	to allow more cached types to be used.

	* mono-debug.c (mono_debug_add_method): Appled patch from
	David S. Miller  <davem@sunset.davemloft.net>: Access 
	minfo->lexical_blocks[] entry elements using read32().

2006-04-04  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_free_method): No longer free the method header for non-dynamic
	methods as it is allocated from the mempool.

	* metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
	image mempool.

	* metadata-internals.h: Add comments describing the reference counting scheme
	used for MonoImage and MonoAssembly.

	* image.c assembly.c reflection.c: Rework reference counting of images and 
	assemblies so they are freed when the runtime is shut down. Free some 
	additional memory structures when an image is unloaded.
	
2006-04-03  Zoltan Varga  <vargaz@gmail.com>

	* class.c loader.c reflection.c: Allocate more data structures in
	the image mempool.

2006-03-31  Miguel de Icaza  <miguel@novell.com>

	* icall.c
	(ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
	build on pre glib 2.4 systems.

2006-03-31  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.

	* icall.c: Fix some warnings.

2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* threads.c, object-internals.h, verify.c: changed the culture caching
	code to use a normal MonoArray for storage so the GC can keep track of
	them easily. Fixed bits of the cache logic, too and simplified the
	code.

Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
	thread for non-Boehm GCs.

Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* domain.c, object.c, domain-internals.h: reduce the amount of memory
	needed to keep track of the data for static fields.

2006-03-29  Raja R Harinath  <rharinath@novell.com>

	Fix #75172
	* icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
	for interface classes.  Use 'num_methods' instead.
	(ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
	before using '->vtable_size' field.

Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* domain.c, object.c, domain-internals.h: proxy_vtable_hash
	doesn't contain managed pointers, so use a normal hashtable.

Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>

	* reflection.c, class-internals.h, domain.c: fixed handling of types
	used as values for objects in custom attributes (bug #77915):

2006-03-24  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_setup_fields): Added support for generic
	instances; fixes #77580.

2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c: publickeytoken is case insensitive. Fixes bug #77898.

2006-03-24  Dick Porter  <dick@ximian.com>

	* file-io.c (get_file_attributes): More stat macro breakage.
	Fixes bug 77759.

Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>

	* profiler.c: added the file=filename option in the default profiler
	to output the profile data to filename.

2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
	bug #77877.

2006-03-22  Martin Baulig  <martin@ximian.com>

	* reflection.c (fieldbuilder_to_mono_class_field): Don't store the
	allocated `MonoClassField *' in `fb->handle'.

Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c, image.c, metadata-internals.h: implemented new mechanism to
	allocate interface ID to save memory and allow better ID reuse on
	appdomain unload. setup_generic_vtable () removal from Martin.

Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.h, appdomain.c, domain.c, exception.c, icall.c,
	locales.c, marshal.c, object.c, reflection.c, threadpool.c,
	threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
	write barriers for reference stores with managed objects accessed with
	C structures in the runtime and in embedding programs.

2006-03-20  Raja R Harinath  <rharinath@novell.com>

	* icall.c (ves_icall_Type_GetInterfaces): Avoid using
	'interface_id' and 'max_interface_id' fields of MonoClasses
	representing open generic types.

Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.h, object.c, icall.c: added functions to deal with
	storing valuetypes that contain references in managed objects.
	* reflection.c, string-icalls.c, threads.c, marshal.c: small
	fixes and comments around uses of mono_array_addr ().

Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.h, icall.c, monitor.c: object.GetHashCode ()
	implementation that supports the moving garbage collector.

Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c, threads-types.h, threads.c: implemented finalizer for
	LocalDataStoreSlot.

2006-03-15  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_type_size): Add a fixme.
	(mono_type_stack_size): Ditto.

	* object-internals.h (MonoReflectionAssemblyBuilder): Added 
	'type_forwarders' field.

	* tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
	attribute from net 2.0.

	* object.c (mono_vtable_get_static_field_data): Moved this to object.c
	from class.c.

	* class.c (mono_class_setup_fields): Fix a warning.
	
	* class.c (mono_class_from_name): Add support for assemblyref entries
	in the EXPORTEDTYPE table.

	* reflection.c: Add support for handling type forwarders under net 2.0.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.	
	
2006-03-14  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
	overwriting entries in ModuleBuild->types, also clean up the code
	a little. Fixes #77774.

Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>

	* domain.c, assembly.c, metadata-internals.h, class-internals.h:
	load friend assembly info when present.

2006-03-14  Raja R Harinath  <rharinath@novell.com>

	Fix crasher on gtest-158.cs.
	* metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
	the return value if the MonoClass we want is yet in an
	inconsistent state.
	* class.c (mono_class_create_from_typedef): Add an comment
	explaining an order dependency between mono_class_setup_parent and
	mono_class_setup_mono_type.

Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c: documentation updates and events bug fix.

Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c: some cleanup, locking fixes.

Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c: fix the generics code to setup nested
	type info to the instantiated type (bug #77770).

Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>

	* marshal.c: fixed a few type correctness issues.

Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>

	* loader.c: the Set/Get/Addrtess array methods should be public.

2006-03-11  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (mono_register_jit_icall_wrapper): Fix a warning.
	
	* icall.c (mono_register_jit_icall_wrapper): Register the argument, not
	info->wrapper.

2006-03-10  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (mono_register_jit_icall): Allocate the structure using g_new0.

	* class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.

	* mempool.c (mono_mempool_alloc): Speed this up a bit.
	(mono_mempool_alloc0): Ditto.

2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c:
	(create_object_from_sockaddr): it was allocating 4 extra bytes
	for the AF_UNIX data. Fixes bug #77747.

2006-03-09  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.

2006-03-09  Dick Porter  <dick@ximian.com>

	* file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
	Fixes bug 76966 again.

2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>

	* verify.c (dtfinfo_fields): Updated to match new (serializable) field
	names from r57532
	* appdomain.c: Bumped corlib version to 48 (due to r57532)

2006-03-07  Martin Baulig  <martin@ximian.com>

	* object.c
	(mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.

2006-03-07  Martin Baulig  <martin@ximian.com>

	* class.c
	(mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
	regression introduced in r56970; see gtest-252.cs.

	* loader.c (mono_get_method_constrained): Correctly handle generic
	methods; see gtest-253.cs.

2006-03-04  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.

2006-03-04  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
	compute the parent type at runtime, just like we're already doing
	it for interfaces.

	* reflection.c
	(mono_reflection_bind_generic_parameters): Don't compute the
	parent type anymore.

	* class-internals.h (MonoDynamicGenericClass): Removed `parent'.

2006-03-04  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h
	(mono_debugger_create_notification_function): Allocate memory at
	runtime and return a pointer to it.

2006-03-03  Zoltan Varga  <vargaz@gmail.com>

	* assembly.c: Fix windows build.
	
	* assembly.c: Fix build.

	* assembly.c: Move the contents of os/{unix,win32}/util.c to this file.	

	* gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
	
2006-03-03  Dick Porter  <dick@ximian.com>

	* process.c
	(ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
	Check parameters before dereferencing them.  Fixes Aaron's part of
	bug 77393.

2006-03-03  Raja R Harinath  <rharinath@novell.com>

	Fix performance regression.
	* loader.c (find_method_in_class): Add 'from_class' argument.
	Rename 'klass' argument to 'in_class'.	The signature is compared
	against the method in 'in_class', and the corresponding method is
	returned from 'from_class'.
	(find_method): Walk both 'in_class' and 'from_class' in parallel.
	(method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
	type definition and generic instantiation in parallel.
	(mono_get_method_constrained): Update to changes.

Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>

	* threads.c: make sure the domain is correct, too when doing
	mono_thread_attach ().

2006-03-01  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
	windows. Fixes #77683.

Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.h, *: introduced specific way to set elements of an array
	of references to be used as write barrier. Still need to audit the
	uses of mono_array_addr.

2006-03-01  Miguel de Icaza  <miguel@novell.com>

	* object-internals.h: New field to cache the assmebly name, patch
	from Tambet Ingo (tambet@ximian.com)

Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>

	* decimal.h, class-internals.h, metadata-internals.h,
	file-io.h: mark a few function declarations as internal, to
	reduce the number of PLT entries.

2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.c: fix typo in warning message.

Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>

	* loader.c: on unix, lookup the "*A" version of a function
	if charset is auto as a second option before failing.

2006-02-28  Raja R Harinath  <rharinath@novell.com>

	* class.h (mono_class_inflate_generic_method): Revert to two
	argument version.
	* class-internals.h (MonoMethodInflated): Remove 'inflated' field.
	(mono_class_inflate_generic_method_full): Add.
	* class.c (mono_class_inflate_generic_method_full): Rename from
	'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
	(mono_class_inflate_generic_method): New.  Wrapper around ..._full.
	* loader.c, reflection.c: Update to changes.

Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>

	* icall.c: const fixes and small improvements.

2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: for asynchronous connect(), enable the same workaround
	for BSD 6 as for the Mac. Fixes bug #77637.

2006-02-24  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_marshal_free_asany): Fix handling of blittable
	formatted classes. Fixes #77524.

2006-02-24  Raja R Harinath  <rharinath@novell.com>

	* class.c (inflate_generic_type): Add a couple more
	micro-optimizations.
	(inflate_generic_context): Don't use the 'gmethod' from
	'inflate_with'.
	(mono_class_inflate_generic_method): If the method has generic
	parameters, but the passed-in context doesn't have a 'gmethod',
	create one.  Use the possibly simplified generic instantiation
	from the declaring class instead of the one passed in.

2006-02-24  Raja R Harinath  <harinath@gmail.com>

	Make generic method signature and method header handling lazy.
	* class.c (mono_class_inflate_generic_signature): Move to loader.c.
	(inflate_generic_header): Likewise.
	(mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
	parameter to avoid inflating types.
	(mono_get_inflated_method): Empty out.
	* class.h (mono_class_inflate_generic_method): Update to changes.
	* loader.c (mono_get_method_from_token): Don't parse signature for
	generic methods, nor methods of generic classes.
	(mono_method_signature): Rename from 'mono_method_signature'.
	Inflate signature on demand.
	(mono_method_get_header): Inflate method header on demand.
	* reflection.c: Update to changes.

2006-02-23  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (mono_metadata_inflate_generic_inst): If the
	instantiation is closed, don't bother expanding it in the new
	context.
	* class.c (inflate_generic_class): If the generic instantiation
	doesn't change after inflation, return the argument itself.
	(inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
	Add bounds checks.
	(inflate_generic_context): If neither the generic class nor the
	generic method instantiations change, return the original context.
	* reflection.c (mono_method_get_object): Do
	'mono_get_inflated_method' before accessing the ->klass field.
	(inflate_mono_method): Don't create a MonoGenericMethod unless
	necessary.
	(inflate_method): Don't pass a constructed type as the declaring
	type of a methodbuilder.

Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.c: fix memory overwrite.

2006-02-22  Dick Porter  <dick@ximian.com>

	* threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
	it doesn't work any more.
	(mono_threads_request_thread_dump): Fix unused variable warnings.

Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
	mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
	the public header file.

2006-02-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.

Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, object.c: reduce the size of MonoVTable
	and store the interface_offsets array at negative offsets.

Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>

	* metadata.c: tweak table descriptors data structures to reduce
	size and runtime relocations.

Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>

	* marshal.c: fix some types and opcodes to be type-safe
	in marshaling wrappers.

2006-02-21  Ankit Jain  <jankit@novell.com>

	* metadata.h (mono_metadata_decode_signed_value): Add declaration.

2006-02-21  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (get_constraints): Relax debugging checks for monodis.

2006-02-21  Ankit Jain  <jankit@novell.com>

	* metadata.c (mono_metadata_load_generic_params): Move the code
	checking for ambiguous generic params from here to mono/dis/get.c
	* metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.

2006-02-21  Raja R Harinath  <harinath@gmail.com>

	Fix assertion triggered when compiling nemerle.
	* class.c (mono_get_shared_generic_inst): Rename from
	get_shared_inst and make non-static.
	* loader.c (mono_get_shared_generic_method): New.  Used to create
	the MonoGenericContext-equivalent of a MonoGenericContainer.
	(mono_get_method_from_token): Initialize the 'context' field of
	the created MonoGenericContainer.
	* reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
	* metadata.c (get_constraints): Add sanity check.
	* class-internals.h: Add new internal methods.

	* reflection.c (verify_safe_for_managed_space): New sanity check.
	Currently checks that owner-less generic parameters aren't allowed
	in managed space.
	(mono_type_get_object): Use it.
	* icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
	that are now in mono_type_get_object.
	(ves_icall_MonoMethod_GetGenericArguments): Likewise.

2006-02-19  Raja R Harinath  <harinath@gmail.com>

	* metadata.c (mono_type_create_from_typespec): Rename from
	mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
	argument and caching of types in the generic container.
	(unwrap_arrays, find_generic_param): Remove.
	* metadata-internals.h: Update.
	* class-internals.h (_MonoGenericContainer): Remove 'types' field.

2006-02-18  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_get_exception_for_failure): Fix a warning.

	* marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
	return values. Fixes #77581.

	* class.c (mono_fnptr_class_get): Switch name and name_space.

	* marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
	classes and add support for [In, Out] attributes.
	(mono_marshal_free_asany): Ditto. Fixes #77524.

2006-02-18  Raja R Harinath  <harinath@gmail.com>

	* class.c (mono_class_from_generic_parameter): Make more robust to
	incomplete MonoGenericContainers from monodis.

Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class-internals.h: added some more exception types.
	* class.c, metadata.c: added a few checks to handle missing
	types.

2006-02-17  Raja R Harinath  <rharinath@novell.com>

	Use owner-less generic-params some more.
	* class.c (my_mono_class_from_generic_parameter): Remove.
	(mono_class_from_generic_parameter): Handle null image,
	param->name and param->owner.
	(mono_class_from_mono_type): Update.
	(mono_class_create_from_typespec): Remove 'container' parameter.
	If that parameter is non-null, the result is always inflated by
	'mono_class_get_full' anyway.
	(mono_class_get): Rename from _mono_class_get.  Remove 'container'
	parameter.
	(mono_class_get_full): Update.

	* class.c (inflate_generic_type) [GENERICINST]: If the generic
	instance is not open, don't bother inflating.
	(mono_class_setup_fields): Hoist some loop-invariants.  Don't
	parse metadata for inflated classes.
	(_mono_class_get): Change GenericContext* parameter to
	GenericContainer*.
	(mono_class_create_from_typespec): Likewise.  Simplify, and
	implement trivially.  All the cases are handled in
	mono_class_from_mono_type.  Don't inflate returned class.
	(mono_class_get_full): Delegate GENERICINST optimization to
	inflate_generic_type.
	(mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.

2006-02-16  Dick Porter  <dick@ximian.com>

	* socket-io.c (create_object_from_sockaddr): Fix typo.
	(create_sockaddr_from_object): Check array lengths before
	potentially accessing items off the end.
	(ves_icall_System_Net_Sockets_Socket_Receive_internal)
	(ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
	(ves_icall_System_Net_Sockets_Socket_Send_internal)
	(ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
	length checks to avoid wraparound overflows.
	(ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
	contents of the array of sockets
	(hostent_to_IPHostEntry2)
	(addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
	Check return value of inet_ntop ().
	(addrinfo_to_IPHostEntry): Fix typo

2006-02-16  Raja R Harinath  <rharinath@novell.com>

	Type metadata parsing doesn't use generic-instantiation information.
	* metadata.c (mono_metadata_parse_array_full): Change
	MonoGenericContext* parameter to MonoGenericContainer*.
	(mono_metadata_parse_type_full): Likewise.
	(mono_type_create_from_typespec_full): Likewise.
	(mono_metadata_parse_mh_full): Likewise.
	(mono_metadata_parse_generic_inst): Likewise.
	(do_mono_metadata_parse_generic_class): Likewise.
	(do_mono_metadata_parse_type): Likewise.
	* metadata-internals.h: Update to changes.
	* class.c (mono_class_find_enum_basetype): Likewise.
	(mono_class_setup_fields): Likewise.
	(mono_class_create_from_typespec): Likewise.
	* loader.c (method_from_methodspec): Likewise.
	(mono_get_method_from_token): Likewise.
	(mono_method_get_header): Likewise.

Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>

	* marshal.c: handle additional GENERICINST case (patch from
	Thong Nguyen <tum@veridicus.com>).
	Fix a few cases where LDIND_I/STIND_I was used for references.

2006-02-16  Raja R Harinath  <rharinath@novell.com>

	* reflection.c (mono_reflection_get_token): Remove unused variable.

2006-02-16  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_get_token): Add support for fields
	in instantiated generic types.

	* icall.c
	(ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.

2006-02-15  Martin Baulig  <martin@ximian.com>

	* icall.c
	(ves_icall_MonoMethod_get_HasGenericParameters): Removed.
	(ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
	(ves_icall_MonoMethod_get_IsGenericMethod): New icall.
	(ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.

Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c, metadata.c, metadata.h, object.c, icall.c,
	marshal.c: changed mono_type_get_underlying_type () to do
	the sensible thing and introduced mono_type_generic_inst_is_valuetype().
	Fixed handling of instantiated generic valuetypes (bug #75479).

2006-02-15  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (mono_metadata_decode_signed_value): Simplify.
	Delegate to mono_metadata_decode_value, and work on the returned value.

	* icall.c (ves_icall_MonoType_GetGenericArguments):
	Add consistency check here too.
	
2006-02-15  Ankit Jain  <jankit@novell.com>

	* metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
	char/short etc.

2006-02-15  Ankit Jain  <jankit@novell.com>

	* metadata.c (mono_metadata_decode_signed_value): New function to decode
	signed values, used only for representing lower bounds of arrays.
	(mono_metadata_parse_array_full): Use new
	mono_metadata_decode_signed_value to decode lower bounds.

2006-02-14  Martin Baulig  <martin@ximian.com>

	* reflection.c
	(mono_reflection_get_token): Support "MonoGenericMethod" and
	"MonoGenericCMethod" and allow generic instances / methods.

2006-02-11  Zoltan Varga  <vargaz@gmail.com>

	* console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
	to obtain the terminal size using an ioctl.

	* object.c (mono_nullable_init): Revert this as nullable reference
	types are not valid.
	(mono_nullable_box): Ditto.

2006-02-09  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_detach): Drop a reference to the thread
	we're detaching.

2006-02-09  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_nullable_init): Handle nullable reference types.
	(mono_nullable_box): Ditto. Fixes #77446.

2006-02-07  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.

2006-02-07  Ankit Jain  <jankit@novell.com>

	* socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
	* socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
	(ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
	(ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
	(ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
	(ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.

2006-02-02  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_create_generic): Set type_token as well.

	* object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
	compatible with MS.

2006-02-02  Martin Baulig  <martin@ximian.com>

	* threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
	has never been used so far.

2006-02-02  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h: Changed comment at the top of this file;
	the header is not installed, but it's safe to #include it from
	within the JIT.

	* mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
	* mono-debug-debugger.c, debug-mono-symfile.c: Likewise.

2006-02-02  Martin Baulig  <martin@ximian.com>

	* mono-debug.h
	(MonoSymbolTable): Removed the `metadata_info' field.

	* mono-debug.c
	(mono_debug_init_1): Always set `mono_symbol_table->corlib'.

	* mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
	(mono_debugger_add_builtin_types): Removed.
	(MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
	(mono_debugger_create_notification_function): We now operate on a
	pre-allocated area; take a `gpointer' and return `void'.

	* mono-debug-debugger.c
	(MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
	(mono_debugger_add_builtin_types): Removed.

2006-02-02  Martin Baulig  <martin@ximian.com>

	* threads.c (mono_debugger_create_all_threads): New public method.

Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
	breaks on several platforms.

2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>

	* assembly.c: the VS.NET build doesn't supply default values for
	MONO_ASSEMBLIES and MONO_CFG_DIR.

2006-02-01  Zoltan Varga  <vargaz@gmail.com>

	* gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
	helper function.

	* threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().

	* loader.c (method_from_memberref): Fix a warning.

	* metadata.c (mono_metadata_load_generic_params): Fix a warning.

	* marshal.c (emit_struct_conv): Fix marshalling of embedded structs
	with explicit layout. Fixes #77433.

2006-01-31  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
	max_interface_id is initialized before using it. Fixes #77398.
	(ves_icall_Type_GetInterfaces): Ditto.

2006-01-30  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (mono_metadata_parse_method_signature_full): Don't
	allocate memory for parameter attributes when parsing memberref
	signatures.
	* loader.c (mono_loader_set_error_method_load): Don't warn.
	(method_from_memberref): Ensure MissingMethodException gets thrown
	if method is not found.  Make warning more informative.

2006-01-29  Raja R Harinath  <harinath@gmail.com>

	Fix #77397
	* icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
	return true if is byref.
	(ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
	(ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
	(ves_icall_MonoType_get_DeclaringMethod): Likewise.

2006-01-27  Raja R Harinath  <rharinath@novell.com>

	Fix tests/find-method.2.il
	* loader.c (find_method, find_method_in_class): Remove is_inflated
	argument.  Revert 2006-01-18 change.
	(method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
	is generic, search for method in its generic definition.
	* class.c (mono_class_setup_vtable_general): Print generic
	arguments of generic types in debugging printf.

2006-01-26  Zoltan Varga  <vargaz@gmail.com>

	* object-internals.h (MonoThread): Add 'thread_dump_requested' field.

	* threads.c (mono_threads_request_thread_dump): New helper function.

2006-01-25  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (mono_type_create_from_typespec_full): Fix caching of types.

2006-01-25  Ankit Jain  <jankit@novell.com>

	* metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
	move definition to ..
	* metadata.c (mono_generic_params_with_ambiguous_names): .. here.
	
2006-01-25  Ankit Jain  <jankit@novell.com>
	    Raja R Harinath  <rharinath@novell.com>

	* metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
	* metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
	as necessary.

2006-01-25  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h: Moved `MonoDebuggerManager' and
	`MonoDebuggerThread' into debug-debugger.c.

Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>

	* profiler.c: fix printing of data.

2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>

	* object.c, marshal.c : Fixed runtime part of bug #77315. Reject
	  invalid surrogate in UTF7/UTF8 bytes and don't return NULL.

Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>

	* object.c: fix deadlock related to string interning.

2006-01-23  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.

	* mono-debug-debugger.c (mono_debugger_io_layer): Removed.

2006-01-23  Martin Baulig  <martin@ximian.com>

	* mono-debug.h: Moved the prototypes of some functions which are
	used by the JIT here from mono-debug-debugger.h.

2006-01-21  Martin Baulig  <martin@ximian.com>

	* Makefile.am: Don't install mono-debug-debugger.h.

2006-01-21  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h: Enforce the private status of this header
	file and removed unneccessary #include's in metadata/*.c and mini/*.c.
	Moved some stuff from mono-debugger-jit-wrapper.h here.

2006-01-20  Raja R Harinath  <rharinath@novell.com>

	* class.c (mono_class_from_typeref): Add a sanity test to help
	catch lack of assembly load/search hooks.

2006-01-19  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_struct_conv): Relax the fields with same offset
	check even more. Fixes #77230.

2006-01-18  Martin Baulig  <martin@ximian.com>

	* loader.c (find_method_in_class): Added `gboolean is_inflated'
	argument; if false, we compare the uninstantiated signatures.
	(method_from_memberref): Compare the uninstantiated signatures;
	fixes #76417.

2006-01-18  Robert Jordan  <robertj@gmx.net>

	* boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
	Clear the weak link. Fixes bug #77170.

	* gc.c (mono_gchandle_free):
	Reflect *-gc.c changes (tiny optimization).

2006-01-18  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_metadata_signature_dup): Applied patch from
	Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
	Fixes #77288.

2006-01-17  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_struct_conv): Allow fields with the same offset when
	marshalling from native to managed code. Fixes #77230.

2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: fix problem (Mac only) when more than one asynchronous
	connect. Fixes bug #77020.

Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>

	* class.c: fixed id assignement for nested interfaces (bug #77275).
	Added also better info for --print-vtable debugging.

2006-01-12  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
	interfaces on-the-fly; fixes #76625.

	* class-internals.h
	(MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
	don't need that anymore.

2006-01-12  Miguel de Icaza  <miguel@novell.com>

	* socket-io.c
	(ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
	To avoid initing the nested_classes when not needed I turned the
	PeerCredData as a toplevel internal class, as it has to be shared
	anyways. 

	Fixes the CASA issue.

2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>

	* domain.c: Accessors for MonoJitInfo

	* profiler-private.h: Add jitinfo to the end jit hook

	* profiler.[ch]: Define new hooks, called after jitting which give
	the MonoJitInfo that was compiled

2006-01-10  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_setup_events): Add support for generic
	classes; fixes #76440.

2006-01-06  Raja R Harinath  <rharinath@novell.com>

	Fix #77160.
	* icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
	on passed-in method.

2006-01-03  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_runtime_invoke_array): Add Nullable support.

	* icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.

2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>

	* file-io.c: Don't consider sockets as directory and avoid an endless
	loop. Fix bug #76966.

2006-01-03  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_nullable_init): New helper function.
	(mono_nullable_box): Ditto.

	* marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.

	* icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.

	* icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
	
2006-01-02  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_is_assignable_from): Make T assignable to 
	Nullable<T>.

2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Bump corlib version to 46.
	* icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
	serialization purpose) and changed ves_icall_System_Reflection_
	Assembly_get_code_base signature to accept a boolean (to escape, or 
	not, the assembly code base).

2005-12-23  Dick Porter  <dick@ximian.com>

	* icall.c: 
	* threads-types.h: 
	* threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
	CreateEvent icall now returns "created" boolean parameter.

2005-12-22  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
	#76967.

	* reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
	when attr_klass is an interface. Fixes #77045.

2005-12-20  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_struct_conv): Fix previous patch.
	
	* marshal.c (emit_struct_conv): Add a check for fields with the same
	offset.

2005-12-20  Raja R Harinath  <rharinath@novell.com>

	Fix regression in Mono.C5.
	* class.c (mono_class_create_generic): If 'klass' is an interface
	set up the interface offsets.
	(mono_class_is_assignable_from): Don't throw away generic arguments.

2005-12-19  Raja R Harinath  <rharinath@novell.com>

	* icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
	type parameters.

2005-12-15  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (mono_metadata_parse_method_signature_full): Remove a
	dead store.
	(do_mono_metadata_parse_generic_class): Don't pass the current
	generic context when parsing the type being instantiated: it
	cannot use it, anyway.

	* loader.c (method_from_memberref): Don't inflate a signature if
	it doesn't contain any type parameters.

2005-12-15  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.

2005-12-14  Martin Baulig  <martin@ximian.com>

	* class.c
	(mono_type_get_name_recurse): Don't return null for type
	parameters and open generic classes.
	(mono_class_setup_methods): Don't exclude generic instances.
	(mono_get_unique_iid): Use different IDs for different
	instantiations of the same generic type.
	(mono_class_setup_vtable): Only use setup_generic_vtable() for
	open generic instances; create a normal vtable for closed generic
	instances.
	(mono_class_setup_vtable_general): We're now also called for
	closed generic instances.

	* reflection.c
	(mono_reflection_bind_generic_parameters): Correctly use
	mono_metadata_lookup_generic_inst() everywhere.

2005-12-14  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_create_runtime_vtable): Call 
	mono_class_setup_vtable ().

	* reflection.c (mono_reflection_get_dynamic_overrides): New helper
	function.
	(ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
	#76959.

	* loader.c (mono_loader_set_error_type_load): Print the type load
	warnings to the console so they are more visible to the user.
	(mono_loader_set_error_method_load): Ditto.

	* reflection.c (ensure_runtime_vtable): Revert the last change as it
	is still broken.
	
	* reflection.c (ensure_runtime_vtable): Fix build.

	* reflection.c (ensure_runtime_vtable): Disable an optimization which
	doesn't work in all cases.

2005-12-13  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_array_new_full): Treat a single dimensional array
	with 0 lower bounds as an szarray. Fixes #76973.

	* reflection.c (custom_attr_visible): Really fix this.

2005-12-12  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (custom_attr_visible): Allow nested public attributes
	as well.

	* class.c (mono_class_setup_vtable_general): Add missing != -1 to an
	interface check.

2005-12-12  Raja R Harinath  <harinath@gmail.com>

	* class.c (set_generic_param_owner): Delete.
	(mono_class_create_from_typedef): Don't set ->owner field of
	generic parameters to "param containers" of enclosing classes.
	* reflection.c (mono_reflection_initialize_generic_parameter):
	Likewise.

2005-12-11  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (custom_attr_visible): Fix build.

2005-12-10  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_custom_attrs_from_builders): Avoid returning
	private attributes.
	
	* reflection.c (reflection_methodbuilder_to_mono_method): Fix
	handling of null parameter defaults.

2005-12-09  Raja R Harinath  <rharinath@novell.com>

	* class.c (mono_class_from_generic_parameter): Don't set
	klass->generic_container.
	(my_mono_class_from_generic_parameter): Likewise.

2005-12-07  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (load_public_key): Fix a warning.
	(method_encode_code): Fix unaligned accesses.

2005-12-07  Martin Baulig  <martin@ximian.com>

	* object-internals.h (MonoReflectionGenericParam): Added `cattrs'.

	* reflection.c
	(write_generic_param_entry): Encode our custom attrs.

	* appdomain.c (MONO_CORLIB_VERSION): Bump to 45.

2005-12-07  Martin Baulig  <martin@ximian.com>

	* reflection.c (encode_new_constraint): Removed; we don't use the
	`NewConstraintAttribute' anymore.

2005-12-06  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
	not fire a TypeResolve event when Assembly.GetType () is called.

2005-12-05  Ben Maurer  <bmaurer@ximian.com>

	Beginning of support for nullable types in the runtime. Parts of
	this patch are from Martin.

	* appdomain.c (MONO_CORLIB_VERSION): Bump

	* domain.c (mono_init_internal): get the nullable type

	* class.c (mono_class_is_nullable): New method
	(mono_class_get_nullable_param): New mehod
	(mono_class_create_generic): In types T? set cast_class to T

	* class-internals.h (MonoDefaults): new nullable default class
	(mono_class_get_nullable_param, mono_class_get_nullable_param):
	new methods.

2005-12-05  Raja R Harinath  <rharinath@novell.com>

	* metadata.c (select_container): New.  Refactor code to select the
	appropriate GenericContainer given the type of generic parameter
	we are looking for.
	(mono_metadata_parse_generic_param): Take a MonoGenericContainer,
	not a MonoGenericContext.  Use select_container.  Update parameters.
	(do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
	and MONO_TYPE_MVAR.
	(unwrap_arrays): Remove duplicate tests.
	(find_generic_param): Rename from 'has_same_context'.  Now walks a
	generic instantiated class to find any arguments that are generic
	parameters.
	(mono_type_create_from_typespec_full): Use find_generic_param to
	avoid evicting some generic instantiations from the typespec
	cache.

Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixed writing of doubles on ARM FPA.

2005-12-02  Robert Jordan  <robertj@gmx.net>

	* icall.c: Fixed EventInfo.ReflectedType (#76829).

2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
	least on SUSE 10 they are not the same (on debian, they are just the
	same thing).

2005-12-01  Raja R Harinath  <rharinath@novell.com>

	* icall.c (ves_icall_MonoType_get_DeclaringType): Implement
	DeclaringType for VARs and MVARs.
	* class.c (set_generic_param_owner): Fix initialization of owner
	fields.

Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>

	* icall.c: fixed Enum.ToObject() to correctly convert the values.

2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: workaround for a bug that shows up on the Mac:
	select()+connect() on a blocking socket is not like it should
	be, so we proceed to connect() in that case, wasting the I/O
	threadpool thread until connect succeedes. Fixes bug #75436.

2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: fix typo when setting file descriptor states.

2005-11-28  Raja R Harinath  <rharinath@novell.com>

	* class-internals.h (MonoGenericContainer.is_signature): Remove.	
	* metadata.c (mono_metadata_parse_method_signature_full): Don't
	create a temporary signature container.
	(mono_metadata_parse_generic_param): Update to changes.
	(mono_type_create_from_typespec_full): Update to changes.
	* loader.c (method_from_memberref): Don't use a
	MonoGenericContainer while parsing a memberref signature.
	(method_from_methodspec): Remove dead-store of the 'container'
	variable.  It's overwritten before use.

	* metadata.c (mono_type_create_from_typespec_full): Make debugging
	checks tighter.
	(mono_metadata_parse_generic_param): Likewise.
	* loader.c (find_method_in_class): Does not need a
	MonoGenericContainer.  Use 'mono_method_signature' rather than
	'mono_method_signature_full'.
	(find_method, mono_get_method_constrained, method_from_memberref):
	Update to changes.

	* metadata.c (mono_type_create_from_typespec_full): Ensure that
	owner-less generic-parameters are never evicted from the typespec
	cache.

	* loader.c (method_from_memberref): Don't use the current context
	when parsing signatures.
	(method_from_methodspec, mono_get_method_from_token): Update to changes.

	* metadata.c (do_mono_metadata_parse_generic_class): Avoid
	side-effects in g_assert.
	* loader.c (mono_get_method_from_token): Resolve klass earlier so
	that we don't potentially lose information.

2005-11-26  Dick Porter  <dick@ximian.com>

	* icall.c:
	* threads.c: icalls to implement basic (ie, not named)
	System.Threading.Semaphore.

2005-11-24  Dick Porter  <dick@ximian.com>

	* process.c
	(ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
	Use GetProcessId() if it's available.

2005-11-23  Zoltan Varga  <vargaz@gmail.com>

	* icall.c threads-types.h threads.c: Add Exchange<T> icall.

2005-11-23  Raja R Harinath  <rharinath@novell.com>
	    Ankit Jain  <jankit@novell.com>

	* loader.c (mono_get_method_from_token): Initialize 'method' field
	of all generic parameters before parsing the signature.  Remove
	code that "fixed"-up MVAR references.

2005-11-23  Ankit Jain  <jankit@novell.com>

	* metadata.c (mono_metadata_has_generic_params):
	(mono_metadata_load_generic_param_constraints):
	(mono_metadata_load_generic_params): Move duplicate code ...
	(mono_metadata_get_generic_param_row): ... here. Returns the
	first row-id in GenericParam table for a given owner (token).
	* metadata-internals.h (mono_metadata_get_generic_param_row): Add
	prototype.

2005-11-23  Raja R Harinath  <rharinath@novell.com>
	    Ankit Jain  <jankit@novell.com>

	* metadata.c (mono_metadata_class_equal): Pass signature_only when
	comparing VARs too.
	* icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
	type->data.generic_param only if the type is an MVAR.
	(ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
	leak owner-less VARs and MVARs into managed space.

2005-11-21  Martin Baulig  <martin@ximian.com>

	* class-internals.h
	(MonoMethod): Moved the `generic_container' here from
	`MonoMethodNormal' since we now also need it for
	`MonoMethodPInvoke';
	(MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
	(MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
	an union containing both `MonoMethodNormal' and
	`MonoMethodPInvoke'.

	* loader.c
	(mono_get_method_from_token): Allow implementing generic methods
	as interncalls.

	* threads.c
	(ves_icall_System_Threading_Interlocked_CompareExchange_T): New
	icall.

2005-11-17  Dick Porter  <dick@ximian.com>

	* icall.c: 
	* process.h: 
	* process.c: Split the Process Start_internal icall into
	ShellExecuteEx_internal and CreateProcess_internal, which are
	called depending on whether UseShellExecute is true.  Fixes bug
	76670.

	* appdomain.c (MONO_CORLIB_VERSION): Incremented

2005-11-17  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
	'msize' parameters, use the information in 'mspec' instead.
	(emit_object_to_ptr_conv): Ditto.

	* marshal.c (emit_struct_conv): Handle explicit layout structs with
	fields out of order. Fixes #76733.

2005-11-17  Ankit Jain  <jankit@novell.com>

	* metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.

2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>

	* icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
	  bug #76575.

2005-11-16  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_compute_gc_descriptor): Disable typed allocation
	for types with non-auto layout. Fixes #76717.

2005-11-16  Ankit Jain  <jankit@novell.com>

	* class.c (my_mono_class_from_generic_parameter): param->owner can be null.
	* metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
	if generic_context is null.
	  (mono_metadata_generic_param_equal): param->owner can be null.
	  (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
	null.

2005-11-16  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (create_dynamic_mono_image): Set md_version_minor to
	the correct value.

2005-11-15  Martin Baulig  <martin@ximian.com>

	* object.c (set_value): Use mono_class_from_mono_type() instead of
	the hack for generic instances; fixes #76136.

2005-11-15  Zoltan Varga  <vargaz@gmail.com>

	* metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
	fields.

	* image.c (load_metadata_ptrs): Initialize the new fields.

	* reflection.c (create_dynamic_mono_image): Ditto.

	* reflection.c (build_compressed_metadata): Use the new fields.

	* icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
	icall.

	* icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
	icall.
	
2005-11-15  Ankit Jain  <jankit@novell.com>
	    Raja R Harinath  <harinath@gmail.com>

	* class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
	* metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
	new per-generic_container cache if the cached MonoType's context matches
	the current context.
	  (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
	to the expected context.
	  (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.

2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* appdomain.c: Update MONO_CORLIB_VERSION to 42, since
	we changed the signature of an icall.
	* icall.c: Modify to mono_double_ParseImpl return true/false 
	depending on the success, instead of throwing the exception. This will
	help us in Double.TryParse methods.
	
2005-11-14  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_object): Throw an exception when
	marshalling 'object' instead of crashing. Fixes #76696.

2005-11-11  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h: Add prototype for mono_type_get_full_name ().

2005-11-11  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_manage): Make sure the main thread has
	abandoned all its mutexes when cleaning up.  Fixes bug 74680.

2005-11-11  Zoltan Varga  <vargaz@gmail.com>

	* loader.c (mono_loader_set_error_type_load): Log a warning to the
	console about the missing type.
	(mono_loader_set_error_method_load): Ditto.

2005-11-09  Miguel de Icaza  <miguel@novell.com>

	* mono-config.c (mono_get_config_dir): Set the system defaults if
	none is specified.

	* assembly.c (mono_set_dirs): New API entry point to set the
	assembly and the config directory in one call

2005-11-09  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
	the ftnptr was created from a delegate in a domain other than the
	current domain. Fixes #75377.

	* exception.h exception.c: Add mono_get_exception_not_supported ().

2005-11-08  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.

2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>

	* security-manager.h: Added definitions to deal with strongname key 
	pairs bigger (and smaller) than 1024 bits.
	* reflection.c: Remove hardcoded strongname size (128 bytes) and 
	adjust wrt the public key length being used.

2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>

	* marshal.c, icall.c : reverted sig->pinvoke changes which broke
	  Windows build (r51396-51397).

2005-11-03  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_setup_vtable_general): Also add generic
	methods to the vtable; fixes #76581.

2005-11-01  Miguel de Icaza  <miguel@novell.com>

	* string-icalls.c (ves_icall_System_String_ctor_encoding): Make
	sure that we lookup GetString method from the System.Text.Encoding
	class, not the derived class or we get an empty method.

	Fixed class #76612.

2005-10-25  Miguel de Icaza  <miguel@novell.com>

	* assembly.c (mono_assemblies_init): Do not set the Mono root dir
	if it has been previously set (embedders). 

	Make mono_set_rootdir available also on Unix.

005-10-24  Robert Jordan  <robertj@gmx.net>

	* assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.

2005-10-30  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
	only calls which are made to native code use this flag.

	* icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.

2005-10-29  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
	Add support for FieldBuilders.

2005-10-29  Martin Baulig  <martin@ximian.com>

	* mono-debug.c
	(mono_debug_using_mono_debugger): New public method; returns
	whether we're running inside the debugger.

2005-10-27  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (mono_reflection_get_custom_attrs_info): Add support
	for Method/Constructor/FieldBuilders.

2005-10-26  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c (module_add_cattrs): Save custom attributes for global methods
	and fields as well.

2005-10-26  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(MonoDebuggerMetadataInfo): Added `klass_parent_offset'.

2005-10-24  Raja R Harinath  <harinath@gmail.com>

	* icall.c (base64_to_byte_array): Don't pass an out-of-range
	integer to isspace.

2005-10-21  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
	when passing valuetypes byref. Fixes #76502.

2005-10-19  Jackson Harper  <jackson@ximian.com>

	* profiler.c: Don't put a . in front of types that are not in a
	namespace.

2005-10-18  Zoltan Varga  <vargaz@gmail.com>

	* icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.

2005-10-15  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
	#76436.
	(mono_marshal_get_ldflda_wrapper): Fix a warning.

2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* assembly.c metadata-internals.h icall.c: Define an additional
	parameter for mono_assembly_name_parse_full, so we can avoid creating
	S.R.AssemblyName.Version when no version info wasn't passed.
	
2005-10-09  Miguel de Icaza  <miguel@novell.com>

	* class.c (mono_type_get_full_name): Reimplement method that was
	removed. 

	* image.c: Some docs

2005-10-10  Zoltan Varga  <vargaz@gmail.com>

	* profiler.c (output_newobj_profile): Fix printing of Total memory
	on x86.

2005-10-08  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.c: Add support for allocations > 2GB. Fixes #74886.

2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>

	* threads.c: remove debug output.

2005-10-08  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (mono_thread_manage): Fix crashes if more than 64
	threads need to be aborted. Hopefully fixes #75899.

	* assembly.c (mono_stringify_assembly_name): New helper function.

	* class.c: Use mono_stringify_assembly_name instead of the similar
	static function.

	* assembly.h assembly.c: Add support for calling a postload search 
	hook if an assembly cannot be loaded.

	* appdomain.c: Register new search hooks which call the AssemblyResolve
	events in AppDomain. Fixes #75231

2005-10-07  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_add_method): Create a wrapper entry for
	methods without debug info.

2005-10-07  Zoltan Varga  <vargaz@gmail.com>

	* class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
	wrappers.

2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.c: now that we return symlinks, use lstat and, when the file
	is a symbolic link, stat, to get the file attributes. Also avoid the
	conversion to/from utf16/external.

2005-10-06  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_layout_fields): Compute klass->has_references
	correctly if an embedded valuetype is not yet initialized. Fixes
	#76331.

2005-10-04  Martin Baulig  <martin@ximian.com>

	* metadata.c
	(mono_metadata_load_generic_param_constraints): New public
	function; splitted the constraints loading out from
	mono_metadata_load_generic_params().

	* class.c (mono_class_create_from_typedef): Call
	mono_metadata_load_generic_param_constraints() after setting up
	the type and creating our parent; fixes #75329.

2005-10-04  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
	non-dynamic parent classes.

2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>

	* file-io.c : win32 build fix (ETXTBSY seems not found).

2005-10-04  Martin Baulig  <martin@ximian.com>

	* reflection.c
	(mono_image_get_methodspec_token): Make the cache actually work;
	fixes #75974.

2005-10-04  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_name_from_token): Removed the unneccessary
	`MonoGenericContext *' argument.

2005-10-04  Martin Baulig  <martin@ximian.com>

	* loader.c
	(method_from_methodspec): Make the caching work again; fixes the
	performance regression from #76262.

2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.c:
	* file-io.h:
	* icall.c: replace FindFirst/FindNext/FindClose calls with a new
	GetFileSystemEntries that performs the same work but without going
	into io-layer, locking, etc.

2005-09-30  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
	ThreadState_Stopped as well. Fixes #76047.

2005-09-29  Martin Baulig  <martin@ximian.com>

	* class.c
	(inflate_generic_context): If the new context has a `gmethod', set
	its `container' that that gmethod's `container'.

	* metadata.c
	(mono_metadata_parse_generic_param): Simplify things;
	`generic_container = generic_context->container;' is just fine.

	* loader.c (method_from_methodspec): Code cleanups.

Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* decimal.c: fix warning (and let gcc generate correct
	code on ARM with optimizations).

2005-09-28  Martin Baulig  <martin@ximian.com>

	* loader.c
	(method_from_memberref): Added `MonoGenericContext *class_context'
	argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
	(method_from_methodspec): If we're a memberref, use the enclosing
	context when parsing its parent.  Fixes #76262; see gtest-206.cs.

2005-09-28  Martin Baulig  <martin@ximian.com>

	* object.c (mono_runtime_invoke_array): Added support for
	MONO_TYPE_GENERICINST; fixes #75917.

2005-09-27  Martin Baulig  <martin@ximian.com>

	* reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
	`k->byval_arg.type' to determine the actual type.

	* loader.c (method_from_methodspec): Removed some hacks.

2005-09-27  Ben Maurer  <bmaurer@ximian.com>

	* class-internals.h (mono_field_is_deleted): Do the test for
	rtspecialname before we check the actual name of the field. This
	prevents us from dereferencing a pointer into the string table,
	saving us from accessing a few pages

	* *.c: Replace the use of {Enter,Leave}CriticalSection with
	macros. This will allow a deadlock debugger to easily be plugged
	in.

2005-09-27  Martin Baulig  <martin@ximian.com>

	* loader.c (method_from_methodspec): Create a "signature"
	MonoGenericContainer and use mono_get_method_full().  Fixes #75584.

2005-09-27  Martin Baulig  <martin@ximian.com>

	* class.c
	(inflate_generic_class): Correctly set the new context's
	container.

	* loader.c
	(find_method, find_method_in_class): Take a `MonoGenericContainer *'
	instead of a `MonoGenericContext *'.
	(mono_method_signature_full): Take a `MonoGenericContainer *'
	instead of a `MonoGenericContext *'.

	* metadata.c
	(mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
	instead of a `MonoGenericContext *'.
	(mono_metadata_parse_method_signature_full): Likewise.

2005-09-26  Martin Baulig  <martin@ximian.com>

	* class.c
	(mono_class_from_generic_parameter): Set `klass->generic_container'
	(mono_class_from_generic_parameter): Likewise.
	(mono_bounded_array_class_get): We inherit the generic container
	from the element class.

	* loader.c
	(find_method, find_method_in_class): Take a `MonoGenericContext *'
	argument rather than computing it here.
	(method_from_memberref): Correctly set the generic context before
	parsing the signature.  Fixes #75681.

2005-09-26  Zoltan Varga  <vargaz@gmail.com>

	* object.c (mono_class_has_special_static_fields): Fix warnings.

2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* assembly.c: Add parse_public_key function, to
	par the public keys. Also added mono_assembly_name_parse_full,
	to define it the parsed key should be freed or not.
	* icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
	to parse a long format assembly name.
	* metadata-internals.h: Keep mono_assembly_name_parse_full as
	private, since calling it to preserve the key requires
	freeing it manually.
	
2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>

	* locales.c : removed HAVE_ICU part.

2005-09-24  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_class_create_runtime_vtable): Avoid calling 
	field_is_special_static if the klass has no special static fields.

	* class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
	(MonoCachedClassInfo): Likewise.

	* object.c (mono_class_has_special_static_fields): New helper function.

2005-09-23  Zoltan Varga  <vargaz@gmail.com>

	* class.c (mono_class_create_from_typedef): Don't call 
	interfaces_from_typedef_full for enums.
	(mono_class_create_from_typedef): Compute the base types of enums directly
	without calling mono_class_setup_fields ().
	(mono_class_find_enum_basetype): New helper function.

	* reflection.c (mono_image_build_metadata): Emit type names+namespaces at
	one place inside the string heap.
	
Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* class.c: locking fixes, code cleanups, some docs added.
	Allocate some data structures in the image mempool.

2005-09-23  Zoltan Varga  <vargaz@gmail.com>

	* rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
	the example code.
	
Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, class.c, reflection.c: reduce memory taken by
	MonoClass.

Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h, loader.h: documentation updates, code and
	API cleanups.

2005-09-23  Zoltan Varga  <vargaz@gmail.com>

	* rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
	the example code.

	* rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
	page faults caused by the runtime while reading metadata.

2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: the field names were changed 3 months ago and no one
	realized until bug #76077 got filed!

2005-09-20  Martin Baulig  <martin@ximian.com>

	* icall.c (assembly_icalls): Removed some unused debugger icalls.

2005-09-20  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_add_type): Ignore array types and don't
	write the rank into the class entry.

2005-09-20  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.

2005-09-19  Zoltan Varga  <vargaz@gmail.com>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* icall.c (custom_attrs_defined_internal): New icall.

	* reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
	function.
	(mono_custom_attrs_construct_by_type): New helper function.

2005-09-17  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
	terminate the resulting string. Fixes #76123.

2005-09-16  Martin Baulig  <martin@ximian.com>

	* mono-debug.c
	(mono_debug_add_method): Ignore inflated methods for the moment.

2005-09-14  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.

2005-09-13  Zoltan Varga  <vargaz@gmail.com>

	* metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
	return a success/failure indication.
	(mono_metadata_interfaces_from_typedef_full): Ditto.
	(get_constraints): Ditto.

2005-09-12  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_marshal_array): Fix handling of null arrays.
	
	* marshal.c (emit_marshal_array): Add support for returning string
	arrays from delegates. Fixes #76063.

	* marshal.c: Use the emit_ldloc/stloc macros where possible.

2005-09-11  Zoltan Varga  <vargaz@gmail.com>

	* threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
	icall.

2005-09-09  Zoltan Varga  <vargaz@gmail.com>

	* reflection.c icall.c: Fix after mono_get_exception_type_load
	signature change.

	* assembly.c (mono_assembly_get_assemblyref): New helper function.
	(mono_assembly_load_reference): Use the new helper.

	* class-internals.h (MonoLoaderError): New structure containing 
	information about type loading errors.

	* class-internals.h loader.c: Add APIs to store per-thread loader
	error information.

	* loader.c class.c: Set the loader error if needed.

	* exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.

Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>

	* decimal.c: fixed to handle the broken ARM fp format.

Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>

	* icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
	broken.

2005-09-06  Martin Baulig  <martin@ximian.com>

	* domain.c (supported_runtimes): Added v2.0.50727.

Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* culture-info.h: reduce the size of some structures.

2005-09-05  Martin Baulig  <martin@ximian.com>

	Reflect latest API changes in the August CTP.

	* icall.c
	("Type.BindGenericParameters"): Renamed to "MakeGenericType".
	("MonoType.HasGenericArguments"): Removed.
	("MonoMethod.BindGenericParameters"): Renamed to
	"MakeGenericMethod".
	("MethodBuilder.BindGenericParameters"): Renamed to
	"MakeGenericMethod".	

2005-09-05  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Moved the debugger icalls into icall.c.

2005-09-05  Martin Baulig  <martin@ximian.com>

	Applying a patch from Michal Moskal <malekith@nemerle.org>.

	* icall.c (ves_icall_Type_get_IsGenericType): Return true also if
	generic_container is non-NULL.

2005-09-05  Martin Baulig  <martin@ximian.com>

	Applying a patch from Michal Moskal <malekith@nemerle.org>.

	* object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.

2005-08-29  Michal Moskal  <malekith@nemerle.org>

	* reflection.c (encode_locals,
	mono_reflection_sighelper_get_signature_local): Increase buffer sizes
	for large generic types.

2005-09-05  Martin Baulig  <martin@ximian.com>

	Applying a patch from Michal Moskal <malekith@nemerle.org>.

	* class.c (mono_dup_array_type): New public method.
	(mono_metadata_signature_deep_dup): New public method.
	(dup_type): Correctly duplicate array and function types.

2005-09-05  Martin Baulig  <martin@ximian.com>

	Applying a patch from Michal Moskal <malekith@nemerle.org>.

	* reflection.c (get_default_param_value_blobs): Handle generic types
	and generic methods.

2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>

	* class.c: Fixed error reporting (method/class were inversed) for 
	inheritance demands.
	* security-manager.c|h: Added the AppDomain when calling the managed
	System.Security.SecurityManager.InheritanceDemand method.

2005-09-01  Raja R Harinath  <rharinath@novell.com>

	* reflection.c (encode_marshal_blob): 'marshaltype' and
	'marshaltyperef' are alternate sources for the custom marshaler
	name.

Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* class.c: fix creation of array classes with rank == 1
	(patch by Ankit Jain <jankit@novell.com>).

Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: fix check for creating the bound data for arrays vs
	szarrays.

2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c: configuration file name is now based on the executable name,
	not the image name. Fixes bug #75931.

2005-08-29  Zoltan Varga  <vargaz@gmail.com>

	* marshal.c (emit_thread_interrupt_checkpoint_call): Load the
	flag using LDIND_U4 since it leads to smaller and faster code on ia64.

2005-08-25  Zoltan Varga  <vargaz@gmail.com>

	* rand.c: Use wincrypt.h instead of WinCrypt.h.

2005-08-24  Ankit Jain  <jankit@novell.com>
	    Raja R Harinath  <rharinath@novell.com>

	* class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
	  called by it recursively.
	  (mono_class_init): Remove special case in pending_init handling, since it's
	  superseded by the fix to mono_class_from_typeref.

2005-08-22  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
	BROKEN_THREAD_START stuff.

2005-08-21  Zoltan Varga  <vargaz@freemail.hu>

	* class-internals.h object.c: Add a new kind of trampoline called a delegate 
	trampoline.

	* domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
	
	* object.c (mono_delegate_ctor): Replace the original function address with
	a delegate trampoline.

2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>

	* icall.c: add boolean argument to base64_to_byte_array and 
	InternalFromBase64String to control whether a whitespace-only string
	is allowed (or should casue a FormatException to be thrown). We need
	this as the behavior has changed between MS.NET 1.x and 2.0, and we
	to match the MS behaviour in both profiles.
	* appdomain.c: Bump corlib version.

2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	This patch implements a big portion of publisher policy
	support, used to bind assembly versions and redirect
	one assembly from version A to version B.

	* assembly.c:
	New GSList loaded_assembly_bindings, for storing the cached
	assembly bindings.
	(assembly_binding_maps_name): New static function for checking if a 
	assembly binding information maps an assembly name.
	(mono_assembly_binding_info_free): New function for freeing
	assembly binding information resources.
	(get_publisher_policy_info): New static function for retrieving 
	assembly binding information from a MonoImage.
	(compare_versions): New static function for comparing an assembly
	binding information data and the version of an assembly name.
	(check_policy_versions): New static function for checking if an
	assembly binding info mapping an assembly name is valid for it.
	(mono_assembly_load_publisher_policy): New static function for
	loading the 'policy.major.minor.MyAssembly' image for an assembly
	with an assembly name 'aname'.
	(mono_assembly_bind_version): New static function for updating
	assembly redirection.
	(mono_assembly_apply_binding): New static function for applying
	assembly binding.
	(search_binding_loaded): New static function for searching 
	loaded assembly binding infos in the cache domain.
	(mono_assembly_load_full): Don't apply assembly binding for
	reflection only assemblies.

	* metadata-internals.h: Add MonoAssemblyBindingInfo,
	which contains information about assembly binding. Also
	declare signature for mono_config_parse_publisher_policy ()
	function, used to retrieve pub policy info.
	
	* mono-config.c:
	(publisher_policy_start): New static function used to parse publisher 
	policy config files.
	(publisher_policy_parser): New static MonoParseHandler containing 
	the functions used when parsing config files.
	(mono_config_parse_publisher_policy): New function for parsing
	publisher policy files.
	
2005-08-20  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_delegate_ctor): Add support for IA64 function descriptors.

	* marshal.c (mono_delegate_free_ftnptr): Ditto.

	* object.c (mono_get_addr_from_ftnptr): New helper function.

	* object.h (mono_array_addr): Fix unaligned access warnings on IA64.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

2005-08-19  Dick Porter  <dick@ximian.com>

	* threads.c, threads.h, appdomain.c, appdomain.h,
	profiler-private.h, monitor.c, object.c, object-internals.h,
	profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
	store the thread ID, so it can hold a 64 bit value if needed.

2005-08-19  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_create_dynamic_method): Store the
	handle class into the method references as well so ldtoken works in
	dynamic methods.

	* icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
	types.

2005-08-19  Ankit Jain <jankit@novell.com>

	Fix #75847.
	* marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
	  here rather than using the method signature of a arbitrary function
	  named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
	  two arguments.
	  Hack done with Harinath.

2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: disable printing stack traces when we get a exception
	in a threadpool thread. I need to do more testing to figure out which
	cases actually print this. Fixes bug #75828.

2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: there might be ignored whitespace after the last '='. This
	fixes length computation and bug #75840.

2005-08-18  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_load_full): Consider .exe extension as
	well. Fixes #75809.

	* reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
	#75784.
	
	* reflection.c (create_custom_attr_data): Ditto.

2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>

	* locales.c, culture-info.h : removed RegionLCIDMap.
	* culture-info-tables.h : regenerated.

2005-08-16  Martin Baulig  <martin@ximian.com>

	* class.c (mono_type_get_name_recurse): Small fix.

2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>

	* locales.c : indentation fixie.

2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>

	* object-internals.h,
	  locales.h,
	  locales.c,
	  culture-info.h,
	  icall.c : added RegionInfo table support.
	* culture-info-table.h : regenerated for region support.

2005-08-14  Kamil Skalski  <nazgul@nemerle.org>

	* reflection.c (resolve_object): handle all kinds of MonoMethod
	including generic ones

2005-08-12  Ankit Jain <jankit@novell.com>

	* get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
	  (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 

2005-09-12  Lluis Sanchez  <lluis@ximian.com>

	* process.c: Don't close a thread handle when it's NULL. This is a
	workaround for bug #75733.

2005-08-11  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.

2005-08-10  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_get_IsGenericType): New icall.

2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: if a work item in the thread pool has a callback that
	catches a exception, don't propagate it after invoking the callback.
	Fixes bug #75336.

2005-08-08  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.

	* class-internals.h (MonoCachedClassInfo): Add some new fields.

	* class.c (mono_class_init): Load field info lazily in the AOT case.	

	* reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.

2005-08-03  Ankit Jain  <jankit@novell.com>

	Fix #75683.
	* loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
	  PInvoke calling convention is 0.

2005-08-02  Zoltan Varga  <vargaz@freemail.hu>

	* socket-io.c (convert_sockopt_level_and_name): Applied patch from 
	Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.

Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
	to handle threads not started by the GC (patch by Michael Meeks
	<michael.meeks@novell.com>).

2005-07-31  Kamil Skalski  <nazgul@omega.pl>

	* reflection.c: Make buffer used in emitting types larger for some
	big generic types (patch by Michal Moskal).

2005-07-30  Zoltan Varga  <vargaz@freemail.hu>

	* mono-debug.c: Fix some (not all) alignment problems.

2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
	Invoke mono_image_load_from_data_full passing the refonly
	parameter.

	* assembly.c
	(mono_assembly_open_from_bundle): Add the refonly argument, 
	in order to pass it to other methods it calls to.
	(do_mono_assembly_open): Add the refonly argument, in order 
	to pass it to other methods it calls to.
	(mono_assembly_open_full): Invoke do_mono_assembly_open passing
	the refonly parameter to it.

	* image.c: Add loaded_images_refonly_hash and
	loaded_images_refonly_guid_hash to cache the reflection
	only loaded images.
	(mono_images_init): Initialize the hash tables used for
	caching the reflection only images.
	(load_modules): Invoke mono_image_open_full passing the refonly
	parameter to load the modules the correct way.
	(build_guid_table): Add the refonly argument, to re-build the 
	correct hash table.
	(do_mono_image_open): Added the refonly argument, in order to
	define it for the loaded image.
	(mono_image_loaded_full): New function, which receives an
	additional parameter to look for the image in the refonly or
	non-refonly section.
	(mono_image_loaded): Updated, using mono_image_loaded_full.
	(mono_image_loaded_by_guid_full): The same case that happens
	with mono_image_loaded_full.
	(mono_image_loaded_by_guid): Likewise.
	(register_image): Use the ref_only variable inside MonoImage
	to decide in which hash table store the current image.
	(mono_image_open_from_data_full): Rename
	mono_image_open_from_data to mono_image_open_from_data_full,
	adding the refonly argument, to define the ref_only variable 
	inside MonoImage.
	(mono_image_open_from_data): Return 
	mono_image_open_from_data_full.
	(mono_image_open_full): Rename mono_image_open to
	mono_image_open_full, receiving the new refonly argument,
	to pass it to inner methods.
	(mono_pe_file_open): Update this function, to open
	a MonoImage as a non-refonly image.
	(mono_image_close): Use the refonly variable inside
	MonoImage to remove the image from the correct caches.

	* image.h: Add the signatures of mono_image_open_full,
	mono_image_open_from_data_full, mono_image_loaded_full,
	mono_image_loaded_by_guid_full.

	* metadata-internals.h: Add the ref_only field to 
	MonoImage.
	
2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
	Fix the last behavior, which used to load the assemblies and
	extract MonoReflectionAssemblyName information, instead of
	extract it from the metadata tables. Needed for Reflection
	Only assemblies.
	
2005-07-29  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
	not initialized.

	* mono-debug.c
	(mono_debug_address_from_il_offset): Check whether we have
	debugging support before attempting to take the lock.
	(mono_debug_source_location_from_address): Likewise.
	(mono_debug_source_location_from_il_offset): Likewise.
	(mono_debug_il_offset_from_address): Likewise.
	(mono_debug_address_from_il_offset): Likewise.

2005-07-29  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_from_name_case): Add support for dynamic images.
	Fixes #75650.

	* object.c (mono_class_compute_gc_descriptor): Add a workaround
	for #75479.

2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
	
	* reflection.c (mono_method_get_object): Fix warning.

2005-07-28  Martin Baulig  <martin@ximian.com>

	* mono-debug.c
	(mono_debug_add_wrapper): Also write the wrapper type.

2005-07-28  Zoltan Varga  <vargaz@freemail.hu>

	* class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
	
	* class.c (mono_class_init): Avoid reading nested classes if the AOT
	data indicates the class has none.

2005-07-26  Ben Maurer  <bmaurer@ximian.com>

	* mono-debug.c, debug-mono-symfile.c: Replace the use of the
	loader lock with the debugger lock. Prevents deadlocks for beagle.

	Beagle can now run on an smp box for a weekend without any
	issues. Woohoo!

2005-07-26  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_bounded_array_class_get): Avoid crash if eclass is
	in a module. Fixes #75629.

2005-07-26  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_add_wrapper): New static method.
	(mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
	interncall or a wrapper.

	* mono-debug.h (MonoDebugWrapperData): New public typedef.
	(MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
	(MONO_DEBUGGER_VERSION): Bump to 51.

	* mono-debug-debugger.c
	(mono_debugger_add_type): Removed this empty function.
	(mono_debugger_add_method): Likewise.

2005-07-22  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
	before accessing method->slot.

2005-07-21  Jb Evain  <jbevain@gmail.com>

	* reflection.c (method_encode_clauses/class): Handle filters clauses.
	Fixes #75010.

2005-07-21  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
	#75587.

2005-07-20  Zoltan Varga  <vargaz@freemail.hu>

	* image.h image.c: Add mono_image_get_guid () API function.

2005-07-19  Ben Maurer  <bmaurer@ximian.com>

	There were issues when multiple threads tried to load
	assemblies. A deadlock was created between assemblies_mutex and
	mono_domain_assemblies_lock. This fixes the issue by making the
	assembly ref counting be lock free. See bug 75586.
	
	* image.c (mono_image_close): The add ref function here was using
	Interlocked operations while the unref was using a mutex and a
	--. I don't think this was ever a bug that would be exposed in a
	non-pendantic way (ie, by an embedder doing a ref on one thread
	and an unref on another), but for the sake of correctness, this is
	now Interlocked.

	* assembly.c (mono_assembly_addref): Use InterlockedIncrement
	(mono_assembly_load_reference): Call mono_assembly_addref rather
	than touching the refcount ourselves.
	(mono_assembly_close): Use InterlockedDecrement to unref the
	assembly. Don't acquire the lock unless it is actually needed.

2005-07-12  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_layout_fields): Fix calculation of has_references
	for generic types.

2005-07-12  Martin Baulig  <martin@ximian.com>

	Applying a patch from Michal Moskal <malekith@nemerle.org>.

	* metadata.c
	(mono_type_hash): Provide better hashing for generic instances.
	(mono_generic_inst_hash): Improve hashing.
	(mono_generic_class_hash): Likewise.

	* reflection.c (mymono_metadata_type_hash): Improve hashing for
	generic instances.

2005-07-12  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_create_runtime_class): Remove the
	hack for generic type definitions and non-`Run' assemblies.
	(mono_reflection_bind_generic_parameters): Also use
	`klass->wastypebuilder' to check for TypeBuilders.

2005-07-12  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_layout_fields): Fix calculation of has_references
	for generic types.

	* class.c (inflate_generic_class): Fix a leak.
	(mono_class_init): Fix calculation of gchimpl and has_finalize fields
	for generic types.

2005-07-11  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
	on error.

2005-07-11  Martin Baulig  <martin@ximian.com>

	* loader.c (find_method): Also lookup in
	`mono_defaults.object_class' if we're an interfaces; fixes #75460.

2005-07-07  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (mono_domain_unload): Don't free the error message
	before passing it to mono_get_exception_...

	* reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
	
Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* threads.c: try to better guess an available RT signal (bug #75387).

2005-07-07  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
	and CACHE_OBJECT.

2005-07-07  Martin Baulig  <martin@ximian.com>

	* class.c (mono_type_get_name_full): Return NULL for
	MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
	fixes #75408.

2005-07-07  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
	exit the appdomain as well being aborted.

	* threadpool.c: Create all threadpool threads inside the root appdomain, and
	change back to the root domain after calling managed code. This enables
	appdomains using threadpools to be unloaded.

2005-07-07  Martin Baulig  <martin@ximian.com>

	* class-internals.h
	(MonoInflatedGenericClass): Moved the `MonoType *parent' field
	into `MonoDynamicGenericClass' since we only need it for dynamic
	types.

	* reflection.c (mono_class_bind_generic_parameters): We don't need
	to compute the `parent' here.

2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : regenerated.

2005-07-06  Martin Baulig  <martin@ximian.com>

	* icall.c
	(ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.

	* object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.

2005-07-06  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
	we're doing a signature-only comparision; fixes #74945.

2005-07-06  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoGenericClass): Moved some things out into
	a new `MonoInflatedGenericClass' type.	
	(MonoInflatedGenericClass): New type; the `klass' of a
	`MonoGenericClass' is now computed lazyly in
	mono_get_inflated_generic_class().	

	* class.c (mono_get_inflated_generic_class): New public function.
	(mono_class_inflate_generic_method): Removed the unused
	`MonoClass *' argument.
	(setup_generic_vtable): Don't call mono_get_inflated_method() on
	all the methods.
	(mono_class_create_generic): Make this static and merge it with
	mono_class_create_generic_2(); we're now called automatically from
	mono_get_inflated_generic_class().

	* loader.c (mono_method_signature): Call
	mono_get_inflated_method() here.

2005-07-06  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
	type of fields with RVA.

	* class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
	for this pseudo class.
	(my_mono_class_from_generic_parameter): Likewise.
	(mono_class_init): Allow interfaces to have cctors.

2005-07-05  Zoltan Varga  <vargaz@freemail.hu>

	* domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
	lazily for AOT methods.

2005-07-05  Martin Baulig  <martin@ximian.com>

	* loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
	returns FALSE for a successful match, not TRUE.

2005-07-05  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_method_get_index): Optimize this a bit.

2005-07-04  Martin Baulig  <martin@ximian.com>

	* class.c
	(class_compute_field_layout): Move the check for generic type
	definitions into mono_class_layout_fields().  Fixes #74684.
	(mono_class_from_generic_parameter): Correctly compute
	`klass->parent'; fixes #75457.

	* reflection.c (register_assembly, register_module): Make sure
	`domain->rejobject_hash' is already created.

2005-07-02  Martin Baulig  <martin@ximian.com>

	* class-internals.h
	(MonoGenericClass): Move `count_ifaces' and `ifaces' into
	`MonoDynamicGenericClass'.	

2005-07-01  Lluis Sanchez  <lluis@ximian.com>

	* icall.c: In ves_icall_InternalExecute() dont't assert if the value
	returned by a field getter is null, since null is a valid value.

2005-07-01  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_generic_class_initialize): Update
	the `dgclass->fields [i].parent' to the correct class.
	(mono_image_get_fieldref_token): Use the declaring type, not the
	reflected type.

2005-07-01  Martin Baulig  <martin@ximian.com>

	* loader.c (find_method): Also look in the interfaces; fixes #75429.

2005-06-30  Ben Maurer  <bmaurer@ximian.com>

	* threads.c (thread_cleanup): assert that thread != NULL
	(wait_for_tids_or_state_change): We were using the wrong variable
	when accessing wait->threads. `i' was always out of the bounds of
	the array.

2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* loader.c: map user32 and kernel32 to libMonoSupportW

2005-06-28  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (unload_thread_main): Mark this as WINAPI.

2005-06-28  Martin Baulig  <martin@ximian.com>

	* loader.c (method_from_methodspec): Fix #75334.

2005-06-28  Martin Baulig  <martin@ximian.com>

	Fix #74953 - Arrays now implement the generic IList<T> interface
	on the 2.0 platform.

	* class-internals.h (MonoDefaults): Added `generic_array_class'.

	* reflection.c (mono_class_bind_generic_parameters): New public
	function; similar to mono_reflection_bind_generic_parameters(),
	but operates on a `MonoType *' and not on a `MonoReflectionType *'.

	* domain.c (mono_init_internal): Try to initialize.
	`mono_defaults.generic_array_class' here; this'll only succeed if
	we're using the 2.0 corlib.

	* icall.c
	(ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
	interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
	(mono_lookup_internal_call): Added support for nested classes.

	* loader.c
	(mono_get_method_from_token): Set `result->signature->pinvoke' if
	we're an interncall and have generic arguments.

	* class.c
	(mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
	(mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
	instance of System.Array.InternalArray<T> for arrays, so they
	implement the generic IList<T> interface.

2005-06-27  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
	(chastamar@yahoo.com). Fixes #75374.	

2005-06-27  Atsushi Enomoto <atsushi@ximian.com>

	* culture-info-table.h: regenerated.

2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: handle spaces correctly for base64 strings.

2005-06-26  Ben Maurer  <bmaurer@ximian.com>

	* *.c: Kill some warnings.

2005-06-23  Duncan Mak  <duncan@novell.com>

	* socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
	that this builds on Solaris 10 (x86).

2005-06-23  Martin Baulig  <martin@ximian.com>

	* class.c
	(mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
	generic type definitions.

2005-06-23  Martin Baulig  <martin@ximian.com>

	Fix #75331.

	* metadata.c (mono_class_get_overrides): Renamed to
	mono_class_get_overrides_full() and added a `MonoGenericContext *'.
	(method_from_method_def_or_ref): Added `MonoGenericContext *' and
	pass it to mono_get_method_full().

2005-06-22  Ben Maurer  <bmaurer@ximian.com>

	* reflection.c (mono_reflection_create_runtime_class): take the
	mono_domain_lock in this method. Prevents deadlocks

2005-06-22  Martin Baulig  <martin@ximian.com>

	* loader.c (method_from_methodspec): Fix #75330.

2005-06-22  Martin Baulig  <martin@ximian.com>

	* reflection.c (type_get_qualified_name): Use
	mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
	(_mono_reflection_get_type_from_info): Added `MonoImage *image'
	argument; use it if we don't have an assembly name.

2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>

	* object.c: In mono_message_init, set "copy out" flag for in
	parameters with the [Out] flag.

2005-06-21  Martin Baulig  <martin@ximian.com>

	* class.c
	(mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
	and MONO_TYPE_PTR.

2005-06-21  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): Don't initialize `class->fields' for
	generic instances since they're initialized again in
	compute_field_layout().	
	(compute_field_layout): Set the field's `generic_info' here; fix
	#75320.	

2005-06-21  Martin Baulig  <martin@ximian.com>

	* class-internals.h
	(MonoGenericMethod): Added `MonoGenericClass *generic_class'.

	* metadata.c (mono_metadata_generic_method_equal): Also
	distinguish the `generic_class'; fixes #75334.

2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* domain.c:
	* appdomain.c:
	* domain-internals.h:
	* reflection.c: 'domain_assemblies' field is now protected by its own
	lock. Don't call into managed code to run the AssemblyLoad event if we
	now there are no registered delegates for it.

2005-06-20  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_is_assignable_from): Use a custom version of
	mono_class_has_parent() to make things work for generic instances;
	fix #75300.

2005-06-20  Martin Baulig  <martin@ximian.com>

	* loader.c (method_from_methodspec): Apply a patch from
	Kamil Skalski <nazgul@nemerle.org> to fix #75296.

2005-06-20  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): Reverted Zoltan's last change; it
	breaks generics.

2005-06-19  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (wait_for_tids_or_state_change): Add missing locking.

2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: fix the index in the socket array for writable/error
	sockets. Fixes bug #75306.

2005-06-17  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_init): Allow interfaces to have static ctors.

2005-06-17  Martin Baulig  <martin@ximian.com>

	* loader.c (method_from_methodspec): Use `context->container' when
	parsing the `gmethod->inst'.

2005-06-17  Martin Baulig  <martin@ximian.com>

	* class.c (mono_type_get_name_recurse): Don't add the assembly
	name for type arguments.

2005-06-15  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_get_inflated_method_token): Encode
	correct klass; fixes #75260.

2005-06-13 Michal Moskal <malekith@nemerle.org>

	* icall.c: Make GetCorrespondingMethod/Constructor take
	MonoReflectionMethod method not MonoMethod. Removed
	MonoType.GetCorrespondingField, and make
	MonoGenericType.GetCorrespondingField take name not
	MonoClassField.

2005-06-13  Michal Moskal <malekith@nemerle.org>

        * reflection.c (field_encode_signature, encode_locals):
         Make sizes of buffers for types larger (for big generic types).
	 (create_generic_typespec,
	 mono_reflection_sighelper_get_signature_local,
	 mono_reflection_sighelper_get_signature_field):
	 Add asserts for too small buffers.

2005-06-15  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
	if our parent is not a dynamic type.

2005-06-15  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoTypeNameFormat): New enum.

	* class.c
	(mono_class_get_name_full): Renamed to mono_type_get_name_full().
	(mono_type_get_full_name): Removed.
	(mono_type_get_name_full): Take a `MonoTypeNameFormat format'
	argument instead of the boolean's.

	* icall.c (ves_icall_System_MonoType_getFullName):
	Added `gboolean assembly_qualified'.	

	* reflection.h
	(MonoTypeNameParse): Added `GPtrArray *type_arguments'.

	* reflection.c (mono_reflection_parse_type): Parse the new type
	name format.

2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: no need to convert from utf16 to utf8 and then back again
	after the call to GetLogicalDrives.

2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: frombase64. Fix problems exposed by new tests.

2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added internal calls for converting char [] and strings in
	base64 into byte [].

2005-06-10  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_generic_2): Read the nested classes
	from the metadata rather than from `gklass->nested_classes' since
	`gklass' might not be initialized yet.

2005-06-09  Duncan Mak  <duncan@novell.com>

	* *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
	all public headers. Fixes #74919.

2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>

	* domain.c: The key for proxy_vtable_hash is now a pointer
	array. Added new GHashFunc and GCompareFunc functions for this.

	* class.h: The list of interfaces in MonoRemoteClass is known in
	advance and can't grow (we create a new MonoRemoteClass if needed),
	so now the interface array can be allocated together with
	MonoRemoteClass.
	
	* object.c: Added a new method create_remote_class_key.
	Fixed mono_remote_class so it does not depend on
	mono_upgrade_remote_class.
	Removed extend_interface_array.
	Added new method clone_remote_class(), which makes a copy of a remote
	class and adds a new interface or class to it.
	mono_upgrade_remote_class() now creates a new remote class (or gets
	it from the cache) if an vtable upgrade is needed. In this way
	we make sure that other objects sharing the same remote class
	don't get the new vtable with unwanted interfaces.
	
	* object-internals.h:
	* object.h: Moved mono_upgrade_remote_class to object-internals.h.
	
	* marshal.c: Track changes in mono_upgrade_remote_class().

2005-06-08  Kamil Skalski <nazgul@nemerle.org>
	* icall.c: Add runtime methods for obtaining members of inflated
	class, which were created from supplied non-inflated members. It
	is used in internal Get{Method,Constructor,Field} methods in
	System.Type

2005-06-09  Martin Baulig  <martin@ximian.com>

	* reflection.c
	(mono_reflection_bind_generic_method_parameters): Fix #75169.

2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
	* reflection.c (mono_image_basic_init): Define
	Version in MonoDynamicAssembly. 
	
2005-06-08  Martin Baulig  <martin@ximian.com>

	Fix #75136.

	* loader.c
	(mono_method_signature_full): New public method; takes a
	`MonoGenericContext *'.
	(find_method): Use mono_method_signature_full() and pass the
	klass'es context to it.

	* class.c (mono_class_is_inflated_method): Use
	mono_method_signature_full() and pass the context to it.

Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: add proper locking in mono_remote_class_vtable(),
	fixes possible memory corruption.

2005-06-08  Michael Meeks  <michael.meeks@novell.com>

	* marshal.c (mono_remoting_marshal_init): set
	initialized after initialization.

2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>

	* locales.c : hush.

2005-06-06  Michael Meeks  <michael.meeks@novell.com>

	* object.c (extend_interface_array): fix really silly
	memory corrupting / comparison bug.

2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* reflection.c: Functions added to support the creation
	of CustomAttributeData, which includes Attribute data
	used by ReflectionOnly methods.

	* reflection.h:  mono_reflection_get_custom_attrs_data and
	 mono_custom_attrs_data_construct added (functions exposed).

	 * icall.c: Added mono_reflection_get_custom_attrs_data
	 as icall.
	
2005-06-07  Zoltan Varga  <vargaz@freemail.hu>

	* Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
	lupus's request.

2005-06-06  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.

	* reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
	dynamic DllImportAttribute.

	* icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
	dynamic DllImportAttribute.

	* Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
	Fixes #75162.

2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: avoid segfault when an unstarted thread is aborted.

2005-06-05  Kornél Pál <kornelpal@hotmail.com>

	* icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
	Returns the name and version of the runtime for reporting.

2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: bump corlib version.
	* object-internals.h: new field in MonoReflectionAssembly.

2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object-internals.h: Carlos forgot to add this field.

2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* icall.c: Added create_version to create instances
	of Version of MonoReflectionAssemblyName. This change helps
	the AssemblyName tests to keep running fine.
	
2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
  
	* object.c (mono_method_return_message_restore): A somehow less
	intrusive fix for #75138.

2005-06-03  Raja R Harinath  <rharinath@novell.com>

	* object.c (mono_method_return_message_restore): Fix computation
	of expected number of out args.

2005-06-02  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_image_get_method_info): Fix the case when the
	charset is empty.

2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 

	* object.c: Added missing null check in
	  mono_method_return_message_restore.

2005-06-02  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_image_get_method_info): Handle the case when
	dllentry is empty.

2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>

	* object.c: When creating the vtable for a proxy, take into account
	all inherited interfaces, not only the ones registered in
	iclass->interfaces. This fixs bug #74996.
	Also, in mono_method_return_message_restore, verify that the array
	of out args has the expected lengh.

2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: update the timeout in Poll when the call is interrupte.

2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: support abort/suspend in Select_internal after last
	change.

2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: remove warning.

2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	* socket-io.[ch]: Select_internal uses poll() now when available, thus
	removing the 1024 limit from select(). Runtime part of the fix for
	bug #71203.

2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: when resolving the addresses for the same
	host returned by gethostname(), get the local IPs from the interface
	list. Loopback addresses are discarded if the are interfaces up with
	non-loopback ones. Fixes bug #63265.

2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>

	* appdomain.c, verify.c, object-internals.h, reflection.c:
	bumped corlib number to 36, and added new extra_flags field
	to ReflectionMethodBuilder and friends.  Fixes #75060.

Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* gc.c: register a new weak link only if the object is non-null
	(fixes bug#75047).

2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info.h : short time pattern too.

2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info.h : expand long time pattern string length.

2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : update (more French date format; #72788).

2005-05-25  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
	the method is static. Fixes #75029.

2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>

	* reflection.c: Update the table_idx field of method builders after
	saving the module, since it can change. This is a workaround for
	bug #74914. 

2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : update (additional French date format).

2005-05-20  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_type_Equals): Revert last change.
	
	* icall.c (ves_icall_type_Equals): Turn the g_print into an assert.

	* icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.

2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>

	* class-internals.h: Added executioncontext_class field to 
	MonoDefaults structure.
	* domain.c: Cache System.Threading.ExecutionContext class in 
	mono_defaults.
	* object.c: Capture the ExecutionContext for asynchroneous calls in
	 mono_async_result_new.
	* object-internals.h: Added execution_context and original_context 
	fields to MonoAsyncResult. Added execution_context to MonoThread.
	* security-manager.c|.h: Added mono_get_context_capture_method to 
	return the capture method (if required by the security manager or by
	the framework version used).
	* threadpool.c: Apply capture (if present) ExecutionContext in 
	mono_async_invoke and revert to original context after it completes.

2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : updated (real hacky solution for zh-CHT).

2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : zh-CHT related workaround.

2005-05-12  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_custom): Add some error checking and call the
	methods in the ICustomMarshaler interface. Fixes #74875.
	
	* marshal.c (emit_marshal_array): Implement [Out] marshalling in
	native->managed wrappers.

2005-05-12  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
	here and use the loader lock.

	* mono-debug.c: Properly lock when the debugger is not attached.
	(mono_debug_init): Release the initial lock if we're not running
	in the debugger.

2005-05-12  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_custom): Pass through NULL values without
	calling the custom marshalling routines.

	* marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
	conversion in structures. Fixes #74882.

2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : zh-* cultures were missing.

2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>

	* threads.c: Added a new event background_change_event which is signaled
	when a thread changes its background mode.
	Moved here several checks previously done in managed code. The checks
	require the thread lock, and using the thread lock in managed code
	can result in deadlocks.
	Merged Start_internal and Thread_internal into a single method. Now 
	Thread_internal does all work of creating and starting a thread.
	Added icalls for setting and getting the state of the object. Moved from
	managed code to avoid locking there.
	Added wait_for_tids_or_state_change() which is called instad of
	wait_for_tids when waiting for non-backround threads to end. This method
	will return if one of the threads ends or the background_change_event
	is signaled.
	* threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
	the background mode. This method signals the background_change_event
	event.
	* icall.c:
	* threads-types.h: Added icalls for ClrState, SetState and GetState, and
	removed Start_internal.
	
2005-05-11  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
	to order of some fields to get proper alignment on 64-bit machines.

2005-05-11  Martin Baulig  <martin@ximian.com>

	* mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
	changes as they're broken and completely fuck up the debugger.

	* mono-debug.c (mono_debug_add_method): Properly unlock on error.

2005-05-10  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_generic_class_initialize): Don't
	call mono_class_setup_parent() here.

2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* metadata/socket-io.c: on windows, getsockopt/setsockopt for
	send/receive timeout use an integer in milliseconds. We were using a
	struct timeval.

2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* locales.c:
	(internal_get_cultures): reserve the first slot of the array for the
	InvariantCulture, which will be filled in managed code.

2005-05-06  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_image_fill_module_table): Initialize the
	GENERATION field as well.

2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* monitor.c: ignore calls to Monitor.Exit even if no one ever called
	Monitor.Enter on the object.

2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>

	* threads.c: Enable the wait for running threads when exiting.
	* icall.c: Suspend all threads before exiting.

2005-05-05  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_load_reference): Fix warning.

2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: changed the default number of threads per cpu. From now
	on, the default will be 20 + (5 * number of cpus) instead of 50.

2005-05-04  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_method_get_signature_full): Add locking here.

2005-05-03  Lluis Sanchez Gual <lluis@novell.com>

	* appdomain.c: Moved methods for parsing and freeing assembly
	names to assembly.c.
	* assembly.c, domain-internals.h: Created public methods for parsing
	assembly names. Fixed mono_assembly_load_with_partial_name:
	it now finds the best match, taking into account the version,
	token and culture specified in the partial name. Also return
	the latest version if no version information is specified.

Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* threadpool.c: replace check for SocketAsyncCall class.

2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool-internals.h:
	* Makefile.am: added threadpool-internals.h

	* threadpool.c: call mono_unhandled_exception on exceptions not handled
	that happen in threadpool threads (tested on MS).
	(mono_thread_pool_remove_socket): new function that dispatch any pending
	AIO call on a socket that is closing. By now only epoll really needs it,
	as select/poll wake up when the socket closes.


	* socket-io.c: call mono_thread_pool_remove_socket in Close_internal.

2005-05-01  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.

2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>

	* gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.

2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>

	* threads.c: In mono_thread_suspend_all_other_threads, if a thread
	has an abort request, convert it into a suspend request.

2005-04-30  Ben Maurer  <bmaurer@ximian.com>

	* marshal.c (mono_marshal_get_managed_wrapper): give a friendly
	warning for the usage of `UnmanagedFunctionPointerAttribute' which
	is not supported yet.

2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* image.c: register assemblies loaded from data (bundles) in the loaded
	assemblies hash. Fixes bug #74772.

2005-04-29  Martin Baulig  <martin@ximian.com>

	* class.c (mono_type_get_name_recurse): Update to the new naming
	schema from the latest .NET 2.x beta2.
	(mono_class_setup_vtable_general): If we're a generic instance,
	copy the vtable from our generic type definition and inflate all
	the methods in it.

	* loader.c (find_method): Update to the new naming schema from the
	latest .NET 2.x beta2.

2005-04-29  Raja R Harinath  <harinath@gmail.com>

	* class.c (mono_class_init): Add a mono_loader_unlock to the
	#74734 fix.

2005-04-28  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Environment_Exit): Remove the 
	suspend_all_other_threads () call for the time being, since it can hang.

	* threads.c (mono_thread_manage): Similarly, disable the waiting for
	the background threads to exit, since it can also hang.

	* class.c (mono_class_init): Applied patch from Ankit Jain 
	(radical@gmail.com). Avoid pending init errors when a field refers
	to a nested class using a typeref. Fixes #74734.

	* icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
	this for dynamic modules.

2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: don't wait for threads that are in the process of aborting
	or aborted. Set the 'shutting_down' flag before cleaning the threadpool
	and waiting for background threads to finish. This makes xsp and
	mod-mono-server exit without random length delays and/or hangs.

2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: remove duplicate assignment from GetReferencedAssemblies.

2005-04-25  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_is_assignable_from): Call is_assignable_to for
	dynamic types to prevent infinite loops. Fixes #74727.

	* reflection.c (mono_reflection_call_is_assignable_from): Rename to
	..._is_assignable_to.

2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>

	* security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.

2005-04-25  Martin Baulig  <martin@ximian.com>

	Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).

	* domain.c
	(supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".

	* row-indexes.h (MONO_GENERICPARAM_KIND): Removed.

	* reflection.c (build_compressed_metadata): Set metadata header
	version to 2.0.

2005-04-23  Zoltan Varga  <vargaz@freemail.hu>

	* sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
	number into an integral and a decimal part. Fixes #70473.

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.

2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : reflected the latest locale-builder output.

2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: check for SuspendRequested too when deciding if
	mono_thread_interruption_checkpoint should be called.

2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.[ch]: added function to set the shutting_down flag to TRUE.
	* threads.c: remove interruption_mutex and use Interlocked instead. When
	suspending all the threads, wait for all the suspended events at once.
	If we're shutting down and get an APC that is going to be queued,
	call mono_thread_execute_interruption immediately, as the thread might
	be sleeping on a pthread condition or mutex.

	* icall.c: call mono_runtime_set_shutting_down before suspending the
	threads.

	Fixes bug #74693. And now xsp is happier when exiting.

2005-04-22  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_stack_walk): Fix #74690.

2005-04-22  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MonoDebugMethodJitInfo): Added
	`MonoDebugMethodJitInfo *jit'.

	* mono-debug.c (mono_debug_read_method): Cache the
	MonoDebugMethodJitInfo in `address->jit'.
	(mono_debug_free_method_jit_info): New public method.

2005-04-22  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_is_assignable_from): Disallow
	type parameter -> interface.

2005-04-21  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_create): Turn an assertion into an error.

2005-04-20  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c object.c icall.c: Fix some gcc 4.0 warnings.
	
	* threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
	Fix some gcc 4.0 warnings.

Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>

	* file-io.c: fix alt dir separator char on unix systems
	and cleanup (fixes bug #71214).

2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>

	* marshal.c: Use CALLVIRT instead of CALL when dispatching
	a call to a remote domain, since the method may be an
	interface method in the client domain. This fixes bug #74192.

2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: recv/send are now performed before going back to managed
	code to save one transition.

2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* metadata/socket-io.c: fixed semantics in Socket.Blocking icall.

	* metadata/threadpool.c: removed hack to workaround the bug above.

	Fixes bug #74618.

2005-04-16  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c reflection.h: Fix handling of parameter defaults in
	dynamic methods. Also fixes handling of parameter attributes.
	Fixes #74609.

	* mono-debug.c (mono_debug_close_image): Fix warning.

2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.h: replaced old unused field with new 'blocking'.
	* threadpool.c: restore socket blocking state on windows(tm).

2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: don't return the codebase in the AssemblyName[] returned by
	ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
	* object-internals.h: Removed FIXME (fields were presents) and fixed
	versioncompat declaration.

2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: sometimes we get EBADF from epoll but the epollfd is
	not closed, so don't cleanup when it happens.

2005-04-13  Chris Toshok  <toshok@ximian.com>

	* mono-debug-debugger.h: change prototype for
	mono_debugger_lookup_type.

	* mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
	this function, although it should probably be named
	mono_debugger_init_type.

2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: fix non-AIO case.

2005-04-13  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.c (mono_profiler_install_simple): Add a 'jit' option to
	the built-in profiler to measure just JIT compilation times.

2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: the epollfd might be closed by another thread at
	any time, so ignore EBADF at treat it as a "we're closing" sign.

2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: release the semaphores with a count equals to the number
	of working threads in both IO and regular pools. Fixed typo that messed
	up the count of IO pool threads. Don't initialize the pipe handles if
	we're using epoll.

2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: some systems don't like a NULL when deleting the socket
	from epoll.

2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: fix semaphore allocation.

2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: added epoll() based implementation for asynchronous IO
	that is used instead of the default poll() when available.
	It can be disabled by setting MONO_DISABLE_AIO.

2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: windows needs 'closesocket' and instead of returning
	0 when the stream is closed while in select, it returns -1. Fixes bug
	#74573.

2005-04-12  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (class_compute_field_layout): Fix the regression caused by
	the previous try.

2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: separate pool for socket async. IO.
	* threadpool.h: mono_max_worker_threads is not a global any more.

2005-04-10  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (class_compute_field_layout): Fix #74549.

2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: select() on windows doesn't allow pipe handles, soooo
	use 2 connected sockets instead.

2005-04-08  Miguel de Icaza  <miguel@novell.com>

	* mono-config.c: Add new entry point for mkbundle
	mono_config_parse_memory. 

2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: removed another unused function.

2005-04-08  Ankit Jain  <radical@corewars.org>

	* reflection.c (get_default_param_value_blobs): Add 'types'
	parameter to get the types encoded in the constant table.
	(mono_param_get_objects): Use the type from the constant table,
	not the type of the parameter, when creating default values.
	Handle null default values correctly.

2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.c:
	* file-io.h:
	* threadpool.c:
	* threadpool.h:
	* icall.c:
	* socket-io.c: removed dead code for async IO.

2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.h: 2 more fields in MonoSocketAsyncResult.

	* threadpool.c: intercept socket async. calls and pass them to a thread
	that is polling and dispatching the job items to the threadpool as
	socket become ready. Fixes bugs #71217, #71933.

	* icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
	between char and short/ushort arrays.

	* socket-io.c: remove dead code.

2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>

	* locales.c,
	  icall.c : removed InternalToUpper_Comp() and
	  InternalToLower_Comp().

2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>

	* char-conversions.h : The tables were incorrectly generated. Should
	  be generated against invariant culture.

2005-04-04  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_runtime_invoke_array): Fix return value when 
	passing pre-created valuetype objects to ctors.

	* gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
	(jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
	Fixes #74338.

2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>

	* domain.c: removed g_assert for runtimesecurityframe_class. This is 
	only used with --security and hides the wrong corlib version error.

2005-03-30  Joshua Tauberer  <tauberer@for.net>

	* class.c: Changed mono_class_name_from_token so that types
	outside of a namespace don't have an initial period.  Improved
	the g_warning message used in _mono_class_get when loading
	fails.
	* assembly.c: In mono_assembly_load_reference, when an assembly
	can't be found, "No such file or directory" is misleading and
	unhelpful because a few paths were checked for the presence of
	the assembly.  When that happens (ENOENT), display a nicer
	message indicating the directories that were searched.  In all
	cases, the warning is made easier to read for non-hackers.

2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>

	* assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
	project/solution.
	* appdomain.h|domain.c: Removed inline from functions.
	* appdomain.c: Reduced warnings when compiling on windows.
	* icall.c: Fixed output_debug declaration to gunichar2*.
	* mono-config.c: Reduced warnings when compiling on windows.
	* rand.c: Added missing "windows.h". Added missing return value.
	* rawbuffer.c: Added missing winsock2.h for windows.
	* sysmath.h: Added mono-compiler.h header to allow/ease 
	compilation with non-GCC compilers.
	* threads.c: Fixed declarations to compile with VS.NET C compiler.
	Removed cast warnings.

	Adapted from the work of J Lothian (for VC6).

2005-03-29  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_load_corlib): Do not try loading corlib
	from default_path.

2005-03-27  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
	the 2.0 profile.

2005-03-27  Raja R Harinath  <harinath@gmail.com>

	* Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
	has to be in $(exec_prefix).  $(prefix) is for arch-independent
	stuff, and it would probably use $(prefix)/share rather than
	$(prefix)/lib.

2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* console-io.c: added 2 includes that might be missing.

2005-03-24  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
	profile.

	* reflection.c (create_custom_attr): Allocate the params array using
	alloca so it gets GC tracking.

2005-03-23  Chris Toshok  <toshok@ximian.com>

	* mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
	out some spew.

2005-03-24  Raja R Harinath  <rharinath@novell.com>

	* Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
	changes to pick up any changes in prefix, etc.

2005-03-23  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
	
	* marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
	* marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).

2005-03-23  Zoltan Varga  <vargaz@freemail.hu>

	* class-internals.h object-internals.h class.c reflection.c: Extend the
	mono_lookup_dynamic_token () function to return the class of the
	token as well. 

	* class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
	well. Fixes #73848.

2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>

	* security-manager.c: Skip inheritance checks for intra-corlib
	class inheritance and method overrides. This skips a lot of checks
	and (anyway) permissions cannot work until corlib is loaded.

2005-03-23  Martin Baulig  <martin@ximian.com>

	* marshal.c (mono_marshal_get_stfld_wrapper): Add support for
	MONO_TYPE_GENERICINST.	

2005-03-23  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.

Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>

	* class.c: added locking comments to some functions.
	Cache the interface offsets arrays (saves about 20 KB
	of runtime memory in a typical app).
	Reduce the time overhead in mono_class_setup_supertypes ().

Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>

	* icall.c: speedup and fix leaks in GetMethodsByName and
	GetPropertiesByName.

Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>

	* reflection.c: some locking fixes.

Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>

	* metadata.c: added missing break in case statement.

2005-03-22  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_runtime_invoke): Add support for
	typedbyref return values. Fixes #73941.

2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>

	* security-manager.c|h: Added demandunmanaged method and 
	suppressunmanagedcodesecurity class to MonoSecurityManager.
	Renamed aptc class to allowpartiallytrustedcallers.

2005-03-17  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.

2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.c: disabled file async. IO using aio_*. It uses the
	threadpool now. Workaround for bug #73718.

Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>

	* assembly.h, mono-config.c: added code to deal with bundled configs
	for bundled assemblies.

Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>

	* *.c, private.h: cleanup, removing old private.h header file.

2005-03-16  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_image_get_method_info): Encode best_fit_mapping
	and throw_on_unmappable_char attributes.

2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>

	* process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
	_ProcessName_internal.

2005-03-13  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_array_new_full): Fix aligning of array size. Fixes
	#73631.

	* icall.c threads.c threads-types.h: Remove slothash icalls as they
	are no longer used.

2005-03-11  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (compute_class_bitmap): Add support for generics. Fixes
	#73527.

2005-03-10  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.

2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.c: commented out the code for windows watcher, as we don't
	use it (we use the managed implementation instead).

2005-03-10  Zoltan Varga  <vargaz@freemail.hu>

	* object-internals.h (MonoThread): Remove 'unused1' field.

	* appdomain.c: Bump corlib version.

	* marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().

	* reflection.c (mono_reflection_create_runtime_class): Remove the
	AssemblyBuilder.Save optimization since it causes too many problems.

2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>

	* exception.c|h: Added mono_get_exception_reflection_type_load to
	create a ReflectionTypeLoadException object.
	* icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
	to return NULL is a InheritanceDemand fails during reflection. Updated
	ves_icall_System_Reflection_Assembly_GetTypes to throw a 
	ReflectionTypeLoadException if an InheritanceDemand fails during 
	reflection. Added icall mapping for GetLinkDemandSecurity.
	* security-manager.c|h: Added ves_icall_System_Security_
	SecurityManager_GetLinkDemandSecurity internal call to return the
	class and methods permissions set for a LinkDemand. Removed unused
	fields in MonoSecurityManager.

2005-03-10  Martin Baulig  <martin@ximian.com>

	* class.c (mono_bounded_array_class_get): Initialize `eclass' if
	it's a generic instance.

2005-03-09  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_get_object_from_blob): Applied patch from
	Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.

	* class.c (mono_class_is_assignable_from): Another try at fixing 
	#73469 without breaking anything.

2005-03-08  Zoltan Varga  <vargaz@freemail.hu>

	* class.c: (mono_class_is_assignable_from): Revert the last changes
	since they don't work with generics.
	
	* class.c (mono_class_is_assignable_from): Fix build bustage.

	* class.c (mono_class_is_assignable_from): If oklass is dynamic, call
	the managed IsAssignableFrom method. Fixes #73469.

	* reflection.c (mono_reflection_call_is_assignable_from): New helper
	function.

2005-03-04  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_load_remote_field_new): Fix returning uninitialized
	memory when the remoting callback does not sets the out arguments.
	Fixes #73007.

	* marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
	by mistake.

	* string-icalls.c: Return String.Empty where needed. Fixes #73310.

	* object-internals.h (MonoStackFrame): Sync with managed object layout.

	* appdomain.c: Bump corlib version.

2005-03-03  Zoltan Varga  <vargaz@freemail.hu>

	* gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
	function.

	* threads.c (mono_thread_attach): Detect threads which are not started
	by the GC pthread wrappers.

2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Added new icall for RNG.
	* rand.c|h: Added new icall to open the RNG. This allows to share a 
	single handle on Linux to access /dev/urandom and fix #73183.

Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: setting the new vtable in a transparent proxy object must
	not change the GC descriptor.

Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: fixed compilation without GCJ support.
	* reflection.c: for runtime-created types ensure klass->has_references
	is correct (bug #73215).

2005-03-02  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_is_assignable_from): Make this work if
	`oklass' is a generic instance; fixes #72831.

2005-03-01  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
	with hasthis set.
	
	* marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.

	* marshal.c: Reorganize native->managed marshalling code to also use
	the emit_marshal_... functions.

Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: typed allocs have issues with bitmap sizes > 30,
	so check for max_set >= 30.

2005-03-01  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_array): Implement marshalling of arrays to
	managed code. Fixes #73012.

	* metadata.h (MonoMarshalSpec): Add elem_mult field.

	* metadata.c reflection.c: Load/Emit elem_mult as well.
	
	* metadata.h (MonoMarshalSpec): Add comment.

	* metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.

	* metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
	num_elem to -1 if not given.

	* object-internals.h (MonoReflectionMarshal): Add has_size field.

	* reflection.c (encode_marshal_blob): Differentiate between 0 and not
	given values.

2005-03-01  Marek Safar  <marek.safar@seznam.cz>

	* null-gc.c (mono_gc_free_fixed): Was not compilable.

2005-02-28  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (encode_marshal_blob): Encode param_num field as well.

	* object-internals.h (MonoReflectionMarshal): Add param_num field.

Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: generalized the reference bitmap creation
	and added hooks for the new GC.
	* class-internals.c: removed the gc_bitmap field from MonoClass.

Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c: help the compiler to produce better code
	in mono_jit_info_table_find ().

Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: make all allocations look typed.

Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>

	* socket-io.c: load Mono.Posix if it's not loaded already
	(fixes bug#73033).

2005-02-24  Martin Baulig  <martin@ximian.com>

	* class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
	* reflection.c (dup_type): Likewise.

2005-02-24  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c (run_finalize): Set the domain for finalizing delegates as well.
	Thanks to Willibald Krenn and Scott Mohekey for tracking this down.

Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c, threads.c, object-internals.h: make the critical thread
	local vars use the fast access mode (even when we're compiled in
	a lib). Provide accessors to be used by the jit during codegen.

2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>

	* appdomain.c: Changed hook functios behavior to include
	support for the reflection only assemblies. Some icalls were changed
	to support the mentioned assemblies too. Signatures of static methods
	try_assembly_resolve and real_load now have an additional parameter:
	refonly.

	* assembly.c: General changes to mono_assembly_ methods to support
	reflection only api. Functions mono_assembly_open, mono_assembly_load,
	mono_assembly_load_from and mono_assembly_loaded have got a '_full'
	suffix, to support an additional gbool parameter to specify whether
	the assembli is reflection only or not. Created some new hook functions 
	to add support for reflection only assemblies. Signatures of static 
	methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
	have now an additional parameter: refonly.

	* metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
	indicating whether the assembly is reflection only or not.

	* exception.c: Add mono_get_exception_invalid_operation.

	* icall.c: Throw an InvalidOperationException when trying to invoke
	a property/method/event, or trying to set/get the value of a field.
	Also add an icall to retrieve the ref_only flag to the
	MonoReflectionAssembly.

2005-02-23  Chris Toshok  <toshok@ximian.com>

	Part of fix for #72827.
	* mono-debug.c (mono_debug_add_method): add lexical block data to
	the info we write.  Kind of a hack at the moment - we copy the
	lexical block info from the MonoDebugMethodInfo to the
	MonoDebugMethodJitInfo here, before writing it.
	(mono_debug_read_method): read the lexical block info.

	* mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.

	* debug-mono-symfile.h: add lexical block support.

	* debug-mono-symfile.c (mono_debug_find_method): add lexical block
	support.

2005-02-23  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Fix warning.

	* object.c (mono_runtime_free_method): Call mono_free_method () and
	put the TODOs there.

	* loader.c (mono_free_method): Free up most memory allocated for 
	dynamic methods.

Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>

	* reflection.c: properly flag a Type argument to a
	named custom attr value (bug #72248).

Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>

	* reflection.c: reduce code duplication in named custom
	attribute encoding.

Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>

	* reflection.c: properly encode custom attrs of type object
	(bug #72649).

2005-02-23  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_delegate_free_ftnptr): Make this thread safe.

Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>

	* socket-io.c: load System.dll if it's not loaded already
	(bug #72850 and #70477).

2005-02-21  Martin Baulig  <martin@ximian.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Add support for
	generic instances.

2005-02-21  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_build_metadata): We also need to
	"fixup" the MethodImpl table after we computed the final method
	indices.  Call fixup_methodimpl() to do that.
	(fixup_methodimpl): New private method.

Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>

	* assembly.c: special case mscorlib.dll (bug#72536),
	patch from Carlos Alberto Cortez.

2005-02-20  Zoltan Varga  <vargaz@freemail.hu>

	* threads-types.h threads.c: Fix build bustage.

	* threads.c: Use a union for long<->double conversions.

	* threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
	functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).

	* marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
	containing the checkpoint call with NOT_TAKEN.
	
	* marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
	checkpoint before pushing the arguments, so they won't have to be
	spilled to stack.

Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c, assembly.c, domain-internals.h: make some data
	const and relocation-free.

Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c, appdomain.c, class-internals.h: introduce the
	MonoClassRuntimeInfo structure to hold the info needed to
	use a class at runtime. Made mono_class_vtable() lock-free
	for all the appdomains.

Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>

	* metadata-internals.h, image.c: introduce a per-image mempool to
	be used for memory that has the same lifetime as the image.

2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>

	* domain.c: In mono_init_internal(), instead of selecting the first
	runtime version supported by an executable, get a list of all
	supported versions and select the one for which an mscorlib exists
	(since even if the runtime supports a given version, it doesn't mean
	that the framework for that version is installed).
	Modified get_runtimes_from_exe to support this behavior.
	In supported_runtimes, added information about additional system
	assembly versions.
	
	* assembly.c: Added support for more than one system assembly version
	per runtime version. Updated the assembly list.
	In mono_assembly_remap_version, removed the initial version check,
	since we don't know to which version we need to compare until we
	get the version set on which the assembly is based.
	Moved the code for loading corlib into the new method
	mono_assembly_load_corlib(), so it can be used by the initialization
	code.
	
	* domain-internals.h: Updated data structures and added declaration
	for mono_assembly_load_corlib.

2005-02-17  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (resolve_object): Fix the creation of the signature in 
	the SignatureHelper case.

	* assembly.c (mono_assembly_remap_version): Fix binary search.
	
2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
 
	* class.c: Added inheritance check when a method is overloaded (from a
	virtual method or when implementing an interface) and when a class is
	inherited. Added functions to set a failure for a class and to 
	retreive the exception from a failure.
	* class-internals.h: Added fields to MonoClass to keep the exception
	information status for inheritance (or other exceptions) to be thrown
	later (i.e. not at load time).
	* object.c: Throw the inheritance SecurityException when a type is to 
	be created with either class or method inheritance violations.
	* reflection.c|h: Fix when getting declsec from a class. Removed 
	unrequired code for class. Improved sanity in parameter naming.
	* security-manager.c|h: Added functions to check for class and method
	inheritance.

2005-02-17  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_create_runtime_class): Set has_cctor
	and has_finalize in dynamic types as well.

2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-table.h : fixed currency format for en-GB (and so on).

Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>

	* gc.c: ensure the GC handles never have 0 as a value.

2005-02-16  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
	a pointer to a struct to unmanaged code. Fixes #72625.

2005-02-16  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_open_image): Ignore dynamic images.

2005-02-16  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].

2005-02-15  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.

	* marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
	UnmanagedFunctionPointerAttribute, use it for determining calling convention
	etc. Fixes #71471.

	* reflection.c (mono_custom_attrs_get_attr): New helper function.

	* object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.

Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
	changes to make the current context a field in MonoThread.

2005-02-15  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
	the last change.
	
	* marshal.c (mono_marshal_emit_native_wrapper): New helper function
	extracted from mono_marshal_get_native_wrapper.

	* marshal.c (mono_marshal_get_native_func_wrapper): New helper function
	to create wrappers around native functions.

	* marshal.c (mono_ftnptr_to_delegate): Add support for creating 
	delegates for arbitrary function pointers. Fixes #71472.

Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>

	* threads.c: cleaned up the code a little.

2005-02-15  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
	the data table.

	* mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
	allocate larger chunks if needed.

2005-02-14  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
	in by mistake.

Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c: keep the domains in an array and ensure the domain ids
	are kept small, so they can be used as indexes to domain-specific data
	with a small memory overhead.

2005-02-14  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: Handle byref types in Type icalls. Fixes #72544.

Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>

	* Makefile.am: remove libmetadata: we build just libmonoruntime now.

2005-02-13  Zoltan Varga  <vargaz@freemail.hu>

	* tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.

	* loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
	values.

	* marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
	
2005-02-12  Ben Maurer  <bmaurer@ximian.com>

	* domain-internals.h: add the hashtable here.

	* class-internals.h: Remove `info' from MonoMethod

	* domain.c: Add a new hashtable, jit_trampoline_hash

Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: don't set the value of static fields
	(fixes bug#72494).

2005-02-11  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
	(mono_debug_add_method): Silently ignore the method if it's too big.
	(mono_debug_add_type): Likewise.

Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>

	* threads.c, appdomain.c: remove #ifdefs from the code.

2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>

	* metadata-internals.h: Added flags to MonoAssembly to cache the most
	common security informations. This allows us to stay in unmanaged code
	when doing LinkDemand and it's special cases (except for the first 
	time for initialization). The flags a very much used with --security.
	* reflection.c|h: Added code to get declarative security attributes 
	for LinkDemand and InheritanceDemand. This required to refactor the
	existing code for Demand.
	* security-manager.c|h: Added new method fields for the special cases
	of LinkDemand.

2005-02-10  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
	(ves_icall_MonoDebugger_GetTypeToken): New interncall.

2005-02-10  Martin Baulig  <martin@ximian.com>

	* mono-debug.c, mono-debug-debugger.c: Completely reworked the
	debugging code; this is almost a complete rewrite.

	* icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.

Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c, object.h: expose mono_string_equal () and 
	mono_string_hash ().
	* icall.c, string-icalls.c: remove the string.GetHashCode () icall,
	it's implemented in managed code.

Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>

	* icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
	lo leak objects between appdomains.

Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>

	* assembly.c: old compilers compilation fix from 
	robertj@gmx.net (Robert Jordan).

2005-02-09  Ben Maurer  <bmaurer@ximian.com>

	* class-internals.h: Little reminder for the future.

	* debug-helpers.c: Fix up wrapper_type_names

Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>

	* image.c, metadata-internals.h: when loading an image from a file,
	mmap all of it and use the same codepaths as when using a
	in-memory image: the code is simpler and we use less memory
	(both writable and readonly).

Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
	API to alloc runtime data structures that need to be tracked by the
	GC and contain pointers.
	* appdomain.c, threads.c, object.c, gc.c: use the above changes to
	make the code more readable and eventually use a different GC.

2005-02-09  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_vtype): Don't do managed->native conversion
	for out arguments.
	
2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>

	* object.c: In release_type_locks(), don't release the cctor lock
	if it has already been released. This fixes a crash in the
	thread5 test.

Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>

	* gc.c, marshal.c, icall.c: register a delegate for finalization
	only when the native function pointer has been allocated for it.

Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object.c: cleaned up some code, allocate objects that are
	pointer free with the atomic malloc variant. Allocate memory
	for static data from the mempool if it's pointer-free.
	Allocate the bounds array at the end of the array data, when needed.
	* object-internals.h, object.h: move a private function in a private
	header.
	* class.c: handle missing case in tracking references in fields.

Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>

	* class.c, class-internals.h: keep track if a type has
	reference fields in either the instance or static fields.

2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>

	* domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
	and renamed to MonoRuntimeInfo. Added fields to store the expected
	framework assembly version. Changed mono_get_framework_version and
	mono_get_runtime_version for a single mono_get_runtime_info method.
	
	* assembly.c: Added method to remap system assembly versions to the
	current executing runtime version. Removed old mapping code.
	Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
	
	* icall.c, reflection.c: Track api changes.

2005-02-06  Miguel de Icaza  <miguel@novell.com>

	* loader.c (method_from_memberref): Improve error reporting,
	produce the class name instead of the typeref/typedef index. 

2005-02-07  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.

2005-02-05  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Allow for combination of
	stdcall and charset name mangling.  Reorganize the code and add
	some tracing stuff.

2005-02-05  Ben Maurer  <bmaurer@ximian.com>

	* monodiet.c: More iters!

	* marshal.c: Iter usage.

	* icall.c: Iter usage.

	* object.c: Use iters.

	* debug-helpers.c: More iters

2005-02-05  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
	under win32.

2005-02-05  Ben Maurer  <bmaurer@ximian.com>

	* mono-debug-debugger.c: use iters

	* class.c, class-internals.h: mono_class_setup_events is static
	now

	* All callers: use iters

2005-02-05  Zoltan Varga  <vargaz@freemail.hu>

	* class.c string-icalls.c marshal.c reflection.c: Applied patch from
	Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.

2005-02-04  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_class_proxy_vtable): Add missing _setup () calls.

	* marshal.h: Add prototypes for ldfld/stfld_remote.

	* appdomain.c (mono_domain_fire_assembly_load): Handle the case when
	this is called during startup.
	
Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>

	* appdomain.c, monitor.c, monitor.h, threads-types.h: made the
	MonoThreadsSync struct private in monitor.c. Changed the way
	MonoThreadsSync is allocated so it's faster and there is no
	need to keep track of it with a finalizer and it uses less memory.
	This also finally allows us to allocate mono objects as ptrfree when
	there are no reference fields.

Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>

	* gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
	disappearing link to the GC interface and use them to simplify
	the gchandles code.

2005-02-04  Zoltan Varga  <vargaz@freemail.hu>

	* class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
	stfld_remote which call mono_load/store_field_new. This allows methods
	calling ldfld/stfld wrappers to be AOTed.

	* console-io.c: Include sys/filio.h under solaris.
	
	* console-io.c: Include curses.h if needed correctly.

2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
	
	* icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
	method->klass as well.

	* class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.

	* class.c (mono_class_init): Switch on lazy initialization of 
	methods.

	* class.c (mono_class_get_finalizer): Handle the case when the 
	finalizer is inherited.

2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* console-io.c: <curses.h> is needed by term.h on solaris.

2005-02-03  Ben Maurer  <bmaurer@ximian.com>

	* icall.c, class-internals.h, monodiet.c, class.c: Remove
	mono_class_setup_properties where possible. Remove this ftn from
	the header file, and make it static.

2005-02-03  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c: Add missing setup_... call.

	* class.c: Add missing setup_... calls.

	* class.c (mono_class_init): Switch on lazy initialization of 
	the generic vtable.
	
	* class.c (mono_class_init): Fix generics broken by the recent changes.

	* monodiet.c (handle_type): Add missing setup_... calls.

	* class.c: Back out garbage in previous patch.
	
	* class.c: Add missing setup_... calls.

	* class.c (mono_class_get_method_from_name_flags): Avoid calling
	mono_class_setup_methods () if possible.

	* class-internals.h (MonoClass): Add 'has_cctor' flag.

	* class-internals.h (MonoCachedClassInfo): New structure.

	* class.c: Initialize properties and events fields of MonoClass lazily.

	* class.c: Add infrastructure for lazily initializing the methods and
	vtable fields of MonoClass. Not yet used.

	* class.c (mono_class_get_finalizer): New helper function.

	* class.c: Add infrastructure for loading some class related data from
	an AOT file.

	* object.c: Add infrastructure for initializing the vtable from data
	in the AOT file.

	* gc.c (run_finalize): Use mono_class_get_finalizer ().

	* class.c loader.c object.c icall.c gc.c reflection.c: Call the
	appropriate initialization function before accessing parts of the
	MonoClass structure.

	* marshal.c: Fix warnings.
	
	* marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.

	* mono-debug-debugger.c (get_exception_message): Use 
	mono_class_get_method_from_name_flags ().

2005-02-02  Ben Maurer  <bmaurer@ximian.com>

	* reflection.c, appdomain.c: Replace a few manual searches that
	Zoltan missed. (Paolo approved this part of my initial patch).

Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>

	* profiler.c: disable recording statistical events at report time.

Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>

	* icall.c: patch from Geoff Norton <gnorton@customerdna.com>
	to byteswap arrays of enum values, too (bug #72080).

2005-02-02  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (set_domain_search_path): Allow this to be called if
	domain->setup is not yet set.

	* loader.c (mono_method_get_index): New helper function.

	* loader.c reflection.c: Use mono_method_get_index ().

	* class.c (mono_class_get_method_from_name_flags): New helper method.

	* debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
	this.

	* class.c (mono_class_get_cctor): New helper method.

	* string-icalls.c object.c class.c marshal.c reflection.c: Use
	mono_class_get_method () to look up methods.

2005-02-01  Miguel de Icaza  <miguel@novell.com>

	* console-io.c: Fix the build, this should work on Windows.

2005-01-31  Ben Maurer  <bmaurer@ximian.com>

	* marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
	be set to null to keep things valid

2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added Console 2.0 icalls.
	* Makefile.am: added console-io.[ch]
	* console-io.[ch]: internal calls for Console 2.0 API.

Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>

	* class.c: make sure we consider all the interfaces
	when calculating max_interface_id (bug found by
	Jeroen Frijters running ikvm).

2005-01-31  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
	valuetype fields to null.

	* object.c (set_value): Ditto. Fixes #71669.	

2005-01-31  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_metadata_has_generic_params): New public
	function; checks whether something is a generic method.

Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>

	* appdomain.c: fix infinite recursion when adding assemblies.

2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>

	* object.c: Fix small typo to return all items for Environment.
	GetCommandLineArgs.

Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
	reflection.c: more domain and assembly-unload related fixes
	and memory leaks plugs.

2005-01-30  Zoltan Varga  <vargaz@freemail.hu>

	* 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.

2005-01-29  Ben Maurer  <bmaurer@ximian.com>

	* loader.c (mono_method_signature): Make this method lazy
	(mono_get_method_from_token): Don't computate the signature here.

	Doing this saves quite a bit of memory. I got 90 kb on starting up
	monodoc. It should also save some disk reads on startup.

	* *: MonoMethod->signature might be NULL now. You *MUST* use
	mono_method_signature.

2005-01-29  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_runtime_get_main_args): Return an array from the
	current domain here. Fixes #71938.

Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>

	* monitor.c: formatting changes to comply with the
	mono coding style and remove #ifdefs from the code.

Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>

	* metadata.c, private.h: remove some unneeded data
	and use a more compact representation for table schemas.

Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
	to get a better distribution in hash tables.
	* *.c: use mono_aligned_addr_hash() where appropriate.
	* assembly.c: make var static.

2005-01-28  Zoltan Varga  <vargaz@freemail.hu>

	* domain-internals.h: Put MonoJitInfo on a diet.

	* domain.c: Fix a warning.

Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>

	* gc.c: rework the gc handles code to reuse handles
	when freed.

Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c: fixed long standing bug in mono_string_equal() which
	was brought to light with the ldstr changes.

2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>

	* reflection.c: Remove warning by adding missing include for marshal.h

Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c, object.c: change the ldstr_table to hold
	MonoString* as keys: makes the runtime isinterned lookup
	faster and simplifies memory management.

2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
 
	* icall.c: Renamed GetEnvironmentVariable so internal* so it was
	possible to add imperative security checks before calling the icall.
	* reflection.c: Return security attributes on the original MonoMethod
	(and not the wrapped one). This fix permissions on icalls.

2005-01-25  Dick Porter  <dick@ximian.com>

	* icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
	the check for mktime() support actually test the mktime() return
	value.  "Fixes" bug 71682, though the output is still different to
	MS.

2005-01-25  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_is_assignable_from): Make this work for
	generic instances.

2005-01-24  Ben Maurer  <bmaurer@ximian.com>

	* marshal.c (mono_string_utf8_to_builder)
	(mono_string_builder_to_utf16): We might not have ownership of the
	string. In thise case, we need to create a new buffer.

	* object-internals.h (mono_stringbuilder_capacity): sb->str might
	be null, in which case, use the default capacity.

Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>

	* gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
	GC events to the profiler.

Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>

	* gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
	if you don't want the GC to run.

Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
	start providing a GC API and keeping different implementations in
	their own file.
	* profiler.h, profiler.c, profiler-private.h: provide the GC events API.

2005-01-22  Ben Maurer  <bmaurer@ximian.com>

	* debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
	mmap rather than allocating a huge buffer.
	(mono_debug_close_mono_symbol_file): Free the buffer allocated
	above.

2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Add new internal calls for SecurityManager.SecurityEnabled
	and CheckExecutionRights.
	* reflection.c|h: Keep the index of the declarative security to be 
	used, instead of the pointer, when AOT compiler is used. Also add 
	class initialization when requesting demands.
	* security-manager.c|h: Implement SecurityManager.SecurityEnabled and
	CheckExecutionRights. Both properties are now FALSE by default, and
	unmodifiable, unless the --security option is used.

Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>

	* domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
	reflection.c: properly refcount images and assemblies, many leaks fixed.

2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: increase the timeout for threads in the thread pool to
	10s.  Fixes bug #67159.

2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>

	* class-internals.h: Sun's compiler insists on explicit
	signed on bit fields to handle then correctly.

2005-01-19  Miguel de Icaza  <miguel@ximian.com>

	* file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
	Make the size of the array fit only the number of invalid path
	chars that we have.

	* class.c (_mono_class_get): Improve the error reporting when a
	class referenced is not found, to assist debugging. 

Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>

	* threads.c: fix off-by-one error.
	* domain.c: free data allocated in the domain.

2005-01-19  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_method_body_get_object): Fill out exception info
	as well.

	* object-internals.h: Add MonoReflectionExceptionHandlingClause 
	structure.
	
2005-01-19  Martin Baulig  <martin@ximian.com>

	* loader.c (mono_get_method_constrained): Make this work again.

2005-01-19  Zoltan Varga  <vargaz@freemail.hu>

	* object-internals.h (_MonoReflectionMethodBody): Make local_index a 
	guint16 to match the managed side.

	* reflection.c (mono_reflection_body_get_object): Fill out local
	variables array.

	* reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
	as well.

	* object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
	'local_var_sig_token'.

2005-01-18  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
	System.Drawing.

	* reflection.c (mono_method_body_get_object): Handle abstract and
	runtime methods.

Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>

	* marshal.c, loader.c, class-internals.h, reflection.c:
	store the emthod data for a wrapper in an array instead of a list.

Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>

	* marshal.c: change the code to allocate memory more
	conservatively for method wrappers.

Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
	fields from MonoClass to the marshal info structure where they belong.

Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>

	* class.c, object.c, class-internals.h, marshal.c: rearrange
	some fields and tweak some types to lower memory usage.

2005-01-17  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (signal_thread_state_change): Handle the case when the
	target thread is the current thread.

	* marshal.c (mono_struct_delete_old): Do not free lpwstr fields.

	* marshal.c: Rename emit_ptr_to_str_conv and its pair to 
	emit_ptr_to_object_conv. 

	* marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
	marshalling. Fixes #71352.

Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>

	* metadata.h, blob.h: move table enum to blob.h so it can be included
	in any header.
	* image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
	cut the size of MonoImage/MonoDynamicImage.

2005-01-16  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.c (mono_profiler_install_simple): Fix default arguments.

Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h, icall.c: add a function to check
	if an attribute type is defined for a metadata object.

2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>

	* object-internals.h: Added some needed fields from StringBuilder class.
	* marshal.c: Set the maxCapacity when creating a StringBuilder.

2005-01-13  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Environment_Exit): Suspend all managed
	threads before shutting down the runtime.

	* threads.c (mono_thread_suspend_all_other_threads): New helper function.

Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>

	* object-internal.h, threads.c: implement stacksize and 
	parameterized thread start functionality (requires
	matching corlib). Marked broken code for later removal.

2005-01-12  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoGenericClass): Moved the `initialized'
	flag to MonoDynamicGenericClass, removed `init_pending'.
	(MonoGenericInst): Added `is_reference' flag.

2005-01-12  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_image_create_pefile): Only set the pe_offset
	inside the MSDOS header. Fixes #71201.

	* gc.c (mono_gc_cleanup): Handle the case when this is called from the
	gc thread.
	(mono_domain_finalize): Ditto.

2005-01-12  Martin Baulig  <martin@ximian.com>

	* class.c (mono_get_shared_generic_class): Use the cache for
	non-dynamic generic classes.

	* class-internals.h (mono_class_create_generic_2): Removed
	function prototype, this function is now static inside class.c.

	* class.c (mono_class_create_generic_2): Made this static, only
	call it from mono_class_init() and mono_class_setup_parent().
	(collect_implemented_interfaces_aux): Call mono_class_init() on
	the interfaces we collect.
	(mono_class_setup_vtable): Call mono_class_init (class->parent).

2005-01-11  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
	it a real thread handle.

	* domain-internals.h: Move exvar_offset from MonoJitInfo to 
	MonoJitExceptionInfo, since each catch clause needs its own variable.
	
2005-01-11  Dick Porter  <dick@ximian.com>

	* image.c (mono_pe_file_open): New variant on mono_image_open()
	that does not set up the CLI metadata; used for FileVersionInfo so
	it can get the data for windows binaries too.
	
	* process.c (process_read_string_block): Don't read off the end of
	the StringTable block.

	These both fix bug 70766.

Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>

	* gc.c: set some fields to NULL at GC cleanup time.
	* threads.c: if we quit the main thread, call exit ().

2005-01-11  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.

Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>

	* threads.h, threads.c, object.c: added accessor and settor for
	main_thread. Handle it specially when exiting from it: wait
	for other foreground threads to exit.

Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>

	* process.c, verify.c: remove some bloat.

2005-01-09  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
	the calling convention to cdecl under win32.

2005-01-08  Ben Maurer  <bmaurer@ximian.com>

	* object.c (mono_object_get_size): New function to get the size of
	an object instance.

	* profiler.c (simple_allocation): Use above.

2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
	ves_icall_System_AppDomain_getRootDomain (as it's not required to
	get an appdomain by it's id and we can't assume the root's id is 0).
	* domain-internals.h: Change the function prototype to match.
	* icall.c: Change the icall table for AppDomain.

2005-01-08  Miguel de Icaza  <miguel@ximian.com>

	* locales.c (string_invariant_compare_char): Only compute
	GUnicodeTypes in the case where we need them.  Test for ordinality
	first and return if so.

	From the commit:

		/*
		 * FIXME: here we must use the information from c1type and c2type
		 * to find out the proper collation, even on the InvariantCulture, the
		 * sorting is not done by computing the unicode values, but their
		 * actual sort order.
		 */

Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>

	* loader.c: for P/Invoke methods, allow the "Internal" shared
	library name to refer to the calling process symbol namespace.

2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>

	* Makefile.am: Add the security manager to the build.
	* security-manager.c|h: New. Initialization of the security manager.

2005-01-07  Dick Porter  <dick@ximian.com>

	* threads.c: 
	* monitor.c: Update thread state during Monitor and WaitHandle
	waits.  Fixes bug 71031.

2005-01-07  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (property_encode_signature): Correctly handle when the
	property has no methods.

2005-01-06  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
	
	* reflection.c (reflection_methodbuilder_from_method_builder): Copy
	fields from mb, not rmb. Fixes #71017.

	* marshal.c (emit_ptr_to_str_conv): Add support for 
	ByValTStr -> string conversion. Fixes #71015.

	* appdomain.c (mono_domain_owns_vtable_slot): New helper function.

	* mempool.c (mono_mempool_contains_addr): New helper function.

2005-01-05  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.c (mono_metadata_compute_size): Fix size calculation of
	HasSematics encoded fields.
	
	* metadata.c (mono_type_to_unmanaged): Improve error message for 
	invalid string marshalling.

	* metadata.c: Fix warnings.
	
Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>

	* profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
	profiler support.

2005-01-05  Zoltan Varga  <vargaz@freemail.hu>

	* domain.c object.c domain-internals.h: Revert part of r38077 since the
	keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
	tests.

2005-01-03  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
	so methods containing these can be AOTed.

2005-01-03  Martin Baulig  <martin@ximian.com>

	* loader.c (find_method): Removed the hack for generic instances.
	(method_from_memberref): If our parent is a generic instance, pass
	its generic type definition to find_method() and then inflate the
	method.
	(mono_get_method_constrained): Pass the generic type definition to
	find_method() and inflate the method later.

	* class-internals.h (MonoStats): Added `generic_class_count'.

	* icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
	Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().

	* reflection.c (mono_custom_attrs_from_params): Don't ignore
	generic type definitions.

2004-12-30  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c icall.c: Fix warnings.

2004-12-29  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
	blittable types. Fixes #70864.

2004-12-29  Martin Baulig  <martin@ximian.com>

	* icall.c
	(ves_icall_MonoGenericMethod_get_reflected_type): New interncall.

	* reflection.c (mono_method_get_object): Create a
	"System.Reflection.MonoGenericMethod" for inflated methods; don't
	call mono_get_inflated_method().

	* class-internals.h (MonoStats): Added `inflated_method_count_2'.

2004-12-27  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoMethod): Added `is_inflated' flag.
	(MonoMethodInflated): Added `inflated' field.

	* class.c (mono_class_inflate_generic_method): Don't really
	inflate the method here; just set the `is_inflated' flag in the
	MonoMethod.
	(mono_class_get_inflated_method): Actually inflate the method here
	if it's not already inflated; we use the MonoMethodInflated's new
	`inflated' field as a cache.

2004-12-26  Martin Baulig  <martin@ximian.com>

	* class.c
	(inflate_generic_class): Moved some code out of inflate_generic_type().
	(mono_class_inflate_generic_method): If we're already inflated,
	inflate the context and use the declaring method; ie. make sure
	the declaring method of an inflated method is always the generic
	method definition.
	(mono_class_create_from_typedef): Create
	`class->generic_container->context->gclass'.

2004-12-24  Ben Maurer  <bmaurer@ximian.com>

	* metadata-internals.h, marshal.c, reflection.c: More
	MonoGHashTable->GHashTable.

	* domain-internals.h, class.c: Change MonoGHashTable's into
	GHashTables for some cases where no gc stuff is used

	All users: update apis

2004-12-23  Ben Maurer  <bmaurer@ximian.com>

	* metadata.c (builtin_types): Make this `const'. Makes this get
	put into the shareable section.
	(mono_metadata_init): Casts to make gcc happy.

2004-12-22  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c (mono_gc_init): Add a '\n' to the valgrind warning.

2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 

	* icall.c: Added an internal call to retrieve the position and length
	of assembly-level declarative security attributes (RequestMinimum, 
	RequestOptional and RequestRefuse). This is used by the Assembly class
	to re-create the corresponding permission sets.

Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>

	* marshal.c: fix the stelemref wrapper to be type correct
	(and faster).

2004-12-20  Ben Maurer  <bmaurer@ximian.com>

	* icall.c (ves_icall_System_Object_GetHashCode): There was no need
	to do key & 0x7fffffff. Hashtable already does this. It just
	results in longer code.

2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Bump corlib version.
	* class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
	* domain.c: Add RuntimeSecurityFrame to mono_defaults.
	* reflection.c|h: Add functions to get declarative security infos
	(blob position and length) for assemblies, classes and methods.

Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: sort the constant table (bug #70693).

Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>

	* object-internals.h, threads.c, domain.c: add accessors for
	the MonoThread and MonoDomain tls keys.

2004-12-18  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_type): If we're inflating a generic
	instance, set `ngclass->context->container = context->container';
	ie. the container we inflated into.

	* metadata.c (mono_metadata_parse_generic_param): Reflect above
	inflate_generic_type() changes.

2004-12-17  Martin Baulig  <martin@ximian.com>

	* class-internals.h
	(MonoGenericClass): Replaced `MonoType *generic_type' with
	`MonoClass *generic_class'.  Removed `dynamic_info'; if
	`is_dynamic' is true, we're a `MonoDynamicGenericClass'.
	(MonoDynamicGenericClass): Derive from `MonoGenericClass'.

2004-12-16  Zoltan Varga  <vargaz@freemail.hu>

	* exception.c (mono_exception_from_token): New helper function.

2004-12-15  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_load_with_partial_name): Call 
	mono_assembly_loaded before invoking the preload hooks. Fixes
	#70564.

	* object-internals.h (MonoThread): Change culture_info and 
	ui_culture_info into an array.

	* threads.c: Cache culture info objects from more than one appdomain.

	* threads.c threads-types.h icall.c: Add icalls for manipulating the 
	current UI culture.

2004-12-14  Zoltan Varga  <vargaz@freemail.hu>

	* threads.h threads.c appdomain.c: Clear the culture_info field of
	all threads during unloading if they point to an object in the dying
	appdomain.

2004-12-13  Ben Maurer  <bmaurer@ximian.com>

	* culture-info.h (TextInfoEntry): New struct
	* object-internals.h: sync with managed
	* locales.c: fill the `text_info_data' field
	* culture-info-tables.h: update

Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, monodiet.c: add monodiet, an IL code garbage
	collector.

2004-12-12  Ben Maurer  <bmaurer@ximian.com>

	* icall.c (ves_icall_ModuleBuilder_getToken): Check for null
	(ves_icall_ModuleBuilder_getMethodToken): Ditto

2004-12-12  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (write_type): If we're an enum and the
	builtin types have already been initialized, call mono_class_init().

2004-12-11  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_metadata_load_generic_params): Added
	`MonoGenericContainer *parent_container' argument; automatically
	compute `container->is_method'; pass the correct owner to
	get_constraints().	

	* reflection.c (compare_genericparam): Sort the GenericParam table
	according to increasing owners.	

Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>

	* profiler.c: allow disabling the default profiler.

Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>

	* decimal.c, icall.c: allow disabling System.Decimal support.

2004-12-09  Marek Safar <marek.safar@seznam.cz>

	* reflection.c: Add support for null attribute arguments.

2004-12-09  Martin Baulig  <martin@ximian.com>

	* metadata.h, loader.h: Use `idx' instead of `index' in parameter
	names to get rid of compiler warnings.

2004-12-08  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_struct_to_ptr): Call 
	mono_marshal_load_type_info (). Fixes #69625.
	(mono_marshal_get_ptr_to_struct): Likewise.

2004-12-08  Martin Baulig  <martin@ximian.com>

	* mono-debug.h: Bumped version number to 47.

	* mono-debug-debugger.c
	(mono_debugger_event_handler, mono_debugger_event): Take two
	guint64 arguments insteed of a gpointer and a guint32.	

2004-12-08  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h
	(MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
	`address' to `native_offset'.

2004-12-08  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_from_typespec): Only inflate if we
	either have `context->gclass' or `context->gmethod'.

2004-12-08  Zoltan Varga  <vargaz@freemail.hu>

	* metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.

	* object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.

	* reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.

	* reflection.c (mono_assembly_get_object): Remove the workaround put
	in for the release.
	
	* appdomain.c: Use the corlib_internal field from MonoAssembly.

	* appdomain.c: Bump corlib version.

	* reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
	be visible in other appdomains.

2004-12-07  Ben Maurer  <bmaurer@ximian.com>

	* threads.c: Interlocked inc and dec for longs were messed up,
	use a KISS based impl for this. Fixes 70234

2004-12-07  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.

Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix to follow policy not to allow struct
	arguments in icalls.

2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.c: make the patch that handles spaces in file paths work
	on mono/windows too.

2004-12-06  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_generic): Call
	mono_class_setup_supertypes() if we're dynamic.
	(mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.

2004-12-06  Zoltan Varga  <vargaz@freemail.hu>

	* object-internals.h: Add new fields to MonoThread.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* icall.c threads-types.h threads.c: Add new icalls.

	* object-internals.h (MonoThread): Remove unused 'unmanaged' field.

	* object-internals.h (MonoReflectionAssembly): Sync object layout with
	managed side.

	* appdomain.c: Bump corlib version.

	* appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
	internal assemblies. Fixes #69181.

2004-12-05  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_signature): Make this a
	no-op if `context' is NULL or we don't have any type parameters;
	also copy `sentinelpos'.	

2004-12-04  Zoltan Varga  <vargaz@freemail.hu>

	* image.c: Add unbox_wrapper_cache.

	* class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.

	* marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
	function generator.
	
	* object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
	Fixes #70173.

	* metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
	
2004-12-04  Martin Baulig  <martin@ximian.com>

	* loader.c (mono_method_get_signature_full): New public function;
	like mono_method_get_signature(), but with an additional
	`MonoGenericContext *' argument.

	* class.c (mono_class_inflate_generic_signature): Formerly known
	as inflate_generic_signature(); make this public.

2004-12-04  Martin Baulig  <martin@ximian.com>

	* metadata.c
	(mono_metadata_parse_type_full): Take a `MonoGenericContext *'
	instead of a `MonoGenericContainer *'.	
	(mono_metadata_parse_array_full): Likewise.
	(mono_metadata_parse_signature_full): Likewise.
	(mono_metadata_parse_method_signature_full): Likewise.
	(mono_metadata_parse_generic_inst): Likewise.
	(mono_metadata_parse_generic_param): Likewise.
	(mono_metadata_parse_mh_full): Likewise.
	(mono_type_create_from_typespec_full): Likewise.

2004-12-03  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoGenericContainer): Replaced the
	`MonoGenericContext * pointer with a `MonoGenericContext'
	structure and made it the first element.

2004-12-03  Martin Baulig  <martin@ximian.com>

	* class.c
	(inflate_generic_type): Set the `context->container' when creating
	a new MonoGenericContext.
	(mono_class_inflate_generic_method): Likewise.
	(mono_class_create_from_typespec): Just use `context->container'
	to get the container.

	* loader.c (method_from_methodspec): Set `context->parent' from
	`context->container' - and if that's a method container, use its
	parent.  Also set the `context->container' when creating a new
	MonoGenericContext.
	(mono_get_method_from_token): Use just `context->container' to get
	the container.

	* metadata.c (do_mono_metadata_parse_generic_class): Also set
	`gclass->context->container'.

	* reflection.c (do_mono_reflection_bind_generic_parameters): Set
	the `context->container' when creating a new MonoGenericContext.

2004-12-03  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (compare_genericparam): Sort params with identical
	owner by their number. Fixes gen-111 on sparc.

2004-12-02  Zoltan Varga  <vargaz@freemail.hu>

	* threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
	around the domain changes.

	* appdomain.c (mono_domain_unload): Handle the case when the thread
	calling Unload is itself being aborted during unloading. Fixes #70022.

	* appdomain.h: Add prototype for mono_install_runtime_cleanup.

	* marshal.c (emit_thread_interrupt_checkpoint_call): Call 
	checkpoint_func as an icall so it gets a wrapper.
	(mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
	in the cross-appdomain wrappers too.

	* threads.c (mono_thread_has_appdomain_ref): Make this public.

	* assembly.c (mono_assembly_open_from_bundle): Fix warning.

	* reflection.c: Fix some memory leaks.
	
2004-12-02  Martin Baulig  <martin@ximian.com>

	* metadata-internals.h (MonoImage): Removed `generic_class_cache'.

	* metadata.c (generic_class_cache): New static hashtable.
	(mono_metadata_lookup_generic_class): New public method.

2004-12-02  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_from_typedef): Call
	mono_class_setup_parent() and mono_class_create_mono_type() before
	parsing the interfaces.

2004-12-02  Martin Baulig  <martin@ximian.com>

	* metadata.c (generic_inst_cache): New static hashtable.
	(mono_metadata_lookup_generic_inst): New public function.
	(mono_metadata_inflate_generic_inst): New public function.
	(mono_metadata_parse_generic_inst): New public function.
	(do_mono_metadata_parse_generic_class): Use the new
	mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
	since this'll also use the cache.

	* reflection.c (mono_reflection_bind_generic_method_parameters):
	Use mono_metadata_lookup_generic_inst() to use the new cache.

	* class.c (inflate_mono_type): Use
	mono_metadata_inflate_generic_inst() to inflate a generic
	instance; this'll also use the new cache.

	* loader.c (method_from_methodspec): Use
	mono_metadata_parse_generic_inst() and
	mono_metadata_inflate_generic_inst() rather than parsing it
	manually, so we can use the new cache.

2004-12-02  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (wait_for_tids): Do not incorrectly free threads when 
	the wait times out.

2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>

	* icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
	iter->args based on whether parameters are passed in registers (i.e.
	MONO_ARCH_REGPARMS is defined)

2004-12-01  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
	the exception message. Fixes #70070.
	(method_from_methodspec): Fix warnings.

2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.c: (complete_path) return the path quoted

2004-12-01  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoGenericInst): New structure.
	(MonoGenericClass): Replaced `type_argc', `type_argv' and
	`is_open' with `MonoGenericInst *inst'.
	(MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
	`is_open' with `MonoGenericInst *inst'.

2004-11-30  Martin Baulig  <martin@ximian.com>

	Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.

	* metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
	to `generic_class_cache'.

	* metadata.c
	(mono_generic_inst_hash): Renamed to mono_generic_class_hash().
	(mono_generic_inst_equal): Renamed to mono_generic_class_equal().
	(mono_generic_inst_is_valuetype): Renamed to
	mono_generic_class_is_valuetype().

	* class-internals.h
	(MonoGenericInst): Renamed to MonoGenericClass.
	(MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
	(MonoClass): Renamed `generic_inst' to `generic_class'.
	(MonoGenericContext): Renamed `ginst' to `gclass'.

	* object-internals.h
	(MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.

	* reflection.c (mono_reflection_generic_inst_initialize): Renamed to
	mono_reflection_generic_class_initialize().

	* icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
	now known as "System.Reflection.MonoGenericClass".
	(monogenericinst_icalls): Renamed to monogenericclass_icalls.

2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>

	* class-internals.h: Added a flag field to MonoClass to cache the
	declarative security attributes actions associated with the class.
	* domain-internals.h: Added booleans to MonoJitInfo to cache the
	(class or method level) stack modifiers (Assert, Deny and PermitOnly)
	applicable to the JITted method.
	* reflection.c|h: Added functions to extract (as flags) which security
	actions are available (declaratively) for a method, class or assembly.
	* metadata.c|h: Added functions to search the declarative security
	table in the metadata.
	
2004-11-29  Ben Maurer  <bmaurer@ximian.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
	EXPORTEDTYPES are already in the class name cache, so there is no
	need to add extra code here to look at them. Just removes a bit of
	cruft.

	(ves_icall_System_Environment_get_TickCount): No need for #if
	WINDOWS. We already have the code in io-layer.

2004-11-28  Martin Baulig  <martin@ximian.com>

	* loader.c
	(method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
	Fixes gen-112.cs.

2004-11-27  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c (do_mono_assembly_open): Instead of having a
	conditional WITH_BUNDLE, incorporate support for bundles here, by
	having a global `bundles' variable holding a pointer to the actual
	bundles. 

	(mono_register_bundled_assemblies): New API call used by the
	bundle code. 

	See mkbundle.1 for details.
	
2004-11-27  Martin Baulig  <martin@ximian.com>

	* object.c (mono_class_vtable): Store the `MonoMethod *' itself in
	the vtable for generic methods.

2004-11-26  Martin Baulig  <martin@ximian.com>

	* metadata.c
	(mono_metadata_generic_method_hash): New public function.
	(mono_metadata_generic_method_equal): Likewise.

	* class-internals.h
	(MonoGenericContainer): Added `GHashTable *method_hash'.

	* reflection.c (ReflectionMethodBuilder): Added
	`MonoGenericContainer *generic_container'.
	(reflection_methodbuilder_to_mono_method): Don't create a new
	MonoGenericContainer each time we're called.
	(mono_reflection_bind_generic_method_parameters): Use
	`container->method_hash' to cache the results so we don't create a
	different method if we're called several times with the same
	arguments.

	* loader.c (method_from_methodspec): Use the new
	`container->method_hash' here, too.

2004-11-26  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_signature): Correctly compute
	`res->has_type_parameters'.
	(mono_class_vtable): Use the `has_type_parameters' flag to
	determine whether we're a generic method.

	* metadata.c (mono_metadata_parse_method_signature_full): Likewise.

2004-11-25  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_runtime_run_main): Fix a small memory leak.

2004-11-25  Martin Baulig  <martin@ximian.com>

	* class.c (set_generic_param_owner): Fixed the loop.

2004-11-25  Martin Baulig  <martin@ximian.com>

	* object.c (mono_class_vtable): Don't create any JIT wrappers for
	generic methods.

2004-11-24  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: Allow all kinds of whitespace, not just ' ' in type
	names. Fixes #69787.

2004-11-24  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_generic_2): If we don't have a
	`ginst->parent', inflate `gklass->parent' to get our parent.

2004-11-24  Martin Baulig  <martin@ximian.com>

	* reflection.c (compare_genericparam): Correctly sort the
	GenericParam table; fixes #69779.

2004-11-23  Ben Maurer  <bmaurer@ximian.com>

	* reflection.c: When writing a PE file, don't create a huge
	buffer in memory. Just write the arrays we have to the file.
	This reduces memory usage.

	* metadata-internals.h: MonoDynamicStream pefile is no longer used
	globally.

2004-11-17  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): Don't setup `class->parent' for
	dynamic instances; moved this to mono_class_generic_2().
	(mono_class_create_generic): Also set `klass->inited' for dynamic
	generic instances.
	(mono_class_create_generic_2): Don't do anything for dynamic
	generic instances.  Set `klass->parent' here and also call
	mono_class_setup_parent() here.	

	* reflection.c (do_mono_reflection_bind_generic_parameters): Added
	`MonoType *parent' argument; set `ginst->parent' before calling
	mono_class_create_generic_2(), so we set the correct parent.

Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: allow getting attributes from ModuleBuilder
	(used by ikvm).

2004-11-17  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_from_typedef): If a type parameter is
	inherited from an outer class, set its owner to that class.

2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>

	* reflection.c: (mono_image_create_pefile): Don't use NULL argument
	  for (int*) written size. This fixes bug #69592.

2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Added IsAuthenticodePresnet internal call.
	* image.c|h: New function that check a MonoImage for an Authenticode
	signature in the certificate PE data directory.
	* security.c|h: New internal call to ask the runtime if an 
	Authenticode signature seems referenced in the PE header.

2004-11-15  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_type_isprimitive): Native int is a primitive type.

	* reflection.c (mono_image_create_pefile): Free the assembly streams
	after writing out the assembly file.

	* object.c (mono_runtime_run_main): Fix small memory leak.

	* icall.c (ves_icall_Type_GetPropertiesByName): Add support for
	property access modifiers. Fixes #69389.

Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>

	* domain.c, object.c, object-internals.h, domain-internals.h,
	object.h, marshal.c: keep dynamic code info per domain.

2004-11-15  Martin Baulig  <martin@ximian.com>

	* class.c (mono_type_get_name_recurse): Put type arguments in
	`[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
	see bug #68387.

2004-11-15  Martin Baulig  <martin@ximian.com>

	* class.c (mono_type_get_name_recurse): Added `include_ns' flag.
	(mono_class_setup_vtable): When computing `the_cname' for a
	generic instance, don't include the namespace since we'd otherwise
	add it twice.

2004-11-15  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_generic): Changed return type to void.
	(mono_class_create_generic_2): New public function; setup
	`class->method', `class->field' and `class->interfaces' here
	instead of in mono_class_init().

	* class.h (mono_class_create_generic): Moved to class-internals.h.

2004-11-14  Ben Maurer  <bmaurer@ximian.com>

	* reflection.c (mono_image_create_pefile): take a file HANDLE.
	rather than writing to memory, write to this file. Right now,
	we are just writting into a buffer, and copying that. However
	we can avoid the buffer later.

	(mono_dynamic_stream_reset): new function

	* icall.c, object-internals.h: update for the above.

2004-11-13  Ben Maurer  <bmaurer@ximian.com>

	* reflection.c: Remove *_ATOMIC macros. We really shouldn't
	have been using gc'd memory. First it is slower, unlikely
	the comment in the source code said, secondly, it increases
	our footprint to do it in the gc.

	* icall.c (WriteToFile): rename of getDataChunk. Rewrite
	the method so that it does not have to copy to managed code.

2004-11-12  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.

2004-11-12  Martin Baulig  <martin@localhost>

	* reflection.c (mono_image_create_token): Allow generic method
	definitions here, since they may appear in an `.override'; see
	gen-98/gen-99 for an example.

2004-11-11  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
	#69365.

	* marshal.c (mono_string_to_ansibstr): Make g_error messages more
	descriptive.

2004-11-11  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_setup_vtable): In an explicit interface
	implementation, the method name now includes the arity.

2004-11-10  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_array_full_copy): Fix warning.

2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>

	* appdomain.c: Removed look_for_method_by_name(). Use the new method
	mono_class_get_method_from_name() instead.
	
	* class-internals.h: Added two new types of wrappers. 
	Added MonoRemotingTarget enum. Added new trampoline function type, which
	takes an additional MonoRemotingTarget value as parameter, so it is
	possible to request a trampoline for a specific target.
	
	* class.c: Added new mono_class_get_method_from_name() method.
	
	* class.h: In MonoRemoteClass, we can have now to vtables, one for
	general remoting sinks and one specific for cross domain calls.
	
	* debug-helpers.c: Added new wrapper names.
	
	* icall.c: Use the new method mono_remote_class_vtable() to get the vtable
	of a remote class.
	
	* image.c: Porperly delete value objects form the remoting invoke hashtable.
	
	* marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
	with several other methods (mono_marshal_get_xappdomain_dispatch,
	mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
	and others) can generate a fast remoting wrapper for cross domain calls.
	More information can be found in docs/remoting.
	Other changes: Removed mono_find_method_by_name, and used
	mono_class_get_method_from_name instead.
	Remoting wrappers are now stored in a MonoRemotingMethods struct, which
	is stored in the remoting invoke hashtable.
	
	* marshal.h: published the new method for getting the xdomain wrapper,
	and also added a method for getting the adequate wrapper for a given
	method and target.
	
	* object-internals.h, object.c: Added a couple of methods for capying and
	cloning arrays.
	Modified mono_install_remoting_trampoline, which takes the new remoting
	trampoline that has a remoting target as parameter.
	mono_class_proxy_vtable now also takes a remoting target as parameter, and
	will return the most suitable vtable for the target.
	Added mono_remote_class_vtable, which returns the vtable of a remote class
	(which can be the normal remoting vtable or the xdomain vtable).
	
	* threads.c: the xdomain invoke and dispatch wrappers must also be
	protected against interruptions.

2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: use memmove in BlockCopyInternal when the source and
	destination arrays are the same.

2004-11-09  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoGenericContainer): Removed `method' and
	`signature', replaced them with `is_method' and `is_signature'
	flags.  Added `context'.

	* loader.c (method_from_methodspec): Take a `MonoGenericContext *'
	instead of a `MonoGenericContainer *'.

	* metadata.c (mono_metadata_generic_param_equal): Removed the hack
	for dynamic type parameters.
	(mono_metadata_load_generic_params): Setup `container->context'.

	* reflection.c (mono_reflection_setup_generic_class): Setup
	`tb->generic_container->context'.
	(do_mono_reflection_bind_generic_parameters): Use
	mono_class_inflate_generic_type() to correctly inflate types,
	rather than using our own hack just for MONO_TYPE_VAR.

2004-11-09  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_method): Small fix; don't
	crash here.

	* icall.c
	(ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
	(ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
	(ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
	(ves_icall_Type_BindGenericParameters): Likewise.
	(ves_icall_Type_get_IsGenericInstance): Likewise.
	(ves_icall_Type_GetGenericParameterPosition): Likewise.
	(ves_icall_MonoType_get_HasGenericArguments): Likewise.
	(ves_icall_MonoType_get_IsGenericParameter): Likewise.
	(ves_icall_MonoType_get_DeclaringMethod): Likewise.

2004-11-09  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_names_equal): Reenable the comparison of
	assembly versions and public key tokens. Fixes #69113.

Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>

	* metadata.c: fix bug introduced with the type cache changes
	on 2004-11-06.

Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c, domain-internals.h, marshal.c: include
	the MonoClass pointer instead of the token in exception clauses.
	* reflection.c: updates for the above and make the code not depend
	on the structure of MonoExceptionClause.

2004-11-08  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
	Add support for dynamic assemblies. Fixes #69114.

	* loader.c (mono_method_get_header): Handle icalls and pinvoke methods.

2004-11-07  Ben Maurer  <bmaurer@ximian.com>

	* class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
	since most only those methods use it. the code member of
	MonoMethodPInvoke was dead, so that can be removed too. Also,
	remove inline_count (again, not used), and move slot so that it
	can share bits with some other flags. This saves 8 bytes in the
	structure and gives us about 50 kb back for mcs helloworld.cs

	* *.[ch]: Do naming changes for the above.

	* loader.c (mono_method_get_header): Lazily init the header
	on first access.
	(mono_get_method_from_token): don't init the header here
	(mono_free_method): the header may never be allocated

	Overall, this saves 150 kb of unmanaged allocations
	for mcs helloworld.cs. That accounts for 10% of the unmanaged
	memory at runtime.
	
	* loader.c, loader.h (mono_method_get_header): new accessor.

	* *.[ch]: use the above method. Prepares us to lazily load
	the header.

	* *.[ch]: Clean up all the pesky warnings. gcc now only gives
	three warnings, which are actual bugs (see 69206).

	* class-internals.h (MonoMethod): Remove remoting_tramp. It is
	unused. Saves a cool 4 bytes / method.

2004-11-06  Ben Maurer  <bmaurer@ximian.com>

	* metadata.c (builtin_types): Add types for System.Object here.
	(mono_metadata_parse_type_full): Cache MonoType*'s that are
	for a class or valuetype from klass->this_arg or klass->byval_arg.

	On mcs for a hello world, this gets us down from 21836 MonoType's
	to 14560.

	(mono_metadata_free_type): Account for the above change.

2004-11-06  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
	exception instead of asserting if name is null.
	(ves_icall_System_AppDomain_GetData): Ditto.

2004-11-05  Zoltan Varga  <vargaz@freemail.hu>

	(ves_icall_get_enum_info): Avoid crash when called on a non-finished
	EnumBuilder.

	* icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
	Return NULL when the domain does not have entry_assembly set.

	* icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
	Add a 'resource_modules' argument.
	(ves_icall_type_GetTypeCode): Fix typecode of byref types.

	* reflection.c (mono_reflection_create_runtime_class): Move setting
	of wastypebuilder here, so mono_get_type_object () returns a MonoType
	for enums too.

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
	(ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
	Throw an ArgumentNullException if 'ptr' is null.

	* appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
	assemblies here. Fixes #69020.

2004-11-05  Geoff Norton  <gnorton@customerdna.com>

	* reflection.c (build_compressed_metadata): Fix the previous patch for
	big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
	the stack.

2004-11-04  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_names_equal): Allow a match if one of
	the cultures is false. Fixes #69090.

	* reflection.c (build_compressed_metadata): Fix invalid memory read 
	detected by valgrind.
	
	* reflection.c (mono_reflection_get_type): Avoid triggering a 
	TypeResolve multiple times for the same type. Fixes #65577.

2004-11-04  Ben Maurer  <bmaurer@ximian.com>

	* marshal.c: Avoid using ldftn to call managed functions. It is
	much slower than just a call.

	* reflection.c (mono_module_get_object): free the basename we
	allocate here from glib.
	
	* reflection.c (ensure_runtime_vtable): make sure to free
	overrides.  Also, we were allocating an array of MonoMethod not an
	array of MonoMethod*.

	* marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.

	* image.c (mono_image_close): free image->guid here.

2004-11-02  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: Fix some spec conformance issues with the PE file
	structures so mcs compiled apps run on the Net 2.0 beta.

2004-11-01  Zoltan Varga  <vargaz@freemail.hu>

	* string-icalls.c (ves_icall_System_String_ctor_encoding): 
	Implement this. Fixes #67264.

	* debug-helpers.h debug-helpers.c marshal.c: Move 
	mono_find_method_by_name to debug-helpers.c.

2004-10-31  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_release_type_locks): type_initialization_hash is
	a GHashTable.

	* reflection.c object.c object-internals.h: Fix warnings.

	* icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
	without accessors. Fixes #61561.

	* appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
	application base from the root domain if not set. Fixes #65641.
	(mono_runtime_init): Fix warning.

2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: call mono_thread_pool_init.
	* threadpool.[ch]: new mono_thread_pool_init that sets the max. number
	of worker threads based on the number of CPUs and the environment
	variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
	for non-windows (windows) systems.

2004-10-27  Chris Toshok  <toshok@ximian.com>

	* mono-debug-debugger.c (write_class): don't call mono_class_init
	here, as even with the check for (!klass->init_pending), we get
	into a situation where we're hitting cycles in class
	initialization.  Fixes #68816.

2004-10-25  Zoltan Varga  <vargaz@freemail.hu>

	* image.c: Avoid overwriting values in the loaded_images_hash when an
	assembly is loaded multiple times. Fixes #61152.

	* assembly.c (mono_assembly_names_equal): Compare the cultures as well,
	so multiple satellite assemblies for the same name can be loaded.
	Fixes #68259.

	* mono_domain_assembly_preload: Actually return the loaded assembly, 
	not NULL.

	* icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
	(ves_icall_type_is_assignable_from): Ditto. Fixes #68582.

	* gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
	pending finalizers are not invoked after the appdomain has been 
	unloaded. Fixes #67862.

2004-10-22  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_runtime_invoke): Don't box valuetypes.

2004-10-22  Chris Toshok  <toshok@ximian.com>

	* mono-debug-debugger.c (do_write_class): handle .cctors too, and
	don't hide private methods.

2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Allows the runtime to "share" (when known) the public key
	token of an assembly. This avoid the need to recalculate the token 
	(from the public key) in managed code.

2004-10-21  Chris Toshok  <toshok@ximian.com>

	* debug-helpers.c (append_class_name): argh, revert last patch.
	
2004-10-21  Chris Toshok  <toshok@ximian.com>

	* debug-helpers.c (append_class_name): use '+' as the delimiter,
	not '/', so that it matches what the debugger uses to look up
	methods.

2004-10-21  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_throw_exception): New
	public method; this is called each time an exception is thrown and
	allows the debugger to use exception catch points.

2004-10-21  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_handle_exception): Write
	the stack pointer and the exception object in some struct and pass
	that to the debugger.

2004-10-21  Chris Toshok  <toshok@ximian.com>

	* mono-debug-debugger.c (do_write_class): add instance/static
	event support.  We don't expose "raise" or "other" yet.
	(event_is_static): new method.

2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>

	* mono-debug-debugger.c
	(mono_debugger_handle_exception): Remove
	bogus return value for fussy compilers.

2004-10-20  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c
	(mono_debugger_unhandled_exception): Added `gpointer stack' argument.
	(mono_debugger_handled_exception): Likewise.

2004-10-20  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerEvent): Added
	MONO_DEBUGGER_EVENT_EXCEPTION.

	* mono-debug-debugger.c (mono_debugger_handle_exception): New
	public function to send the debugger a notification for an
	exception and inform it about a catch/finally clause.

2004-10-19  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
	Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
	fix 2.95 build.	

	* icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.

2004-10-18  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
	marshalled as [In,Out]. Fixes #58325.

2004-10-14  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_method_body_get_object): Implement some fields.

2004-10-12  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_bind_generic_parameters): Small
	fix, correctly retrieve our parent from a generic instance.

2004-10-12  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_metadata_generic_param_equal): We always have
	an owner.

	* class.c
	(mono_class_from_generic_parameter): We need to have an owner.
	(my_mono_class_from_generic_parameter): Likewise.

	* reflection.c (mono_reflection_setup_generic_class): Renamed to
	mono_reflection_create_generic_class() and added a new
	mono_reflection_setup_generic_class().	
	(mono_reflection_initialize_generic_param): If we're a nested
	generic type and inherited from the containing class, set our
	owner to the outer class.

2004-10-11  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.

	* reflection.c (mono_method_body_get_object): New function to create
	a MethodBody object.

	* object-internals.h object.h: Add MonoReflectionMethodBody structure.

2004-10-11  Martin Baulig  <martin@ximian.com>

	* metadata.c (_mono_metadata_type_equal): Renamed to
	do_mono_metadata_type_equal() and made static.

2004-10-11  Martin Baulig  <martin@ximian.com>

	* appdomain.c: Bump corlib version number to 28.

2004-10-10  Martin Baulig  <martin@ximian.com>

	* class-internals.h
	(MonoGenericInst): Added `MonoGenericContainer *container'.
	(MonoGenericMethod): Likewise.
	(MonoGenericContext): Likewise.
	(MonoGenericParam): Added `MonoGenericContainer *owner'.

	* metadata.c
	(do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
	(do_mono_metadata_parse_generic_inst): Likewise.
	(mono_metadata_parse_type_full): New public method.  This is the actual
	mono_metadata_parse_type() implementation - with an additional
	`MonoGenericContainer *' argument.
	(mono_metadata_parse_array_full): Likewise.
	(mono_metadata_parse_signature_full): Likewise.
	(mono_metadata_parse_method_signature_full): Likewise.
	(mono_metadata_parse_mh_full): Likewise.
	(mono_type_create_from_typespec): Likewise.
	(mono_metadata_interfaces_from_typedef_full): New public method;
	this is similar to the other _full() methods, but we take a
	`MonoGenericContext *' since we have to pass it to mono_class_get_full().
	(mono_metadata_parse_generic_param): Take an additional
	`MonoGenericContainer *' argument and lookup the MonoGenericParam
	from that container.
	(mono_metadata_generic_param_equal): New static method to compare
	two type parameters.
	(_mono_metadata_type_equal): New static method; takes an
	additional `gboolean signature_only' argument - if true, we don't
	compare the owners of generic parameters.
	(mono_metadata_signature_equal): Call _mono_metadata_type_equal()
	with a TRUE argument - do a signature-only comparision.

	* loader.c: Use the new _full() methods and pass the
	MonoGenericContainer to them.

	* object-internals.h (MonoReflectionTypeBuilder): Added
	`MonoGenericContainer *generic_container' field.
	(MonoReflectionMethodBuilder): Likewise.

2004-10-08  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
	case initial images of dynamic assemblies.

	* reflection.c (mono_image_basic_init): Set 'initial_image' field.

	* metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.

	* reflection.c (mono_reflection_event_builder_get_event_info): Fix
	length of event->other array.
	(typebuilder_setup_events): Ditto.

	* domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
	'assembly_by_name' and add an 'assemblies' list.

	* assembly.h assembly.c: Add a new search hook for determining whenever
	an assembly is already loaded. Use this instead of searching in the
	loaded_assemblies list.

	* domain.c appdomain.c: Implement the new search hook so loaded 
	assemblies are now scoped by appdomain. Fixes #67727.

2004-10-07  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (mono_thread_attach): Initialize synch_lock field so
	mono_thread_detach works again.

	* loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
	'lib' too. Fixes #63130.

2004-10-06  Jackson Harper  <jackson@ximian.com>

	* culture-info-tables.h: regenerated.

2004-10-06  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
	implemented by other interfaces in the result. Fixes #65764.
	
	* icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
	Handle unloadable modules without crashing.

	* image.c (load_modules): Revert the previous patch since modules must
	have a fixed index inside the array.
	
	* image.c (load_modules): Don't include native modules in the modules
	array.

2004-10-05  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h: Add param_defaults field.

	* reflection.c: Add support for parameter defaults in dynamic methods.
	Fixes #64595.

	* icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
	an empty string when a type has no namespace. Fixes #64230.

2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>

	* tabledefs.h: Added "internal" security actions to support non-CAS
	permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
	Note: they do not seems to be used anymore in 2.0 (new metadata format)

2004-10-04  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_InternalInvoke): Throw an exception when calling
	constructor of abstract class. Fixes #61689.

2004-10-04  Martin Baulig  <martin@ximian.com>

	* class-internals.h (MonoGenericContainer): New type.
	(MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
	`MonoGenericContainer *generic_container'.
	(MonoClass): Replaced `gen_params' and `num_gen_params' with
	`MonoGenericContainer *generic_container'.

	* metadata.c (mono_metadata_load_generic_params): Return a
	`MonoGenericContainer *' instead of a `MonoGenericParam *';
	removed the `num' argument.

2004-10-03  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
	for dynamic images.

	* object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
	machine fields.

	* metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.

	* reflection.c: Save pe_kind and machine values into the generated
	image file.

	* appdomain.c: Bump corlib version number.

	* object-internals.h: Reorganize layout of LocalBuilder.

	* class-internals.h class.c (mono_class_get_implemented_interfaces): 
	New helper function.

	* icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
	created MonoType for dynamic types. Fixes #66180.

2004-10-02  Ben Maurer  <bmaurer@ximian.com>

	* threadpool.c: the ares hashtable needs a critical section around it.
	this prevents some nasty segfaults

2004-10-02  Massimiliano Mantione  <massi@ximian.com>

	* process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
	on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
	bug 67324).
	
2004-09-30  Zoltan Varga  <vargaz@freemail.hu>

	* object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
	
2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>

	* image.c: Always canonicalize image file names, to avoid loading
	the same assembly twice when referenced using a relative path.

2004-09-30  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.h marshal.c icall.c: Fix bugs in previous patch.

	* marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.

	* marshal.c: Fix warnings.

2004-09-29  Geoff Norton  <gnorton@customerdna.com>

	* marshal.c (mono_ftnptr_to_delegate): This method was improperly
	attempting to marshal the delegate_trampoline as the method_addr.
	This patch has a static hashtable of marshalled delegates so that 
	we can map delegate_trampoline addresses back to delegates.  This
	allows a delegate passed to managed code to be passed back into native
	code.  Fixes #67039

2004-09-28  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: Add GetFunctionPointerForDelegateInternal icall.

	* reflection.c (method_encode_code): Align method headers properly.
	Fixes #66025.

2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>

	* marshal.c: In the runtime invoke wrapper, reset the abort
	exception if it is cached. This avoids the automatic rethrowal of 
	the exception after the catch of the wrapper. Also check for pending
	interruptions before calling the managed method. This is done using
	the new method emit_thread_force_interrupt_checkpoint, since the
	normal checkpoint method is ignored when running the invoke wrapper.
	* object.c: If the abort exception is rethrown, set the abort_exc
	field of the thread, so it will be rethrown aftere every catch.
	* threadpool.c: Only run an interruption checkpoint if what has been
	requested is a stop of the thread (aborts will be ignored).
	* threads.c: By default, a thread will now never be interrumped while
	running the runtime invoke wrapper (this ensures that runtime_invoke
	will always return to the caller if an exception pointer is provided).
	There is a new special method mono_thread_force_interruption_checkpoint()
	to force an interruption checkpoint even if running a protected
	wrapper, which is used by the same runtime invoke wrapper to do a check
	at a safe point.

2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>

	* object.c, object-internals.h: Implemented mono_release_type_locks,
	which releases the cctor locks held by a thread.
	* threads.c, threads.h: In thread_cleanup, release cctor locks held
	by a thread. Added mono_thread_exit() method to be used to safely stop
	a thread.

2004-09-28  Raja R Harinath  <rharinath@novell.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
	Move null check before dereference.  Avoid indexing beyond the end
	of the 'modules' array.

2004-09-28  Raja R Harinath  <rharinath@novell.com>

	* metadata-internals.h (MonoImage): Add module_count field.
	* image.c (load_modules): Set image->module_count.
	(mono_image_load_file_for_image): Use image->module_count.
	* reflection.c (mono_image_load_module): Append to image->modules array 
	of dynamic assembly.
	(mono_module_get_object): Fix loop to actually increment index.
	Use image->module_count.
	* assembly.c (mono_assembly_load_references): Use image->module_count.
	* icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
	Likewise.

2004-09-28  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
	Avoid assert on generic types.

2004-09-26  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.

	* reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.

	* reflection.c (mono_reflection_marshal_from_marshal_spec): New 
	function to convert a MarshalSpec structure to its managed counterpart.

	* reflection.c: Fix warnings.
	
	* object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
	field.

	* icall.c (mono_create_icall_signature): Fix build.

2004-09-25  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: Add MakePointType icall.

	* icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
	warnings.

2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: reuse allocated slots in the queue.

2004-09-24  Zoltan Varga  <vargaz@freemail.hu>

	* object-internals.h (MonoReflectionDllImportAttribute): New structure.

	* icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.

	* reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
	previous change.

	* tabledefs.h: Add constants for pinvoke attributes BestFit and
	ThrowOnUnmappableChar.

	* icall.c (ves_icall_Type_GetPacking): New icall.

2004-09-24  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.

2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	(mono_domain_set): allow setting a domain that is being unloaded.
	(mono_domain_unload): invoke the DomainUnload callbacks in the domain
	being unloaded.

2004-09-23  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
	the GetCustomAttributes icall.

2004-09-23  Martin Baulig  <martin@ximian.com>

	* object-internals.h (MonoReflectionGenericParam): Replaced
	'has_ctor_constraint', `has_reference_type' and `has_value_type'
	with `guint32 attrs'.

2004-09-23  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.

2004-09-23  Martin Baulig  <martin@ximian.com>

	* object-internals.h (GenericParameterAttributes): New enum.

2004-09-23  Zoltan Varga  <vargaz@freemail.hu>

	* object-internals.h (MonoEventInfo): Add 'other_methods' field.
	
	* class.c (init_events): Fill out event->other field.

	* class.c: Fix warnings.

	* icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.

Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* class-internals.h, icall.c, loader.c, loader.h: added a faster stack
	walk which doesn't supply the IL offset.

2004-09-22  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_setup_internal_class): If we're
	System.ValueType, System.Object or System.Enum, set
	`klass->instance_size' and create the vtable.
	(mono_reflection_create_internal_class): If we're an enum type,
	get the base class from our current corlib.

2004-09-22  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h (MonoResolveTokenError): New type.

	* icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
	icall.

	* icall.c: Add an 'error' argument to the ResolveToken icalls.

2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>

	* icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
	Support also calling constructors, but only for already allocated objects.

2004-09-17  Geoff Norton <gnorton@customerdna.com>

	* reflection.c (type_get_qualified_name): If the klass is null
	return the typename to avoid a NullRefEx.
	(encode_cattr_value): Get the qualified name of the boxed type,
	not the underlying enumtype.  Fixes #62984.

2004-09-21  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c: Fix problems with previous checkin.

2004-09-21    <vargaz@freemail.hu>

	* marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
	existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.

	* marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.

2004-09-21  Geoff Norton <gnorton@customerdna.com>

	* icall.c (ves_icall_MonoType_GetElementType): GetElementType
	should only return a type for pointers, arrays, and passbyref types.
	Fixes bug #63841.

2004-09-21  Martin Baulig  <martin@ximian.com>

	* domain.c (mono_debugger_check_runtime_version): New public
	function.

	* icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.	

2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>

	* reflection.c: Added missing sort to the declarative security 
	attributes table. MS implementation stops seeing the attributes if the
	token number regress in the table (as shown by ildasm and permview).

2004-09-20  Zoltan Varga  <vargaz@freemail.hu>

	* object-internals.h (MonoReflectionModule): Add 'token' field.
	
	* reflection.c (mono_reflection_get_token): Add support for Module
	and Assembly.
	(mono_module_get_object): Set 'token' field.
	(mono_module_file_get_object): Set 'token' field.

	* icall.c: Add new Assembly and Module icalls.

	* appdomain.c: Bump corlib version.

2004-09-19  Zoltan Varga  <vargaz@freemail.hu>

	* loader.h loader.c class.h class.c: Add helper functions for obtaining
	tokens of metadata objects.

	* reflection.h reflection.c (mono_reflection_get_token): New function
	to obtain the token of a metadata object.

	* icall.c: Add icalls for MetadataToken and ModuleHandle methods.

2004-09-17  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
	
	* loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.

2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
	* object-internals.h: Added 3 MonoArray* members to MonoReflection
	AssemblyBuilder to access the permissions set in the class lib.
	* reflection.c: Added security attributes encoding step in 
	mono_image_build_metadata.
	* tabledefs.h: Added new security actions defined in 2.0:
	LinkDemandChoice, InheritanceDemandChoice and DemandChoice.

2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>

	* threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
	macro parameter.

2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
 
	* locales.c: nullify the ICU_collator member of CompareInfo when it is
	  finalized. There where random SIGSEVs at program termination, when
	  an object being finalized was trying to do a string comparison and
	  the current culture was already finalized.
 
2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: call thread_cleanup before finishing the thread if we get
	there.

2004-09-16  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
	assemblies from the parent. Fixes #65665.

2004-09-15  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.c (mono_metadata_parse_type): Fix parsing of custom
	modifiers.

2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>

	* reflection.h: add prototype for mono_get_dbnull_object
	* reflection.c: add prototypes for get_default_param_value_blobs 
	and mono_get_object_from_blob for fussier compilers

2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
 
	* object.c: Added a "done" flag to TypeInitializationLock. This avoids
 	false deadlock checks in class initialization.
 
2004-09-13  Zoltan Varga  <vargaz@freemail.hu>

	* image.c (mono_image_addref): Fix comment.

	* metadata.c (mono_metadata_parse_type): Avoid memory allocations if
	possible.

2004-09-12  Jambunathan K  <kjambunathan@novell.com>

	* reflection.c (mono_param_get_objects): Modified to return
	ParameterInfo.DefaultValue object.

	(get_default_param_value_blobs):
	(mono_get_object_from_blob):
	(mono_get_dbnull_object): New helper routines. 

	* object.c (mono_get_constant_value_from_blob): New helper routine
	carved out from get_default_field_value ()

	* object-internals.h (mono_get_constant_value_from_blob): Added
	function declaration.

2004-09-11  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
	referenced assemblies. Fixes #62135.

	* exception.h exception.c (mono_get_exception_file_not_found2): New
	helper function.

2004-09-10  Zoltan Varga  <vargaz@freemail.hu>

	* class.h class.c: Add mono_type_get_underlying_type ().

2004-09-09  Geoff Norton <gnorton@customerndna.com>

	* icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
	Fix GetTypes() to support dynamically created assemblies.

2004-09-09  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
	
	* reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
	previous patch.

	* reflection.h reflection.c loader.c: Allow dynamic construction of
	pinvoke methods. Fixes #65571.
	
	* reflection.c (mono_reflection_get_type): Revert previous change since
	it causes regressions.

2004-09-08  Martin Baulig  <martin@ximian.com>

	* class.c (class_compute_field_layout): Don't call
	mono_class_layout_fields() for open generic instances.

2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
	* threads.c appdomain.c: fix typo in GC macro

2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: don't call mono_thread_detach() in start_wrapper(),
	avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.

2004-09-08  Zoltan Varga  <vargaz@freemail.hu>

	* image.c (mono_image_close): Applied patch from 
	vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
	assembly is loaded multiple times from data.
	
	* image.c (mono_image_open): Fix warning.

2004-09-07  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h reflection.c icall.c: Only call TypeResolve handlers
	once. Fixes #58334.
	
	* reflection.c (mono_reflection_create_runtime_class): Initialize
	klass->nested_classes. Fixes #61224.

Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* threads.c: sched_yield() on exit, to allow threads to quit.

2004-09-07  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_unhandled_exception): Remove leftover debug code.

2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>

	* appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none

2004-09-07  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_array): Really null terminate string arrays.
	
	* marshal.c (emit_marshal_string): Fix freeing of unicode strings.

2004-09-06  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_marshal_array): Null terminate string arrays.
	
	* marshal.c (raise_auto_layout_exception): Fix warning.

	* reflection.c (mono_param_get_objects): Initialize the default value
	with DBNull.Value, not null. Fixes #62123.

2004-09-01  Miguel de Icaza  <miguel@ximian.com>

	* marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
	throw an exception with a cute explanation.

2004-09-06  Dick Porter  <dick@ximian.com>

	* process.c (ves_icall_System_Diagnostics_Process_Start_internal):
	Close the new process's thread handle, as we don't use it.  The
	handle stays around forever otherwise.

2004-09-06  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (arith_overflow): Fix warning.

	* reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
	calling conventions in method refs. Fixes #65352.

	* reflection.c: Fix warnings.

2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>

	* icall.c: Add a new icall for Array.Clear

2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>

	* object.c: When allocating an array, we have to throw
	an overflow exception if any of the lengths are < 0.

2004-09-06  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.h marshal.c: Free unmanaged memory allocated by managed code
	properly. Also move implementation of string array marshalling to 
	managed code. Fixes #42316.

2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c: provide more information when loading an assembly fails.

2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* filewatcher.c: don't expect the development fam package to be
	installed.

2004-09-03  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c: Make a copy of the signature cookie since it will be
	freed by the caller.
	
	* marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.

	* marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.

	* metadata.c (mono_metadata_free_marshal_spec): New function to free
	marshal specs.

	* marshal.c: More refactoring.
	
	* marshal.c: Refactor the mono_marshal_get_native_wrapper function into
	smaller functions.

2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>

	* object.c: In mono_message_invoke, fill the output parameter array after
	  calling the managed method (it was done before the call). This fixes
	  bug #59299.

2004-09-02  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
	as well.

2004-09-02  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_instance_size): Don't allow generic type
	definitions or open generic instances.
	(mono_class_array_element_size): If we're a value type, call
	mono_class_instance_size() on the original class.

	* metadata.c (mono_type_size, mono_type_stack_size): Correctly
	handle generic instances.

	* mono-debug-debugger.c (write_type): Handle generic instances
	like classes.

2004-09-02  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
	the allocation request fails. Fixes #65089.

	* object.c (mono_runtime_free_method): Do not call mono_free_method.
	
	* object.c (mono_runtime_free_method): New function to free a dynamic
	method.

	* marshal.c (mono_delegate_free_ftnptr): New function to free the
	delegate trampoline.

	* marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
	with hasthis as dynamic,

	* icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.

	* domain.c (mono_jit_info_table_remove): New function to remove an
	entry from the jit info table.

	* class-internals.h (MonoMethod): Add 'dynamic' field.

	* loader.c: Fix warnings.

2004-09-01  Martin Baulig  <martin@ximian.com>

	* mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
	instead of mono_debugger_lock() because the latter one is a no-op
	unless running in the debugger.

2004-09-01  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (class_compute_field_layout): Classes with auto-layout or
	reference fields are not blittable.
	
2004-09-01  Dick Porter  <dick@ximian.com>

	* icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
	mono_image_get_filename() to get the assembly location.

	* icall.c:
	* metadata.h: Fix compile warnings

2004-09-01  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (class_compute_field_layout): System.Object is blittable.

	* marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
	as in/out. Fixes #59909.

2004-09-01  Martin Baulig  <martin@ximian.com>

	* metadata.h (MONO_TYPE_ISREFERENCE): Call
	mono_metadata_generic_inst_is_valuetype() if we're a generic
	instance to check whether our underlying type is a reference type.

2004-09-01  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_type_size): If we're a generic instance, call
	mono_class_value_size() for value types.

2004-08-31  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c: Implement more custom marshalling functionality. Fixes
	#64915.

Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* mono-debug.c, debug-mono-symfile.c: add some locking love.

2004-08-30  Zoltan Varga  <vargaz@freemail.hu>

	* domain-internals.h domain.c: Add a per-domain jump trampoline hash.

	* icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.

	* icall.c: Fix some warnings.

	* threads.c (abort_appdomain_thread): Fix unref errors.
	(mono_thread_current): Fix THREAD_DEBUG define.

2004-08-29  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.

	* icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.

2004-08-28  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
	string arrays.

2004-08-28  Martin Baulig  <martin@ximian.com>

	* metadata.c
	(mono_metadata_generic_inst_is_valuetype): New public function.

	* metadata.h (MONO_TYPE_ISSTRUCT): Call
	mono_metadata_generic_inst_is_valuetype() if we're a generic
	instance to check whether our underlying type is a valuetype.

2004-08-26  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
	#63768.

2004-08-25  Martin Baulig  <martin@ximian.com>

	* loader.c (mono_get_method_from_token): Abstract methods can also
	be generic and thus have type parameters.

	* metadata-internals.h
	(MonoDynamicImage): Added `GPtrArray *gen_params'.

	* reflection.c (mono_image_get_generic_param_info): Don't create a
	metadata row, just add an entry to the `gen_params' array.
	(build_compressed_metadata): Sort the `gen_params' array and then
	actually create the metadata.

2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: remove unneeded 'if' around mono_monitor_enter.

2004-08-25  Zoltan Varga  <vargaz@freemail.hu>

	* debug-helpers.c: Handle MONO_TYPE_GENERICINST.

2004-08-24  Martin Baulig  <martin@ximian.com>

	* class.cs (mono_class_is_subclass_of): Like an interface, a
	generic instance also derives from System.Object.

2004-08-23  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
	custom modifiers to be in any order. Fixes #61990.

2004-08-20  Zoltan Varga  <vargaz@freemail.hu>

	* object.c: Register mono_object_new_fast icall.
	
	* object.c (mono_class_get_allocation_ftn): Return to calling
	mono_object_new_fast, since it seems faster to compute the object 
	size in unmanaged code than passing it as a parameter.

	* object.c (mono_class_get_allocation_ftn): Add marshalbyref case.

	* gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
	this function with Boehm as the oom handler, so we don't have to check
	the result of GC_malloc.

	* object.c: Remove checks for oom.

	* object.h object.c (mono_class_get_allocation_ftn): New function to
	return the icall which can be used to allocate an instance of a given
	class. 

	* object.c: Handle common allocation requests using GC_gcj_fast_malloc.

	* class-internals.h: Add 'enabled' field.

2004-08-19  Zoltan Varga  <vargaz@freemail.hu>

	* domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().

2004-08-18  Jambunathan K  <kjambunathan@novell.com>
	* tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
	value 0x0010.

2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>

	* appdomain.c: use the Tls function for appdomain too,
	at Zoltan's request. Actually return in mono_context_get

	* appdomain.c, profiler.c, threads.c: use __thread

2004-08-18  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c threads.c: Call GC_CreateThread on windows.

	* Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
	multiple libraries since this don't work on windows.

2004-08-18  Martin Baulig  <martin@ximian.com>

	* class-internals.h
	(MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
	MonoMethodHeader.

	* metadata.h (MonoMethodHeader): Moved the `gen_params' field to
	MonoMethodNormal since we also need it for abstract and interface
	methods.

	* reflection.c
	(build_compressed_metadata): Sort the GenericParam table.
	(mono_image_create_token): Added `gboolean create_methodspec'
	argument; this is false when generating a MethodImpl token.
	(reflection_methodbuilder_to_mono_method): Abstract and interface
	methods may also have generic parameters.

2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>

	* appdomain.c: thread local alloc

2004-08-17  Martin Baulig  <martin@ximian.com>

	* appdomain.c: Bumped MONO_CORLIB_VERSION to 24.

	* icall.c
	(ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
	argument.

	* class.c (mono_type_get_full_name): New public function.
	(mono_type_get_name): Don't include the type arguments.

2004-08-16  Zoltan Varga  <vargaz@freemail.hu>

	* Makefile.am: Build static versions of libmetadata and libmonoruntime
	for inclusion into the mono executable.

2004-08-16  Martin Baulig  <martin@ximian.com>

	* metadata.c (do_mono_metadata_parse_generic_inst): Store the
	MonoGenericInst, not the MonoType in the `generic_inst_cache'.

2004-08-14  Martin Baulig  <martin@ximian.com>

	* class.c (dup_type): Also copy the `byref' field.

2004-08-15  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (create_dynamic_mono_image): Revert the last change 
	since it breaks bootstrap.

2004-08-14  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (create_dynamic_mono_image): Set ref_count to 1.

	* image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
	not free them with g_free.

2004-08-11  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_setup_internal_class): Also call
	mono_class_setup_mono_type() if we already have a `tb->type.type'.

2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
	called during default (first) AppDomain creation. Keep track of
	Evidence when loading assemblies.

Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* opcodes.c, opcodes.h: reduce runtime relocations.

Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* culture-info.h, locales.c: fixes and chages to sue the new
	optimized format of the locale data.
	* culture-info-tables.h: regenerated.

2004-08-06  Geoff Norton <gnorton@customerdna.com>
	
	* filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher

2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
	ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
	* domain-internals.h: icall declaration.
	* icall.c: icall registration.
	* object-internals.h: New fields in MonoAssembly for CAS.

2004-08-05  Duncan Mak  <duncan@ximian.com>

	* verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
	CEE_LDELEM_ANY.

Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix to deal with object[] arrays in custom ctors
	(bug #62550).

2004-08-05  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_array_element_size): Added support for
	generic instances and correctly handle "recursive" types.

2004-08-05  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c: Fix warnings.

2004-08-04  Martin Baulig  <martin@ximian.com>

	* class.c
	(mono_type_get_name_recurse): Added `gboolean include_arity'
	argument specifying whether or not we should include the generic
	arity in the type name.
	(_mono_type_get_name): New static function.
	(mono_class_setup_vtable): If we're a generic instance, don't
	include the generic arity in the names of explicit method
	implementations.	

2004-08-03  Martin Baulig  <martin@ximian.com>

	* class.c (mono_type_get_name_recurse): Enclose the generic type
	arguments in `<', '>'.

Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* gc.c: make GC warning messages use the trace API, they are just
	noise to most of the users.

2004-08-03  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c (read_string): Correctly read the string.

2004-07-30  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (signature_dup_add_this): Fix bug in previous patch.
	
	* marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
	icalls.
	(mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.

2004-07-30  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
	Reflect latest symbol writer changes.	

Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* object.c: always create an object if null is passed
	to Invoke() where a valuetype is expected.

2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>

	* marshal.c (mono_marshal_init): make managed
	signatures match native ones better for 64bits.

2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: hack to build correctly the private bin path on windows.
	Fixes bug #61991.

2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>

	* assembly.c: Load mscorlib from the correct framework directory
	  (mono/<version>/mscorlib.dll).
	* appdomain.h: Added prototypes for new functions.
	* internals.h: Added some prototypes.
	* domain.c: When initializing the runtime, get from the executable and
	  the configuration files the runtime version that the app supports.
	  Added support methods for reading app.exe.config. Added list of versions
	  supported by the JIT. Added two new methods: mono_init_from_assembly,
	  which initializes the runtime and determines the required version from
	  the provided exe file, and mono_init_version, which initializes
	  the runtime using the provided version.
	* icall.c: Get machine.config from version-specific directory.
	* reflection.c: When generating an image, embed the version number
	  of the current runtime.

2004-07-28  Dick Porter  <dick@ximian.com>

	* socket-io.c
	(ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
	returned sockaddr size before creating the remote address object.
	Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
	61608.

2004-07-28  Dick Porter  <dick@ximian.com>

	* locales.c (string_invariant_compare_char): Fix invariant char
	compares between upper and lower cases.  Fixes bug 61458.

2004-07-27  Ben Maurer  <bmaurer@ximain.com>
	
	* marshal.c: actually cache stelem.ref wrappers.
	
Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
	sections and remove the mono_cli_rva_map () function.

Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* debug-mono-symfile.c: fix one more endianess issue, from a patch
	by Geoff Norton (<gnorton@customerdna.com>).

Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* class.c: fix class loads for pointer types (typeof(int) !=
	typeof(int*)).

2004-07-27  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
	reading the debugging information from an external ".mdb" file.

2004-07-24  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_get_type_info): Only write a class
	layout entry if we actually have a size or a packing size.

2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>

	* reflection.c (type_get_fully_qualified_name): 
	insert cast to get type checking of ?: with non-gcc compilers

2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>

	* rand.c: use g_getenv for both lookups of
	MONO_EGD_SOCKET

2004-07-17  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_bind_generic_method_parameters):
	Set `gmethod->reflection_info'.

2004-07-17  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_from_typedef): Insert the newly
	created class into the hash table before computing the interfaces
	since we could be called recursively.

2004-07-16  Ben Maurer  <bmaurer@ximain.com>

	* marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
	function to implement stelem.ref in managed code
	* class-internals.h, debug-helpers.c: a new wrapper type
	for the above.

Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* gc.c: allow GC handles to work even when no GC is compiled in.
	Fix part of bug #61134 (GetAddrOfPinnedObject).

2004-07-13  Peter Williams  <peter@newton.cx>
 
 	* process.c (complete_path): Make sure we don't attempt to execute
 	directories.
 
2004-07-12  Geoff Norton <gnorton@customerdna.com>

        * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
          boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
          and will add/subtract the hour if needed

2004-07-12  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_field_get_object): If we have
	`field->generic_info', take the attributes from
	`field->generic_info->generic_type'.	

2004-07-12  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
	This function must be called before initializing the runtime.
	(mono_debug_init_1): New function; call this after initializing
	the runtime, but before loading the assembly.  It tells the
	debugger to load corlib and the builtin types.

	* mono-debug-debugger.c: Did some larger changes in the debugging
	code; support recursive class declarations, make sure we actually
	add all classes.

2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* debug-helpers.c: undo my previous patch and fixed the real issue in
	../mini/exceptions-x86.c

2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
	when no HOME env. variable was set and a NullRef was thrown in a .cctor
	called from other .cctors.

2004-07-09  Miguel de Icaza  <miguel@ximian.com>

	* loader.c: Removed the mono_loader_wine_init hack now that we are
	doing a managed version of Windows.Forms.

2004-07-09  Ben Maurer  <bmaurer@ximian.com>

	* domain.c, gc.c, marshal.c, mono-debug-debugger.c,
	threadpool.c, threads.c: remove static data from rootset.

2004-07-09  Dick Porter  <dick@ximian.com>

	* locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
	Don't do any more processing if the matched length was 0.  It was
	increasing the size of the string before.  Fixes bug 61167.

2004-07-09  Dick Porter  <dick@ximian.com>

	* socket-io.h:
	* socket-io.c
	(ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
	Add support for SO_PEERCRED if its available.

2004-07-09  Peter Bartok <pbartok@novell.com>
	* loader.c: winelib.exe.so error message is now only displayed if
	MONO_DEBUG is set. To help us avoid questions when people are trying
	out the new Managed.Windows.Forms.

2004-07-08  Zoltan Varga  <vargaz@freemail.hu>

	* class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
	for isinst and castclass wrappers.

	* class-internals.h icall.c: Move registration and lookup of JIT icalls
	to libmetadata from the JIT, so they could be used by the marshalling
	code and the interpreter.

	* marshal.c: Register marshalling related JIT icalls here instead of
	in mini.c. Use CEE_MONO_ICALL instead of the family of 
	CEE_MONO_PROC<x> opcodes to call marshalling functions.

	* metadata.h: Remove unneeded marshalling conversions.

	* opcodes.c: Update for new opcodes.
	
2004-07-08  Martin Baulig  <martin@ximian.com>

	* mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
	(mono_debug_get_domain_data): Make this function static.

Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* gc.c, object.h: add nice GC handle API for embedders.

2004-07-06  Ben Maurer  <bmaurer@ximian.com>

	* reflection.c: more changes for the new api

	* object.c: When we reflect on a field w/ a constant value, it
	will not have a memory location, so we must access metadata. Also,
	allow easier reading of strings so that we can read them from
	the constant data.

	* class.c (mono_class_layout_fields): no need for literal fields here.

	* class-internals.h: api changes for const fields

	* icall.c (ves_icall_get_enum_info): use new apis for const fields

2004-07-06  Martin Baulig  <martin@ximian.com>

	* mono-debug.h: Increment version number to 44.

	* mono-debug.c (mono_debug_add_wrapper): The second argument is
	now a gpointer, rewrote this whole method.

	* mono-debug-debugger.c (mono_debugger_add_wrapper): New
	function.  Add information about the wrapper in a new "misc table".

	* mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
	for the new misc table.

2004-07-05  Zoltan Varga  <vargaz@freemail.hu>

	* metadata-internals.h image.c: Add a cache for helper signatures.

	* monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.

2004-07-03  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Handle returning
	delegates from a delegate. Fixes #61033.
	
	* marshal.c: Fix managed->native stringbuilder marshalling. Implement
	marshalling of stringbuilder arrays. Fixes #59900.

2004-07-02  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: Add EnumBuilder:setup_enum_type icall.

2004-06-30  Ben Maurer  <bmaurer@ximian.com>

	* icall.c: Added a new icall for the property version of
	OffsetOfStringData.

2004-06-30  Zoltan Varga  <vargaz@freemail.hu>

	* class-internals.h (MonoVTable): Make max_interface_id a guint32 so
	it has a constant size across platforms.

	* marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
	stack trace.

2004-06-29  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_add_method): Protect the whole function
	in mono_debugger_lock(), not just parts of it.

Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: make sure padding bytes in heaps are zeroed.

2004-06-24  David Waite  <mass@akuma.org>

	* appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
	image.c, loader.c, locales.c, marshal.c, metadata.c,
	mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
	string-icalls.c, threads.c: change to C90-style comments from C99 /
	C++ -style

2004-06-24  Dick Porter  <dick@ximian.com>

	* threads.c
	(ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
	return createdNew.  Fixes bug 60412.

	* threads-types.h: 
	* icall.c: Add createdNew parameter to CreateMutex icall

Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c, object-internals.h: save default value in params.

2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: for paths in PrivateBinPath that are absolute, there's
	no need to build a new path combining that with the application base.
	Fixes bug #60442.

Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixed minor standard compliance issues.

Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixed issue with encoding some custom attributes
	(arrays in properties and fields, bug #60411).

2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c: fix start address when copying the public key token.

2004-06-23  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
	the `exc' object in a static object to put it into the GC's root set.

Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: make mono_reflection_setup_internal_class ()
	callable a second time to setup a new parent class.

2004-06-23  Dick Porter  <dick@ximian.com>

	* threads.c: Check for WAIT_IO_COMPLETION return values.

2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.c: Removed the g_free on the public key token. Now copy 
	the pk token string into the MonoAssemblyName buffer using g_strlcpy.
	* assembly.c: Added public key token string value when loading 
	assemblies. Fix bug #60439.
	* icall.c: Added missing informations (like public key) in 
	GetReferencedAssemblies. Fix #60519.
	* image.h: Changed definition for public key token from const char*
	public_tok_value to guchar public_key_token [17];
	* reflection.c: Updated for changes to public key token.

2004-06-22  Lluis Sanchez Gual

	* icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
	for the field in base classes.

Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
	mark headers as not supported, they are installed only for use by the
	debugger.

Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* *.c, *.h: avoid namespace pollution in public headers.

2004-06-21  Martin Baulig  <martin@ximian.com>

	* exception.c (mono_get_exception_security): It's in
	"System.Security", not in "System".

	* mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
	the exception classes.

2004-06-21  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_unhandled_exception):
	Protect the exception object from being finalized.

2004-06-21  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (mono_debugger_unhandled_exception): New
	public function.

2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>

	* reflection.c: Load the assembly in mono_reflection_type_from_name,
	if it was not loaded before. Fix parts of #60439.

Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
	code that was broken since Ben's change: wrappers are now
	dependent on the method signature only again.

2004-06-21  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (write_class): Cleaned this up a bit and
	added interface support.

2004-06-21  Martin Baulig  <martin@ximian.com>

	* class.c (mono_vtable_get_static_field_data): New public method.

2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>

	* filewatcher.c : Windows build fix to be compliant with API changes.

Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: more accessors.
	* metadata.h, metadata.c: prepare for hiding MonoType and
	MonoMethodSignature: people should use the accessors from now on
	outside of the tree.

Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* *.c, *.h: more API cleanups.

2004-06-18  Jackson Harper  <jackson@ximian.com>

	* assembly.c: Trace loading assemblies.
	* loader.c: Trace loading native libraries.
	* mono-config.c: Trace loading config files.
	
2004-06-18  Dick Porter  <dick@ximian.com>

	* locales.c: Tell ICU the lengths of strings, it can cope with
	embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.

Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* image.c: swapped name/filename;

2004-06-18  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (write_class): Write the parent class at
	the end of the header.

Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* *.c, *.h, Makefile.am: more API cleanups and bugfixes.

2004-06-17  Raja R Harinath  <rharinath@novell.com>

	* Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
	(bundle_obj): New conditional define.
	(BUILT_SOURCES): Remove.
	($(bundle_srcs)): Make parallel-make safe.
	(libmonoruntime_la_LIBADD): Make unconditional.
	(libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
	(libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).

2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: It was inconsistent with the latest
	  supp info files.

2004-06-17  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_open): Fix crash when the assembly can't
	be loaded.

	* threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
	with gcc 2.95.

Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* threads.h, icall.c, object.c, threadpool.c, threads-types.h:
	cleaned up public header threads.h.

Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, *.c, *.h: more API cleanups.

Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* Makefile.am: removed monosn from compilation.
	* appdomain.c, assembly.c, assembly.h, blob.h, class.c,
	debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
	image.c, image.h, loader.c, marshal.c, metadata-internals.h,
	metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
	mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
	reflection.c, reflection.h, verify.c: more API cleanups and fixes.

2004-06-15  Jackson Harper  <jackson@ximian.com>

	* assembly.c: Make locales lower case when searching the GAC for
	assemblies. gacutil will always make locales lowercase when
	installing so this effectively makes them case insensitive.
	
2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>

	* locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
	* monitor.c: New method mono_monitor_try_enter_internal, which takes a new
	  parameter which allows to choose whether the wait can be interrupted or 
	  not. Also added the method mono_monitor_enter(), which locks the monitor
	  using an infinite wait and without allowing interruption.
	  In the Monitor.Enter and Wait icalls, retry the lock if the wait is
	  interrupted.
	* object.h: Added new fields in MonoThread. suspend_event holds the event
	  used to susped/resume the thread. synch_lock is the lock object to use for
	  modifying the thread state.
	* threads.c: Use the new synch_lock object for locking, instead of "this",
	  which can generate deadlocks.
	  Moved thread state change in Thread.Sleep and Thread.Join from managed
	  to unmanaged code. This avoids a deadlock when the thread was suspended
	  just after acquiring the thread lock.
	  In general, use mono_monitor_enter instead of mono_monitor_try_enter.
	  Implemented Thread.Suspend using an event instead of ThreadSuspend,
	  which is not fully implemented in the io-layer.
	* socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.

Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
	threads-types.h: more API cleanups.

Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
	domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
	threadpool.c, threads.c: first pass at the exported API cleanup.

Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.

2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added internalGetHome.

2004-06-14  Dick Porter  <dick@ximian.com>

	* file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
	possible to return successfully when '.' or '..' were the only
	entries in a directory, but were skipped.  The MonoIOStat was not
	filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
	Fixes bug 59574.

Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: make binaries run on .Net 1.1 by default.

Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().

Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* marshal.c: keep track of struct size with explicit layout
	(bug #59979).

2004-06-12  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Comment out a debugging g_message().

Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h: do not free custom attrs that are cached.
	* icall.c: use braces to make code clearer.

2004-06-11  Martin Baulig  <martin@ximian.com>

	* class.h (MonoInflatedField): New type.
	(MonoClassField): Replaced `MonoType *generic_type' with
	`MonoInflatedField *generic_info'.

	* icall.c
	(ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.

2004-06-11  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_create_method_token): Correctly encode
	varargs methods.

2004-06-11  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_metadata_parse_method_signature): When parsing
	a MethodDef which has VarArgs, also set sentinelpos if we don't
	have any parameters.

2004-06-11  Martin Baulig  <martin@ximian.com>

	* verify.c (mono_method_verify): In CEE_CALL, use
	mono_method_get_signature() to get the method's signature, unless
	we're a PInvoke method.

2004-06-10  Jackson Harper  <jackson@ximian.com>

	* assembly.c: Use <path>/lib/mono/gac for the extra paths
	lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
	logical name as the supplied path is just a prefix to the gac not
	the direct path to it.
	
Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* reflection.c: make the token for a created method match
	the token of the MethodBuilder it was created from
	(IKVM requires this behaviour now).

Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
	reflection.c, socket-io.c: leak fixes.

Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* icall.c: handle sentinel pos in vararg methods in position different
	from 0.

2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* culture-info-tables.h: freshly generated.

2004-06-09  Martin Baulig  <martin@ximian.com>

	* loader.c (mono_get_method_constrained): Call `mono_class_init
	(constrained_class)'.	

2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>

	* icall.c (ves_icall_MonoType_GetEvent): Handle events without
	any methods. Fixes #59629.

2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: reflecting locale-builder updates.

2004-06-08  Dick Porter  <dick@ximian.com>

	* object.h:
	* locales.c: Fixed compile warnings, including a real bug in
	CompareInfo_internal_compare.
	
2004-06-08  Dick Porter  <dick@ximian.com>

	* locales.c
	(ves_icall_System_Globalization_CompareInfo_internal_index):
	(ves_icall_System_Globalization_CompareInfo_internal_index_char):
	Double-check the resuls of usearches, because ICU currently
	ignores most of the collator settings here.  Fixes bug 59720.
	
2004-06-08  Dick Porter  <dick@ximian.com>

	* locales.c
	(ves_icall_System_Globalization_CompareInfo_internal_index_char):
	Fix memory leak and segfault-causing typo.  No idea how this one
	lasted so long without being noticed.

2004-06-09  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_GetEvents_internal): Handle events without
	any methods. Fixes #59629.

2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c:
	(mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
	own the critical section before). Removed dead code (that's done
	in the preload hook).

	(mono_assembly_load_with_partial_name): call the preload hook.

2004-06-08  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_metadata_signature_alloc): Default
	`sentinelpos' to -1.

	* reflection.c (mono_image_get_array_token): Likewise.

2004-06-08  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.

	* metadata.c (mono_metadata_parse_method_signature): When parsing
	a MethodDef which has VarArgs, set sentinelpos.

	* metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
	`gint16' since we're using -1 for non-varargs methods.

	* reflection.c
	(ReflectionMethodBuilder): Added `MonoArray *opt_types'.
	(method_encode_signature): Added varargs support.
	(method_builder_encode_signature): Likewise.
	(mono_image_get_varargs_method_token): New static method.
	(mono_image_create_method_token): New public method; this is
	called via an icall instead of mono_image_create_token() when
	calling a varargs method.	

2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>

	* locales.c: Fixed memory leak in Char.ToLower/ToUpper.

2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h : Reflecting the latest locale-builder that
	  fixed empty array representation ({} to {0}).

2004-06-07  Jackson Harper  <jackson@ximian.com>

	* assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
	looking up extra gac paths. This allows MONO_GAC_PATH to act
	exactly like a prefix.
	
2004-06-08  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_type_from_name): Make a copy of the
	type name before modifying it. Fixes #59405.

2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info.h: added fields for "all datetime patterns".
	* locales.c: (  ves_icall_System_Globalization_CultureInfo
	  _construct_datetime_format ()): fill xxx_patterns fields.
	* object.h: added fields for "all datetime patterns" to
	  MonoDateTimeFormatInfo.
	* culture-info-tables.h: reflecting locale-builder updates.

2004-06-08  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
	the event has no add and remove methods. Fixes #59629.

2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>

	* object.c: Fixed possible integer overflow when allocating large
	strings.

2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: reflecting locale-builder updates.

2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: reflecting locale-builder updates.

2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: reflecting locale-builder updates.

2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>

	* threads.c: Made Thread.Sleep abortable.

2004-06-02  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.

	* debug-mono-symfile.h: Bumped symbol file version number to 37.

2004-05-31  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.

2004-05-30  Jackson Harper  <jackson@ximian.com>

	* reflection.c: Do not hardcode assembly versions or public key
	tokens anymore. All of this except the corlib section was dead
	code anyways.
	
2004-05-29  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_runtime_invoke_array): Automatically create boxed
	objects for byref valuetypes if needed. Fixes #59300.
	
	* object.c (mono_method_return_message_restore): Handle 
	MONO_TYPE_OBJECT as well.

2004-05-28  Jackson Harper  <jackson@ximian.com>

	* reflection.c: The modified type encoding was causing build
	problems. Reverted for now.
	
2004-05-28  Jackson Harper  <jackson@ximian.com>

	* reflection.c/h: Take an assembly ref so that we dont create
	fully qualified names when encoding types in the same assembly as
	the custom attribute being emitted.
	* appdomain.c: Increment version number.
	
2004-05-26  Duncan Mak  <duncan@ximian.com>

	* icall.c
	(ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
	Set the full version number (major, minor, build, revision).

2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>

	* marshal.c (emit_struct_conv): increment src/dst after blit
	(mono_marshal_get_managed_wrapper,
	mono_marshal_get_native_wrapper): make sure we have marshalling
	info before marshalling params (info computation affects
	blittable)

	* class.c (class_compute_field_layout): correctly deal with
	blittable
	(mono_class_layout_fields): Don't do gc_aware_layout for AUTO
	value types (as per what windows dows by default)
	(mono_class_setup_mono_type): System.ValueType is blittable
	(mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
	blittable

	* marshal.c (mono_marshal_load_type_info): flag types  as
	non-blittable if the native layout doesn't match the managed
	layout

2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: don't add stuff in the private search path that is
	above the application base. If application base is not set, there's
	no private search path.

2004-05-28  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
	byref struct arguments in native->managed marshalling.

2004-05-28	Patrik Torstensson	<totte@hiddenpeaks.com>

	* marshal.c (mono_marshal_get_runtime_invoke): correctly
	cache methods using signature (special case for methods
	that are value type or string class)
	
	* image.c (mono_image_close): clean up allocated GSList's
	in runtime_invoke_cache.

2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* mono-config.c: set the correct path for mono_cfg_dir on windows when
	there's no MONO_CFG_DIR environment variable defined.

2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: windows version must be >= 0x0500 to include OpenThread.

2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>

	* threadpool.c: Really wait for 500ms after the async call, even if the wait
	  is interrumped.
	* threads.c: In mono_thread_manage, call OpenThread to ref each handle
	  before waiting for it, and call CloseHandle after the wait to unref it.
	  This will make sure that handles are not disposed too early.

2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	* appdomain.h:
	* icall.c: removed
	ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
	needed now.

	* object.c: se the application_base only for the domain that runs
	Main. Fixes bug #59216,

2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	* object.c: only the domain in which Main is run have
	SetupInformation.ConfigurationFile set, so moved a few lines from
	appdomain.c to object.c.

2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: we tried to load [name].(dll|exe), but according
	to bug #57710, we must also try [culture]/[name].(dll|exe) and
	[culture]/[name]/[name](dll|exe). This patch fixes the bug.
	There's a test case attached to bug #58922.

2004-05-27  Dick Porter  <dick@ximian.com>

	* icall.c:
	* file-io.c: Implemented icalls for locking and unlocking regions
	in a file.
	(ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
	FALSE on error (fixes both compiler warning and real bug.)

2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: reflecting locale-builder updates.

	  (Added missing ChangeLog entry for 05/26)

2004-05-27  Jackson Harper  <jackson@ximian.com>

	* locales.c: Fix some cut and paste errors.
	
2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* mono-config.c: set the correct path for config. directory on windows.

2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>

	* icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
	  on win32.

2004-05-26  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Free strings returned
	from pinvoke functions.
	
	* marshal.c (mono_ftnptr_to_delegate): Implement this.

2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: reflecting locale-builder updates.

2004-05-26  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
	#59086.

2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>

	* appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
	* icall.c: Modified icalls for RNG.
	* rand.c|h: Changed RNG interface to allow thread-safe usage under 
	Windows (CryptoAPI).

2004-05-25  Zoltan Varga  <vargaz@freemail.hu>

	* locales.c: Fix build.

2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>

	* culture-info-tables.h: reflecting locale-builder updates.

2004-05-25  Jackson Harper  <jackson@ximian.com>

	* locales.c: When creating the current culture use the $LANGs
	specific culture. So DateTimeFormat and NumberFormat entries are created.
	
2004-05-25  Zoltan Varga  <vargaz@freemail.hu>

	* string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
	a char array as parameter.

2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>

	* image.c: In mono_image_open(), always use an absolute path name to
	  look for already loaded images.

2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
	missing in the windows build (like older cygwin include files).

2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Fixed check for possible integer overflow in Buffer_
	BlockCopy icall. Replaced comments style // by /* */.

2004-05-22  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_ftnptr_to_delegate): Fix warning.
	
	* marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
	check after MONO_VTADDR. Fixes pinvoke2.exe.

	* marshal.h marshal.c metadata.h: Add beginnings of support for
	ftnptr -> delegate marshalling.

2004-05-21  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
	* threads.c: Fix warnings.

2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>

	* appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
	* icall.c: Registered icalls for Suspend and Resume.
	* locales.c: Beware, mono_monitor_try_enter can now be interrupted by
	  Thread.Abort.
	* monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
	* mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
	* process.c: Use WaitForSingleObjectEx.
	* threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
	  checkpoints.
	* threads.c, threads.h: Make use of new Ex wait methods. Improved
	  implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
	  for Suspend and Resume. Added new mono_thread_stop, used for stoping
	  background threads. Added basic support for Abort in Windows.
	  Start new threads using a managed delegate invoke wrapper. This wrapper
	  has an interruption checkpoint that is needed since an interruption
	  can be requested before the thread leaves the unmanaged code that starts 
	  the thread.
	* marshal.c: Added interruption checkpoint after every native call, and
	  also before managed calls for wrappers called from unmanaged code to
	  go into managed code.
	* object.h: Added new field in MonoThread to keep track of interruption
	  requests.

2004-05-20  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
	calls.

2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	* assembly.c:
	* gc.c:
	* locales.c:
	* mono-config.c:
	* rand.c: getenv -> g_getenv (windows!)

	* process.c: complete_path is also used on non-windows platforms.

2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: new signature for Process_Start.

	* process.[ch]: new signature for Process_Start. If we're on windows
	and UseShellExecute is false, we have to search for the program by
	ourselves if we don't get a full path.

2004-05-18  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
	marshalling and call CleanUpNativeData if needed. Fixes #58646.

2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
	Fixes bug #58373.

2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.c: use double quotes to quote program name and arguments on
	windows. Fixes bug #58575.

2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.c: don't return "." and ".." when using windows Find*File.

2003-05-17	Patrik Torstensson <totte@hiddenpeaks.com>

	* marshal.c: Don't pass wrappers to message init because method 
	addressed used to lookup metadata. part of remoting[2|3] fix.

2004-05-15  Jackson Harper  <jackson@ximian.com>

	* assembly.c: Remove user gac and implement MONO_GAC_PATH, this
	path is essentially the same as MONO_PATH except that it points to
	GACs instead of lib directories.
	* loader.h: The user gac is gone so we dont need function to
	enable/disable it.
	* mono-config.c: user gac option is now gone.
	
2004-05-15  Jackson Harper  <jackson@ximian.com>

	* culture-info.h: Make defines more consistent, add calendar data
	to the culture info table.
	* culture-info-tables.h: Add basic calendar data. Basically
	everyone gets default gregorian until all the data is
	updated.
	* locales.c: Use the new consistent defines. Set calendar data for
	culture info objects.
	* object.h: add a field for calendar data to CultureInfo
	
2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>

	* image.c: image->runtime_invoke_cache is keyed on signatures now.
	* marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
	a signature.
	(mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
	(mono_marshal_get_runtime_invoke): The runtime invoke method now takes
	an extra param that is the pointer of the method to invoke. The IL for
	the invoke method is no longer specific to the method, but to the
	signature of the method. Thus, we can share the same code for multiple
	methods. This reduces the number of methods that have to be compiled.

2004-05-14  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* icall.c: Optimize Buffer.BlockCopy.

2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* culture-info-tables.h: seems like Spanish and Portuguese cultures had
	DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
	quote). Changed them to "MMMM yyyy".

2004-05-12  Miguel de Icaza  <miguel@ximian.com>

	* rand.c
	(ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 

2004-05-13  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h: Updated after changes to managed structures.

	* appdomain.c: Bump corlib version.

2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: also add libmonoos to libmetadata. Fixes the build on
	windows.

2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: link to ../os/libmonoos.la on windows.

	* assembly.c:
		-If MONO_DEBUG, warn about non-existing directories in
		MONO_PATH.
		-Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
		compile time variable.
		-Removed init_default_path and call mono_set_rootdir from
		libmonoos.a instead (windows only).

	* assembly.h: declare mono_assembly_getrootdir().

	* domain.c:
	* icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.

	* loader.c: s/getenv/g_getenv/

2004-05-11  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.{h,c}: Add support for UnmanagedType.AsAny.

	* marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.

	* metadata.h: Add new marshalling conversions.

	* metadata.h metadata.c (mono_metadata_signature_dup): New helper
	function.

	* reflection.c (mono_reflection_get_type): Lookup the type in all
	modules of a multi-module assembly. Fixes #58291.

2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>

	* threads.c: Before aborting a background, set the StopRequested
	state.  This avoids throwing the Abort exception.
	In mono_thread_manage, don't continue with the shutdown until all
	aborted threads have actually stopped.

2004-05-10  Jackson Harper  <jackson@ximian.com>

	* locales.c: Remove the modifier from culture names.
	
2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: monosn is not installed any more. It has been deprecated
	in favor of sn.

2004-05-07  Jackson Harper  <jackson@ximian.com>

	* locales.c
	(ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
	Fix array construction, add bailout if the length is 0.

2004-05-07  Dick Porter  <dick@ximian.com>

	* socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
	machine doesn't have a DNS entry.  Patch by Urs Muff
	(umuff@quark.com), fixes bug 57928.

2004-05-06  Jackson Harper  <jackson@ximian.com>

	* reflection.c: Handle null PublicTokens properly. alloc mem for
	assembly names culture so we dont crash when freeing it.
	
2004-05-06  Jackson Harper  <jackson@ximian.com>

	* assembly.c: Check the usergac when loading with partial names.
	
2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>

	* rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
	does nothing for now (not required for Linux/Windows) but the class
	library can call it (and a newer or modified runtime could need it).
	* icall.c: Registred icall.

2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* loader.c: prints a message on module loading error we set MONO_DEBUG
	environment variable.

2004-05-05  Jackson Harper  <jackson@ximian.com>

	* appdomain.c: Handle PublicKeyToken=null properly.
	
2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>

	* environment.c|h: Added icall ves_icall_System_Environment_
	GetOSVersionString to get the current OS version as a string.
	* icall.c: Registred icall.

2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>

	* object.c: in mono_object_get_virtual_method(), take into account that
	non-virtual methods don't have a slot in the vtable. Check needed when
	the object is a proxy.

2004-05-05  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
	(Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.

	* object.c (mono_class_compute_gc_descriptor): Fix warning.

	* object.c (mono_runtime_invoke_array): Add an assert so null cannot be
	passed when a valuetype is expected.

	* object.c (mono_unhandled_exception): Only set the exit code if the
	exception happens in the main thread. Fixes thread5.exe.

	* appdomain.c (get_info_from_assembly_name): Fix infinite loop on
	invalid names. Fixes #58047.

2004-05-03  Jackson Harper  <jackson@ximian.com>

	* assembly.c: This line was committed accidently and is unneeded.
	
2004-05-03  Jackson Harper  <jackson@ximian.com>

	* icall.c: Add new icall for Assembly::LoadWithPartialName
	* assembly.c/.h: new function that probes the GAC to load partial
	assembly names by Paolo Molaro.
	
2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
	* reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
	(type_get_fully_qualified_name): Added PublicKeyToken when building a
	full type name.

2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: fixed check for 'neutral' culture and removed warning.
	* reflection.c: fix bug when parsing a full type name and Version is not
	the last thing in the string.

2004-05-03  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
	crashes when it is freed.

2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c: print the compat warning to stderr.

2004-05-01  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c (mono_assembly_load_references): Add a compatibility
	hack to run old applications that might be still referencing the
	3300-based assemblies, only do this for System.xxx.

2004-05-01  Jackson Harper  <jackson@ximian.com>

	* appdomain.c: If the culture is neutral we set it to "".
	
2004-04-29  Jackson Harper  <jackson@ximian.com>

	* locales.c: Add some missing MONO_ARCH_SAVE_REGS'.

2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
 
 	* string-icalls.c: added low overhead function for copying chars
 	* icall.c: added needed icall for the above function
 
2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: fix return value of get_global_assembly_cache.  Implemented
	Environment.GetLogicalDrives.

2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>

	* rand.c: try and talk to egd or prngd
	for random bytes if opening devices fail.

2004-04-28  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_load_type_info): Calculate the minimum
	alignment for the type using the native alignment of its members 
	instead of using klass->min_align.

	* metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.

2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.c:
	* socket-io.c: added check for sys/aio.h.

2004-04-28  Dick Porter  <dick@ximian.com>

	* threads.c: Don't abort a thread thats already aborting, when
	terminating everything.

2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added 2 new async calls for Socket.

	* socket-io.[ch]: fixed some warnings. Added support for asynchronous
	IO on *nix systems.

	* threadpool.c: removed unused variable.

2004-04-27  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.

Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* locales.c: put back string_invariant_tolower () and
	string_invariant_toupper ().

2004-04-26 David Waite <mass@akuma.org>

	* file-io.h:
	* socket-io.h:
	* threads.h:
	* unicode.h: remove comma from end of enumeration declarations

2004-04-26 David Waite <mass@akuma.org>

	* debug-mono-symfile.h:
	* decimal.c:
	* mono_debug.h:
	* sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)


2004-04-26  Jackson Harper  <jackson@ximian.com>

	* appdomain.c: Increment version number.
	
2004-04-26  Jackson Harper  <jackson@ximian.com>

	* appdomain.c: Set assembly references public token value when
	PublicKeyToken is specified, not the hash_value. Free public token
	values when free assembly name data. Previously the public key
	token was hex decoded, however we are using hex encoded public key
	tokens, so this is not neccasary.
	* assembly.c: Lookup assemblies in the gac if their public token
	value is set. Add function to allow enabling user gac
	lookups. Specify whether or not the assembly was loaded from the
	GAC. Compare full assembly names when checking the cache for
	assemblies (Temporarily disabled see comment in code). Remove
	mscorlib -> corlib mapping cruft. Add trace-loading. When a user
	specifies trace-loader they get extra info to stdout on the
	loading of assemblies.
	* image.h: Add a field for an assembly references public token
	value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
	whether an assembly has been loaded from the GAC.
	* image.c: Remove a corlib -> mscorlib name mapping.
	* loader.h: Add function to enable/disable the user gac.
	* mono-config.c: Check if the usergac is enabled in the config
	file.
	* icall.c: New icall to determine whether or not an assembly has
	been loaded from the GAC. Remove some mscorlib -> corlib mappings.
	* tabldefs.h: Add constant for assemblyref flag that specifies a
	full public key is used instead of a public token.
	* reflection.c: Remove mscorlib -> corlib mappings. Set
	PublicTokenValue instead of hash value. This value is a hex
	string so it does not need to be expanded.

2004-04-26  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_initialize): Set
	`mono_debugger_initialized' before calling mono_debug_lock().

2004-04-42  Robert Shade <rshade@dvsconsulting.com>

	* icall.c: icalls for Char.ToUpper/ToLower are now hooked to
	  InternalToUpper/InternalToLower.
	* locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
	  removed invariant culture shortcut.  This is now done in managed code.
	* locales.c: (string_invariant_toupper/tolower) removed.

2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added GetSupportsAsync for Socket (same as MonoIO).
	Added Poll internal call.

	* socket-io.[ch]: _wapi_socket == WSASocket. Added internal
	call for Poll. Select was too heavy for polling a single socket.

	* threadpool.[ch]: added mono_threadpool_cleanup.
	* threads.c: use it. Don't use Thread_Abort on windows.

2004-04-23  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.

2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Registred new icalls for key pair protection and added an
	icall for Environment.GetFolderPath on Windows.
	* security.c|h: Added new icalls for key pair protection.

2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: don't display the non-supported family warning for known
	families. Now this is not displayed on windows when checking support
	for IPv4/IPv6.

2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* class.c: don't display the layout warning for static fields.

2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>

	* icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
	* locales.c, locales.h: Added new icalls for culture-specific
	Char.ToLower and Char.ToUpper.

2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: the 2nd argument when aborting a thread is NULL now. Patch
	by David Waite.

2004-04-20  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
	of the type name before passing it to mono_reflection_type_from_name().

2004-04-19  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Handle different string
	encodings here. Fixes #56965.

2004-04-18  Bernie Solomon <bernard@ugsolutions.com>

	* icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
	fix test on strstr result not that I can see anything that
	relies on the result.

2004-04-18  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
	Fixes #57081.

	* marshal.c (mono_marshal_get_string_encoding): New helper function.

	* marshal.c (mono_marshal_get_native_wrapper): Use the new helper
	function to determine which marshalling to use for strings. Fixes
	#56965.

	* marshal.c (mono_marshal_string_array_to_unicode): Fix warning.

	* reflection.c (encode_marshal_blob): Add support for LPARRAY.

2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>

	* icall.c: #include mono-config.h

2004-04-15  Jackson Harper  <jackson@ximian.com>

	* culture-info-tables.h: Fix date formats for en-US culture.
	
2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>

	* icall.c: Registered icalls for ThreadPool.GetMinThreads and 
	ThreadPool.SetMinThreads.
	* threadpool.c: Implemented ThreadPool.GetMinThreads and
	ThreadPool.SetMinThreads.

Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* mono-config.c: also load the .config file in the directory
	where the assembly was found.

Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>

	* assembly.c: load per-assembly config files.
	* icall.c: decrapified code to get the config dir and moved to
	mono-config.c.
	* image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
	per-assembly config files. When doing a dll map lookup give precedence
	to the per-assembly data.

2004-04-14  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerEvent): Removed
	MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
	and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.

	* mono-debugger-debugger.c: While the debugger is locked, remember
	whether the symbol tables have changes and send one single
	MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.

2004-04-14  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.

	* marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
	function.

	* marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
	account when marshalling string arrays. Fixes #56965.

2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>

	* icall.c: Add new icalls mapping for security.
	* security.c|h: Add internal calls for WindowsIdentity,
	WindowsImpersonationContext and WindowsPrincipal.

2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)

	* class.c: Added comment to ensure the System.MonoDummy class
	is removed when no longer necessary

2004-04-13  Miguel de Icaza  <miguel@ximian.com>

	* appdomain.c: Pass arguments to the bootstraping exceptions to
	minimize JITed methods at boot

	* metadata.c (mono_exception_from_name_two_strings): Allow for the
	second string to be null.

	* icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
	Change the protocol to minimize the JIT methods at startup.  Now
	it Returns the internal codepage, if the value of "int_code_page"
	is 1 at entry, and we can not compute a suitable code page
	number, returns the code page as a string.

2004-04-13  Jackson Harper  <jackson@ximian.com>

	* culture-info-tables.h: Fix number of decimal digits for all
	english locales.

2004-04-13  Jackson Harper  <jackson@ximian.com>

	* icall.c: Clairfy out of sync error message. It is not always
	your corlib that is out of sync.

2004-04-13  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
	properties when only the set accessor is overriden. Fixes #55874.

2004-04-09  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_load_references): Make this thread safe.
	Fixes #56327.

2004-04-08  Zoltan Varga  <vargaz@freemail.hu>

	* monosn.c: Add missing initialization calls.

2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>

	* locales.c:
	ves_icall_System_Globalization_CultureInfo_construct_number_format
        Fix g_assert so it compiles on fussier compilers re int/ptr
	mismatch

2004-04-08  Dick Porter  <dick@ximian.com>

	* socket-io.h:
	* socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
	53992.  Also rearrange the code so that the internal calls return
	an error value and exceptions are thrown from managed code.

	* icall.c: Add type info to the socket icalls.

2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
	owes me a beer.

2004-04-07  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_from_generic_parameter): Don't default
	`klass->parent' to `mono_defaults.object_type'.

2004-04-07  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_initialize_generic_parameter): Set
	`param->pklass->reflection_info'.	

2004-04-07  Jackson Harper  <jackson@ximian.com>

	* culture-info-tables.h: Fix date separator symbol.
	
2004-04-07  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
	from System.Type to System.MonoType.

2004-04-07  Martin Baulig  <martin@ximian.com>

	* reflection.h
	(MonoReflectionGenericParam): Added `has_reference_type' and
	`has_value_type' fields.

	* reflection.c (mono_image_get_generic_param_info): Encode the
	correct flags if we have the `class' or `struct' constraint.

2004-04-07  Martin Baulig  <martin@ximian.com>

	* reflection.h
	(MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.

2004-04-07  Jackson Harper  <jackson@ximian.com>

	* appdomain.c: Revert extra patches, just wanted to bump the
	version number.
	
2004-04-07  Jackson Harper  <jackson@ximian.com>

	* Makefile.am: Add culture-info private headers.
	* icall.c: Add new icalls for contructing locales.
	* locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
	* locales.h: Declare new culture info construction methods.
	* object.h: Add new fields used to avoid the CultureMap to
	MonoCultureInfo.
	* culture-info.h: Definition of structs used in the culture info
	tables.
	* culture-info-tables.h: Autogenerated tables that contain culture
	info data. This file was generated with the locale-builder tool.
	* appdomain.c: Incement corlib version number.
	
2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>

	* appdomain.c: (mono_runtime_init) move mono_thread_init
	to before mono_object_new calls so critical sections
	are initialized before use.

2004-04-07  Martin Baulig  <martin@ximian.com>

	* icall.c
	(ves_icall_TypeBuilder_define_generic_parameter): Removed.
	(ves_icall_MethodBuilder_define_generic_parameter): Removed.
	(ves_icall_MonoGenericParam_initialize): Removed.
	(monogenericparam_icalls): Removed.
	(generictypeparambuilder_icalls): Added new table for
	System.Reflection.Emit.GenericTypeParameterBuilder.

	* reflection.c
	(mono_reflection_define_generic_parameter): Removed.
	(mono_reflection_initialize_generic_parameter): This is now called
	from GenericTypeParameterBuilder's .ctor.

2004-04-06  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): Don't inflate nested classes in a
	generic instance.
	(mono_type_get_name_recurse): Include the generic arguments for
	generic instances and generic type declarations.
	(inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
	(_mono_class_get_instantiation_name): Removed.
	(mono_class_create_generic): Always use `gklass->name' as our name.

	* class.h (MonoGenericInst): Removed `nested_in', and `nested'.

	* icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
	(ves_icall_MonoGenericInst_GetNestedTypes): Removed.
	(ves_icall_MonoMethod_GetGenericParameters): Renamed to
	ves_icall_MonoMethod_GetGenericArguments() and correctly handle
	closed generic methods here.

	* reflection.c
	(mono_reflection_generic_inst_get_nested_types): Removed.
	(inflate_mono_method): Copy the generic parameters from the
	MonoMethodHeader into out MonoGenericMethod.

2004-04-06  Martin Baulig  <martin@ximian.com>

	* row-indexes.h
	(MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.

	* metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".

	* reflection.c (build_compressed_metadata): If we have any entries
	in the GenericParam, MethodSpec or GenericParamConstraint tables,
	set the header version to 1.1.

2004-04-06  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): If we're a generic instance,
	initialize our nested classes, too.
	(_mono_class_get_instantiation_name): Deal with the new `!%d'
	suffix.	

2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.c: quote the argument passed to the shell on windows.

2004-04-05  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (mono_alloc_special_static_data): Allow this to be
	called during startup.

2004-04-02  Martin Baulig  <martin@ximian.com>

	* icall.c
	(ves_icall_MonoGenericInst_GetDeclaringType): New icall.

2004-04-02  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: Fix build.

2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>

	* Makefile.am: Added security.c|h.
	* icall.c: Added icall for get_UserName;
	* security.c: New file for security related icalls. Added function
	get_UserName for System.Environment (fix #56144).
	* security.h: New. Header file for security.c

2004-04-02  Dick Porter  <dick@ximian.com>

	* icall.c: Deleted the icalls that were obsoleted some time ago
	by the ICU string code, and which were mixed into the icall
	rearranging.  Fixes bug 55969.

	* string-icalls.h: 
	* string-icalls.c: Deleted the code that those icalls reference.

2004-04-01  Martin Baulig  <martin@ximian.com>

	* metadata.h (MONO_CLASS_IS_INTERFACE): New macro.

	* class.c (mono_class_from_generic_parameter): Don't set 
	TYPE_ATTRIBUTE_INTERFACE.
	(my_mono_class_from_generic_parameter): Likewise.

2004-04-01  Martin Baulig  <martin@ximian.com>

	* loader.c (find_method): Added an optional `MonoClass *ic'
	argument to search in a specific interface.
	(mono_get_method_constrained): New public function.

2004-04-01  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_get_generic_field_token): Use the
	`handleref' cache here.

2004-04-01  Martin Baulig  <martin@ximian.com>

	* reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.

	* reflection.c (create_generic_typespec): Use the `typespec' hash
	here, not the `typeref' one.	

2004-04-01  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_type): Moved the
	functionality into a new static inflate_generic_type() which
	returns NULL if it didn't do anything.  Only increment the
	`mono_stats.inflated_type_count' if we actually inflated
	something.
	(mono_class_get_full): Check the classes type to see whether we
	need to inflate it; also inflate MONO_TYPE_(M)VAR.

2004-04-01  Jackson Harper  <jackson@ximian.com>

	* reflection.c: Set culture for assembly references.
	
2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>

	* reflection.[ch], icall.[ch], Fix support for pinning variables.

2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c:
	(do_mono_assembly_open): the critical section also covers
	mono_image_open and mono_image_open_from_data. Fixes bug #56327.

2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c:
	(mono_manage_threads): abort the background threads when finishing.
	Fixes bug #47232.

2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* gc.c: only close the done_event handle if there was no timeout.
	C-ified comments.

2004-03-30  Martin Baulig  <martin@ximian.com>

	* icall.c (icall_entries): It's called "System.Activator", not
	"System.Activation".	

2004-03-30  Martin Baulig  <martin@ximian.com>

	* class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
	(mono_class_create_from_typespec): Likewise.

2004-03-30  Martin Baulig  <martin@ximian.com>

	* reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
	`has_ctor_constraint' and `initialized'.

2004-03-30  Martin Baulig  <martin@ximian.com>

	* reflection.c (encode_new_constraint): New static function to add
	the constructor constraint attribute to a type parameter.
	(encode_constraints): Call encode_new_constraint() if necessary.

	* reflection.h
	(MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.

	* row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
	
2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>

	* reflection.c, icall.c: add support for pinning variables. 

2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>

	* marshal.c (mono_marshal_get_managed_wrapper):
	init bool local with zero rather than null.

2004-03-29  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
	the "official" behavior here.
	(ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.

2004-03-29  Martin Baulig  <martin@ximian.com>

	* icall.c: Reflect latest API changes.

2004-03-29  Martin Baulig  <martin@ximian.com>

	* loader.c (mono_get_method_from_token): Also call
	mono_metadata_load_generic_params () for abstract and interface
	methods; replace the type arguments in the method signature with
	the ones which are loaded from the metadata.

2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>

	* monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
	of the lock is not the current thread. MS.NET don't do it, in spite of
	what the documentation says. See bug #56157.

2004-03-28  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): Don't call init_properties() and
	init_events() for generic instances; set `prop->parent' when
	inflating properties.

	* reflection.c (mono_generic_inst_get_object): Call
	`mono_class_init (ginst->klass)'.
	(mono_type_get_object): Only create a MonoGenericInst if your
	generic type is a TypeBuilder.
	(do_mono_reflection_bind_generic_parameters): Only set
	`ginst->is_dynamic' if our generic type is a TypeBuilder.

2004-03-28  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
	Fixes #56091.

2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added Kill_internal icall.
	* process.[ch]: added Kill_internal icall.

2004-03-25  Martin Baulig  <martin@ximian.com>

	* class.h (MonoStats): Added `generic_instance_count',
	`inflated_method_count', `inflated_type_count' and
	`generics_metadata_size'.	

2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c: no warnings now.

2004-03-25  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_get_full): New public function; does a
	mono_class_get(), but also takes a `MonoGenericContext *'.

	* loader.c (mono_field_from_memberref): Renamed to
	`field_from_memberref', made static and added `MonoGenericContext *'
	argument.
	(mono_field_from_token): Added `MonoGenericInst *' argument.
	(method_from_memberef): Likewise.
	(mono_get_method_from_token): Likewise.
	(mono_get_method_full): New public function; does a
	mono_get_method(), but also takes a `MonoGenericContext *'.

	* verify.c (mono_method_verify): Get the method's generic context
	and pass it to mono_field_from_token(), mono_get_method_full() and
	mono_class_get_full().

2004-03-25  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_type): Take a
	`MonoGenericContext *' instead of a `MonoGenericInst *' and a
	`MonoGenericMethod *'.

2004-03-25  Martin Baulig  <martin@ximian.com>

	* loader.h (MonoMethodInflated): Store the MonoGenericContext
	instead of the MonoGenericMethod here.

2004-03-25  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericInst): Added `MonoGenericContext *context';
	each time we create a new MonoGenericInst, we also create a new
	context which points back to us.

	* class.c (inflate_method): Use `ginst->context' instead of
	creating a new context.

	* loader.c (method_from_memberref): Use
	`klass->generic_inst->context' instead of creating a new context.

2004-03-25  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericContext): New struct.
	(MonoGenericMethod): Removed `generic_inst'.

	* class.c (mono_class_inflate_generic_method): Take a
	`MonoGenericContext *' instead of a `MonoGenericMethod *'.

2004-03-25  Martin Baulig  <martin@ximian.com>

	* loader.h (MonoMethodInflated): New typedef.

	* metadata.h (MonoMethodSignature): Removed `gen_method', make
	`generic_param_count' consume just 30 bits, added `is_inflated'
	and `has_type_parameters' flags (one bit each).

	* class.c (mono_class_inflate_generic_method): Create a
	MonoMethodInflated instead of a MonoMethodNormal and set
	`is_inflated' in the method signature.

	* class.h (MonoGenericMethod): Removed `generic_method'.

2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>

	* image.c: Make sure the name of a MonoImage is always an absolute path.
	  This fixes bug #54415.

2004-03-24  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_setup_vtable): If we're a generic instance,
	use our generic type's vtable size.

2004-03-24  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
	MONO_NO_UNLOAD env var as a temporary workaround for unloading 
	problems.

2004-03-23  Martin Baulig  <martin@ximian.com>

	* class.h (MonoDynamicGenericInst): Added `int count_events' and
	`MonoEvent *events'.

	* icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
	(typebuilder_icalls): Added "get_event_info"; calls
	mono_reflection_event_builder_get_event_info().	

	* reflection.c (mono_reflection_generic_inst_initialize): Added
	`MonoArray *events'.
	(mono_reflection_event_builder_get_event_info): New function.

2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>

	* object.h: add mono_type_initialization_init

	* object.c (mono_runtime_class_init): 
	implement class constructor synchronization rules
	to cope with threading issues.	
	add mono_type_initialization_init

	* appdomain.c (mono_runtime_init): call 
	mono_type_initialization_init

	* class.h: removing initializing field from MonoVTable

2004-03-23  Martin Baulig  <martin@ximian.com>

	* class.c (my_mono_class_from_generic_parameter): Use
	`param->name' if it's not NULL.	

2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>

	* class.c: do not insert non-virtual methods in the vtable.
	* icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
	that means the method is non-virtual. This never would have
	happened before.

2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>

	* profiler.c: Added lock for accessing coverage_hash.

2004-03-22  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
	`method->method->signature->generic_param_count != 0' to make it
	work for interface methods.

2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.c: quote the string passed to the shell using g_shell_quote.

2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c:
	(mono_threads_manage): don't remove the finalizer thread and self
	from the threads hash table so that mono_thread_manage can be called
	more than once.

2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.c: quote the arguments when UseShellExecute is true. Fixes
	bug #55790.

2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: set mono_thread_detach as a cleanup routine for every
	thread. This way it's always executed upon thread termination, either
	aborted or finished normally. No more xsp hangs!

2004-03-17  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericInst): Replaced the `GList *nested' with an
	`int count_nested' and a `MonoType **nested'.

	* reflection.c (mono_reflection_bind_generic_parameters): Moved
	most of the functionality into a new static
	do_mono_reflection_bind_generic_parameters() and don't take a
	`MonoType *nested_in' argument any more.  Don't compute nested
	types here.
	(mono_reflection_generic_inst_get_nested_types): New public method
	to get nested types.

	* class.c (mono_class_create_generic): Set `klass->nested_in' if
	we're a nested class.

	* icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
	mono_reflection_generic_inst_get_nested_types() to compute the
	nested types.

2004-03-17  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
	descriptive error message under windows.
	
2004-03-17  Martin Baulig  <martin@ximian.com>

	* class.c (dup_type): Added `const MonoType *original' argument;
	copy the attrs from the original type.

2004-03-17  Martin Baulig  <martin@ximian.com>

	* metadata.c (do_mono_metadata_parse_generic_inst): Use the
	`m->generic_inst_cache' here.

2004-03-17  Zoltan Varga  <vargaz@freemail.hu>

	* exception.h exception.c: Add stack_overflow_exception.

2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c:
	(overlapped_callback): call SetEvent *after* invoking the callback.
	No need to call CloseHandle.

2004-03-16  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_get_fieldref_token): Take a
	`MonoReflectionField *' instead of a `MonoClassField *' and a
	`MonoClass *'; store the `MonoReflectionField *' in the hash.

2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: don't add the culture to the filename we're looking for
	if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.

2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* locales.c: don't ignore symbols when doing case insensitive compares.
	Thanks Dick! Fixes bug #54046.

	* threads.c: surround 'threads' usage with enter/leave in
	mono_thread_manage.

2004-03-16  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
	implicitly marshalled as [Out]. Fixes #55450.

	(mono_marshal_get_runtime_invoke): Zero out the result if there is
	an exception.

2004-03-16  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_from_generic_parameter): Use the actual
	parameter name.	

2004-03-16  Martin Baulig  <martin@ximian.com>

	* reflection.c (type_get_signature_size): New static function.
	Compues the size of the type in a method signature.
	(method_get_signature_size): New static function; calls
	type_get_signature_size() to compute the actual size of the
	method's signature.
	(method_encode_signature): Use method_get_signature_size() to get
	the signature's size rather than using `nparams * 10'.

2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* file-io.h: define here WapiOverlapped on windows. I don't want the
	regular OVERLAPPED one.

	* file-io.c:
	* threadpool.c: somehow, BindIoCompletionCallback is not found.
	Disabling AIO on windows.

2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
	bug #55385.

2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: upgraded corlib version.

	* file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
	and BeginWrite. Allow opening files for asynchrnous operations.

	* file-io.h: new struct that maps FileStreamAsyncResult.
	* icall.c: added new icalls.
	* process.[ch]: support setting child process environment variables
	and use the SHELL or COMSPEC when UseShellExecute is true.

	* threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
	callback for async. IO is here and also BindHandle.

	* threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
	from here.

2004-03-14  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (create_custom_attr): Allow len == 0.

	* object.c (mono_class_compute_gc_descriptor): Fix descriptor
	computation on big-endian machines.

2004-03-13  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericInst): Added `int count_ifaces'.

	* iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
	`ginst->count_ifaces' instead `klass->interface_count' since we
	may get called before the vtable is created.

	* loader.c (mono_method_get_param_names): If we're a generic
	instance, return and don't initialize the class.

	* reflection.c (mono_reflection_setup_generic_class): Don't call
	ensure_runtime_vtable().
	(mono_reflection_bind_generic_parameters): Set
	`ginst->count_ifaces'.

2004-03-11  Jackson Harper <jackson@ximian.com>

	* icall.c:
	* unicode.c:
	* unicode.h: Remove unused System.Char icalls.
	
2004-03-11  Miguel de Icaza  <miguel@ximian.com>

	* loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
	code when we P/Invoke the first library in Windows.Forms, instead
	of when we first open the assembly.

	* assembly.c: Drop the lookup from here.

2004-03-10  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_get_custom_attrs): Use the correct
	class for properties, fields and events.  Finally fixes #54945.

2004-03-10  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_metadata_class_equal): New static function;
	checks whether two generic instances or two generic parameters are
	equal.
	(mono_metadata_type_equal): Use mono_metadata_class_equal() to
	compare classes.	

2004-03-10  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericMethod): Added `gpointer reflection_info'.

	* reflection.c (inflate_mono_method): Added `MonoObject *obj'
	argument and write it into the `reflection_info' field.

	* icall.c
	(ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
	(ves_icall_MethodBase_get_HasGenericParameters): New interncall.

2004-03-09  Jackson Harper  <jackson@ximian.com>

	* char-conversions.h: use 8 bits for numeric data its all we need
	* icall.c: numeric data is only 8 bits now.

2004-03-09  Martin Baulig  <martin@ximian.com>

	* class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.

	* class.c (init_properties, init_events): Initialize the new
	`parent' field.

	* reflection.c (typebuilder_setup_properties): Likewise.
	(typebuilder_setup_events): Likewise.

	* reflection.h (MonoEventInfo): Replaced `parent with
	`declaring_type' and `reflected_type'.

	* icall.c (ves_icall_get_property_info): Distinguish between
	declaring and reflected type.
	(ves_icall_get_event_info): Likewise.

2004-03-09  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
	(ves_icall_Type_GetField): Correctly set field->klass.

2004-03-09  Zoltan Varga  <vargaz@freemail.hu>

	* loader.h: Fix warning.

2004-03-08  Miguel de Icaza  <miguel@ximian.com>

	*  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
	library routine if present.  Notice that it will still continue
	executing even if its missing, for those working on the Gtk#
	edition of Windows.Forms.

	* assembly.c (do_mono_assembly_open): If loading the
	System.Windows.Forms call mono_loader_wini_init.

2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>

	* class.h: Added MonoRemoteClass struct.
	* domain.c: Changed hash function for proxy_vtable_hash. It now uses a
	function for MonoStrings.
	* icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
	Added internal call for getting the proxy type.
	* marshal.c: Get the type of transparent proxies from its remote_class.
	Added methods that generate the IL for type checks and casts:
	mono_marshal_get_isinst, mono_marshal_get_castclass, 
	mono_marshal_get_proxy_cancast.
	* marshal.h: Declaration of the previous new methods.
	* object.c: Added new moethods for creating and updating MonoRemoteClass
	instances: mono_remote_class, mono_upgrade_remote_class, 
	* object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
	* verify.c: FIx transparent_proxy_fields layout.
	* appdomain.c: Bump corlib version.

2004-03-04  Jackson Harper  <jackson@ximian.com>

	* icall.c: Add icall to access char conversion tables.
	* char-conversions.h: Character conversion tables.
	* Makefile.am: Add char-conversions.h private header file.
	
2004-03-04  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (unload_thread_main): Increase unloading timeout to
	10 sec as a temporary workaround for Nant problems.

2004-02-29  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c: Add checks for GC_enable and GC_disable.

	* string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
	(jaak@zd.com.pl). Fix memory corruption in String.Replace 
	(bug #54988).
	
2004-02-27  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_bind_generic_parameters): Take a
	`MonoReflectionType *' instead of a `MonoType *'.

2004-02-26  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c (run_finalize): Avoid finalizing the object representing the
	finalizer thread.
	(finalizer_thread): Fix warning.

2004-02-25  Martin Baulig  <martin@ximian.com>

	* class.c (_mono_class_get_instantiation_name): Added `int offset'
	argument for nested types.
	(mono_class_create_generic): Added support for nested generictypes.

	* class.h (MonoGenericInst): Added `MonoType *nested_in' and
	`GList *nested'.

	* icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.

	* reflection.c (method_encode_signature): Increase the minimum
	value of `size' from 10 to 11.
	(mono_reflection_bind_generic_parameters): Take `int type_argc'
	and `MonoType **types' arguments instead of the `MonoArray
	*types'; added `MonoType *nested_in'.  Recursively instantiate
	nested classes.	

2004-02-23  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
	stack_overflow_ex members which are used by exception handling.

	* appdomain.c (mono_runtime_init): Initialize the new members.

	* gc.c (mono_gc_enable): New helper function.
	* gc.c (mono_gc_disable): New helper function.

2004-02-23  Martin Baulig  <martin@ximian.com>

	* icall.c: I must have been really stupid - make it actually work
	this time ;-)

2004-02-23  Martin Baulig  <martin@ximian.com>

	* loader.c (method_from_memberref): Only inflate the method if
	it's in another klass.

2004-02-23  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_type): Fixed two bugs.
	(mono_class_init): If we're a generic instance and an interface,
	compute `class->interface_id'; also create `class->interfaces'
	here and inflate them.

	* metadata.c (do_mono_metadata_parse_generic_inst): Compute
	`ginst->is_open'.
	(mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.

	* reflection.c (mono_image_create_token): Allow "MonoGenericInst".

2004-02-15  Miguel de Icaza  <miguel@ximian.com>

	* reflection.c (method_encode_code): Improved the error message
	generated by the exception.

2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: Martin did not do what he said in the ChangeLog for
	2004-02-18, but put back the changes for properties and events.
	Commenting those changes out again and adding comment to bug #54518.
	
	* process.c: removed warning.

2004-02-20  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (emit_struct_conv): Print an error message instead of
	asserting when a type does not have the StructLayout attribute.

2004-02-20  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_type_get_object): Also use the cache for
	generic instances.
	(mono_reflection_bind_generic_parameters): Always compute
	`ginst->ifaces'.	

2004-02-20  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericMethod): Removed `klass'.

	* class.c (mono_class_inflate_generic_method): Added `MonoClass
	*klass' argument.

2004-02-20  Martin Baulig  <martin@ximian.com>

	* reflection.c (method_encode_methodspec): Actually use the
	uninflated signature for the memberref.

2004-02-20  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericMethod): Removed `declaring'.

	* class.c (mono_class_inflate_generic_method): If `gmethod->klass'
	is NULL, compute it here.

2004-02-20  Martin Baulig  <martin@ximian.com>

	* image.h (MonoImage): Added `GHashTable *generic_inst_cache'.

	* metadata.c (mono_metadata_generic_inst_hash): New method.
	(mono_metadata_generic_inst_equal): New method.

	* reflection.c (mono_reflection_bind_generic_parameters): Use the
	`klass->image->generic_inst_cache' cache to avoid creating
	duplicate MonoGenericInst's.

	* class.c (mono_class_inflate_generic_type): Use the cache.

Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>

	* object.c: fixed gc descriptor calculation for embedded valuetypes.

2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added Socket.WSAIoctl icall.

	* socket-io.[ch]: implemented
	ves_icall_System_Net_Sockets_Socket_WSAIoctl.

2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>

	* icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.

2004-02-18  Urs C Muff  <umuff@quark.com>

	* debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
	this work on PPC and other big-endian architectures.

	* debug-mono-symfile.h: Prepended the names of all the `guint32'
	fields with an underscore to make sure they're only accessed by
	the read32() macro.

2004-02-18  Martin Baulig  <martin@ximian.com>

	* icall.c: Put the klass->refclass changes back for methods and
	fields, but not for properties and events.  We're currently not
	distinguishing between DeclaringType and ReflectedType for
	properties and events, that's what caused the regressions.

2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c:
	(mono_async_result_new): the handle can be NULL.

	* threadpool.c: Use an event instead of a semaphore, don't initialize
	it until needed. This saves quite a few semaphores from being created
	when using the threadpool.

2004-02-18  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_string_is_interned_lookup): Fix interning of long
	strings. Fixes #54473.

	* domain.c (ldstr_equal): Optimize if the two strings are equal.

	* icall.c: Revert the klass->refclass changes since they introduce
	regressions (bug #54518).

2004-02-18  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): If we're a generic instance and don't
	come from a TypeBuilder, inflate our members here.
	(mono_class_from_generic): Removed; just use `ginst->klass' instead.
	(mono_class_create_generic): New public method.
	(mono_class_initialize_generic): Removed.
	(get_instantiation_name): Renamed to
	_mono_class_get_instantiation_name() and made it public.

2004-02-18  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_type): Clear the new
	instance's `nginst->klass' when inflating a generic instance.
	(mono_class_is_subclass_of): Added (basic) support for generic
	instances.

Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, domain.c: use a MonoCodeManager instead of a
	MonoMempool to hold compiled native code.

2004-02-17  Martin Baulig  <martin@ximian.com>

	* class.h (MonoDynamicGenericInst): Added `count_properties' and
	`properties'.

	* reflection.c (mono_reflection_generic_inst_initialize): Added
	`MonoArray *properties' argument.

	* icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.	

2004-02-17  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_GetFields): Renamed to
	ves_icall_Type_GetFields_internal() and added a
	`MonoReflectionType *rtype' argument; pass it to
	mono_field_get_object() to set the field's "reflected" type.
	(ves_icall_Type_GetConstructors): Likewise.
	(ves_icall_Type_GetEvents): Likewise.
	(ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
	argument; pass it to mono_method_get_object() to set the method's
	"reflected" type.	

2004-02-17  Martin Baulig  <martin@ximian.com>

	* class.h (MonoDynamicGenericInst): New type.
	(MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.

	* icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
	(ves_icall_MonoGenericInst_GetConstructors): New interncall.
	(ves_icall_MonoGenericInst_GetFields): New interncall.

	* class.c (mono_class_from_generic): Don't call
	mono_class_initialize_generic() if this is a dynamic instance;
	ie. it's being created from a TypeBuilder.
	Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
	`class->byval_arg.type'.

	* reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
	to `inflate_method' and made static.
	(mono_reflection_inflate_field): Removed.
	(mono_reflection_generic_inst_initialize): New public method.

	* reflection.h (MonoReflectionGenericInst): Removed `methods',
	`ctors' and `fields'; added `initialized'.

2004-02-14  Zoltan Varga  <vargaz@freemail.hu>

	* debug-helpers.c (mono_method_full_name): Fix output for empty
	namespaces.

2004-02-12  Martin Baulig  <martin@ximian.com>

	* class.h (MonoClassField): Added `MonoType *generic_type'.

	* reflection.c (mono_image_get_fieldref_token): Added support for
	instantiated generic types.
	(field_encode_inflated_field): Removed.
	(mono_image_get_inflated_field_token): Removed.
	(mono_reflection_inflate_field): Return a `MonoReflectionField *'.

	* reflection.h (MonoReflectionInflatedField): Removed.

2004-02-12  Martin Baulig  <martin@ximian.com>

	* metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
	`gen_method' field from MonoMethodHeader to MonoMethodSignature.

	* reflection.c (mono_image_get_methodspec_token): Take a
	`MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
	(mono_image_create_token): Check whether we have a
	`method->signature->gen_method' and call
	mono_image_get_methodspec_token() if appropriate.
	(inflated_method_get_object): Removed.
	(mono_reflection_bind_generic_method_parameters): Return a
	`MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
	(mono_reflection_inflate_method_or_ctor): Likewise.

	* reflection.h (MonoReflectionInflatedMethod): Removed.

2004-02-12  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Implement proper support
	for custom valuetype marshalling.

	* icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.

2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: fixed WSAGetLastError_internal name.

2004-02-11  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (mono_thread_attach): Allow this to be called multiple
	times for a thread.
	
	* threads.c (build_wait_tids): Do not wait for ourselves.

	* threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
	appdomain list is empty.

	* marshal.c (mono_marshal_get_native_wrapper): Do not free the
	memory returned by mono_string_builder_to_utf16, since it points into
	managed memory. Thanks to Bernie Solomon for noticing this.

	* icall.c: Add AppDomainSetup icalls.

	* reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.

	* reflection.c (mono_custom_attrs_from_param): Add support for dynamic
	types.

	* reflection.c (reflection_methodbuilder_to_mono_method): Save
	custom attributes to the method_aux struct. Also fix array indexes etc.

	* loader.c (mono_method_get_param_names): Make dynamic case work again.
	
Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>

	* icall.c, loader.c: icall cleanup: we save quite a bit of memory
	(both static and runtime) and reduce startup time.

2004-02-10  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
	AsAny marshalling conversion instead of crashing.

	* marshal.c: Fix warnings.

2004-02-09  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericMethod): Added `MonoMethod *declaring'.

	* reflection.h (MonoReflectionInflatedMethod): Removed the
	`declaring' field, it's now in the unmanaged MonoGenericMethod.

	* reflection.c (method_encode_methodspec): Removed the `method'
	argument; we get it from `gmethod->declaring'.
	(inflated_method_get_object): Removed the `declaring' argument.

2004-02-09  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericMethod): New type.
	(MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
	`generic_method'.

	* metadata.h (MonoMethodHeader): Replaced the `geninst' field with
	a `MonoGenericMethod *gen_method' one.

	* class.c (mono_class_inflate_generic_type): Take an additional
	`MonoGenericMethod * argument.  This is only non-NULL if we're
	inflating types for a generic method.	
	(mono_class_inflate_generic_signature): Renamed to
	inflate_generic_signature() and made static; take a
	`MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
	(inflate_generic_header): Take a `MonoGenericMethod *' argument
	instead of a `MonoGenericInst *' one.
	(mono_class_inflate_generic_method): Likewise.

	* reflection.c (encode_generic_method_sig): Take a
	`MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
	(method_encode_methodspec): Likewise.
	(inflated_method_get_object): Likewise.	

	* reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
	field with a `MonoGenericMethod *gmethod' one.	

2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>

	* class.h (mono_class_has_parent): add parens to expansion
	so you can ! this.

2004-02-08  Martin Baulig  <martin@ximian.com>

	* image.h (MonoImage): Removed `generics_cache'.

	* class.c (mono_class_from_generic): Take a `MonoGenericInst *'
	instead of a `MonoType *' argument; removed the `inflate_methods'
	argument.  Don't inflate methods here.

	* loader.c (find_method): If it's a generic instance, call
	mono_class_init() on the `sclass->generic_inst->generic_type'.

	* metadata.c (mono_type_size): Make this work on uninitialized
	generic instances; call it on the `ginst->generic_type's class.

	* reflection.c (mono_reflection_bind_generic_parameters): Call
	mono_class_from_generic() to create the `ginst->klass'.

2004-02-08  Martin Baulig  <martin@ximian.com>

	* class.h (MonoClass): Changed type of `generic_inst' from
	`MonoType *' to `MonoGenericInst *'.

2004-02-08  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_BindGenericParameters): Just call
	mono_type_get_object(), this is now creating a `MonoGenericInst'
	for MONO_TYPE_GENERICINST.
	(ves_icall_MonoGenericInst_GetParentType): Likewise.
	(ves_icall_MonoGenericInst_GetInterfaces): Likewise.

	* reflection.c (mono_type_get_object): Return a `MonoGenericInst'
	instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
	(inflated_method_get_object): Added `MonoClass *refclass' argument.
	(mono_reflection_inflate_method_or_ctor): Correctly set declaring
	and reflected type.

	* reflection.h (MonoReflectionInflatedMethod): Removed
	`declaring_type' and `reflected_type'.

2004-02-08  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericInst): Added `MonoType *parent' and
	`MonoType **ifaces'.

	* reflection.h (MonoReflectionGenericInst): Removed `klass',
	`parent' and `interfaces'.

	* reflection.c (mono_reflection_bind_generic_parameters): Take a
	`MonoType *' argument and return a `MonoType *'.

	* icall.c
	(ves_icall_MonoGenericInst_GetParentType): New interncall.
	(ves_icall_MonoGenericInst_GetInterfaces): Likewise.	

2004-02-06  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Add support for custom
	valuetype marshalling.

2004-02-06  Martin Baulig  <martin@ximian.com>

	* class.c
	(mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
	(my_mono_class_from_generic_parameter): Likewise.

2004-02-06  Zoltan Varga  <vargaz@freemail.hu>

	* debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
	contents of the symbol files lazily.

	* object.h (MonoThread): Add 'name' and 'name_len' fields.

	* threads.h threads.c icall.c: New icalls for getting and setting the
	threads name.

2004-02-05  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
	Raise an exception when the domain is not found.

2004-02-03  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_get_methodspec_token): Use the
	uninflated signature; fixes gen-33.

2004-02-02  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c threads.c: Make the finalizer thread a normal managed thread so
	the finalizer code can use thread functionality.

	* gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
	the finalizer thread.

	* threads.c: Make some functions more robust.

	* loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.

	* metadata.h: Add new marshalling conventions.

	* marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
	stringbuilder marshalling. Fixes #53700.

	* reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.

	* reflection.c (mono_image_get_type_info): Save declarative security
	info.

	* reflection.c (mono_image_get_field_info): Handle uninitialized 
	unmanaged fields as well.

	* appdomain.c: Bump corlib version.

2004-02-01  Martin Baulig  <martin@ximian.com>

	* loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
	method type arguments.	

2004-01-30  Duncan Mak  <duncan@ximian.com>

	* marshal.h: Add prototype for
	"ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
	and
	"ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
	fix the build.

2004-01-30  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
	(ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.

2004-01-29  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Add support for
	custom marshalling of valuetypes.

	* marshal.c: Fix some warnings.

2004-01-29  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
	for generic method parameters.

	* reflection.c (method_encode_methodspec): Write the uninflated
	signature into the methodspec table.
	(mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
	is always the uninflated method.
	(reflection_methodbuilder_to_mono_method): Copy the generic
	parameters from the MethodBuilder into `header->gen_params'.

2004-01-29  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_from_generic_parameter): Fix warning.

2004-01-27  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_from_generic_parameter): Don't create
	`klass->methods' here.	

2004-01-26  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
	extension since it does not work with libraries named lib<FOO>.dll.so.

2004-01-25  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_type): Added support for
	MONO_TYPE_GENERICINST.

	* reflection.c (mono_reflection_inflate_method_or_ctor): Also
	inflate methods on open constructed types.	

2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c: fire ProcessExit event in the root AppDomain after running
	Main. Fixes bug #53299.

Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>

	* socket-io.c: include the new socket-wrappers.h header.
	Use the wrappers instead of the unix socket functions to make the code
	more clear.

2004-01-23  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.

	* loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
	Fixes #22532.

2004-01-22  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_image_create_pefile): Handle the case when the
	entry point is not a MethodBuilder.

	* reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
	field to ReflectionMethod since it is not allways a builder.

	* reflection.c (type_get_fully_qualified_name): New helper function to
	return the fully qualified name of a type.

	* reflection.c (encode_marshal_blob): Always emit the fully qualified
	type name for custom marshallers.

	* reflection.c (mono_marshal_spec_from_builder): Ditto.

	* class.c (mono_class_setup_vtable): If a parent class already 
	implements an interface, use the implementing methods from that class.
	Fixes #53148.

2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: just return instead of ExitThread to allow for thread
	clean up earlier.

2004-01-21  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
	when closing resource modules.

	* reflection.c (mono_image_create_pefile): Handle the case when the
	entry point is not a MethodBuilder.

	* reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
	field to ReflectionMethod since it is not allways a builder.

2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>

	* marshal.c (mono_marshal_get_managed_wrapper): 
	mono_marshal_alloc takes native int so CONV_I
	the arg for 64bits.

2004-01-20  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (fixup_cattrs): New function to fixup the methoddef
	tokens in the cattr table. Fixes #53108.

2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* loader.c: don't trim ".dll" before looking up in the config file.
	Don't leak orig_scope. Reopened bug #22532 in the meanwhile.

2004-01-19  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
	Return the module which contains the resource as well.
	(ves_icall_System_Reflection_Module_Close): New icall.

	* appdomain.c: Bump corlib version number.

	* image.c (mono_image_addref): New public function.

	* assembly.c: Call mono_image_addref.

	* reflection.c (mono_module_get_object): Increase reference count of 
	the image.

	* loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
	Fixes #22532.

	* exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
	Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
	proper exceptions on DllImport problems.

Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>

	* class.c, metadata.c: eliminate CSIZE macro.

2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>

	* icall.c: Added ves_icall_type_IsInstanceOf internal call.
	* object.h: Added async_callback field in MonoAsyncResult.
	* marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
	* verify.c: Added async_callback in MonoAsyncResult layout.

2004-01-17  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_get_custom_attrs): Add support
	for Modules.

2004-01-16  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
	marshalling.
	(mono_marshal_method_from_wrapper): Add null pointer check.

2004-01-16  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h: Set version number to 36 and reflect
	latest symbol writer changes.

2004-01-16  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
	multi-dimensional arrays.
	(mono_class_is_assignable_from): Check vectors<->one dim. arrays.
	(mono_class_from_mono_type): Use bounded_array_class_get.
	
	* class.c (mono_bounded_array_class_get): New function which takes
	a 'bounded' bool argument to distinguish vectors from one dimensional
	arrays.

	* icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
	bounded_array_class_get if the array has bounds.

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
	Search modules loaded using AssemblyBuilder:AddModule as well.

2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: increased corlib version.
	* filewatcher.c: removed g_print.
	* icall.c:
	(get_property_info): only allocate what is actually requested.
	(ves_icall_Type_GetInterfaces): free the bitset in case of early error.

2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: added filewatcher.[ch]
	* filewatcher.[ch]: FileSystemWatcher runtime support.
	* icall.c: added new FSW icalls.

Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>

	* string-icalls.c: fix stringbuilder regression as suggested by
	Iain McCoy <iain@mccoy.id.au>.

2004-01-13  Zoltan Varga  <vargaz@freemail.hu>

	* process.c (process_read_stringtable_block): Recognize '007f' as
	a language neutral stringtable block.

2004-01-12  Patrik Torstensson

	* object.h (MonoStringBuilder) : Changed layout to support our
	new stringbuilder class.
	* marshal.c: Change marshalling to support the new layout of 
	string builder.
	* appdomain.c: increased version number because new layout of
	string builder.

2004-01-12  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
	assembly name as an string instead of an AssemblyName, since it is
	easier to extract info from it.

	* appdomain.c (mono_domain_assembly_preload): Look for assemblies in
	the culture subdirectories too. Fixes #52231.

2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
	It takes 2 new parameters with an optional name for the method to look
	for and case ignoring info.

	* threadpool.c: removed unused variable.

2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
	It takes 2 new parameters with an optional name for the property to look
	for and case ignoring info.
	Fixes bug #52753.

2004-01-09  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
	Fix #52451.

2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	* assembly.c: escape the uri before passing it to g_filename_from_uri.
	Fixes bug #52630.

2004-01-07  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: Add support for more than one unmanaged resource.

	* icall.c (ves_icall_get_enum_info): Store the value of the enum fields
	in field->def_value, as done in all other cases.

	* reflection.c (mono_reflection_get_custom_attrs): Add support for
	TypeBuilders.

	* reflection.c (mono_reflection_create_runtime_class): Remove 
	errorneous assignment to klass->element_class, since it is already
	done in mono_reflection_setup_internal_class.

2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* gc.c: added missing LeaveCriticalSection.
	* icall.c: indented a couple of lines.
	* threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
	if we call EndInvoke inside a callback. Fixes bug #52601.

2004-01-07  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h
	(MonoDebuggerIOLayer): Added `GetCurrentThreadID'.

2004-01-06  Miguel de Icaza  <miguel@ximian.com>

	* appdomain.c: Use messages in NotImplementedException.

	* exception.c (mono_get_exception_not_implemented): Now this takes
	a message argument.

	* marshal.c (emit_str_to_ptr_conv): g_warning and throw an
	exception instead of g_asserting an aborting when something is not
	implemented.

	Add some inline docs.

2004-01-05  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h: Update after changes to object layout.

	* reflection.c: Implement saving of unmanaged aka win32 resources.

	* appdomain.c: Bump version number.

	* appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
	Handle missing domains gracefully.

2004-01-05  Atsushi Enomoto <atsushi@ximian.com>

	* file-io.c : On Windows, there are much more invalid_path_chars.

Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>

	* class.h, object.c: prepare for GetType () speedup.

2003-12-24  Atsushi Enomoto <atsushi@ximian.com>

	* profiler.c: workaround for --profile null reference exception on
	  cygwin. Patch by Patrik Torstensson.

2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>

	* marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
	make work for unaligned access.

Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: small cleanup (class->fields [i] -> field).
	* image.c: check address of metadata is valid.

2003-12-22  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.h assembly.c (mono_assembly_loaded): New public function to
	search the list of loaded assemblies.

	* reflection.c (mono_reflection_type_from_name): Use 
	mono_assembly_loaded instead of mono_image_loaded.

	* reflection.c: Fix warnings.

2003-12-20  Zoltan Varga  <vargaz@freemail.hu>

	* image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
	is dynamic. This is needed since an assembly can contain both dynamic and
	non-dynamic images.

	* class.c loader.c metadata.c object.c: Use image->dynamic instead of 
	assembly->dynamic.

	* icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.

	* reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
	to store modules loaded using AddModule.

	* reflection.c (mono_image_fill_file_table): Generalize this so it works
	on Modules.

	* reflection.c (mono_image_fill_export_table_from_class): New helper function.

	* reflection.c (mono_image_fill_export_table_from_module): New function to
	fill out the EXPORTEDTYPES table from a module.

	* reflection.c (mono_image_emit_manifest): Refactor manifest creation code
	into a separate function. Also handle loaded non-dynamic modules.

	* reflection.c (mono_image_basic_init): Fix memory allocation.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* assembly.c (mono_assembly_load_references): Make this public.

2003-12-19  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_initialize_generic): Made this static, take
	a `MonoGenericInst *' instead of a `MonoClass *'.
	(mono_class_from_generic): Call mono_class_initialize_generic()
	unless we're already initialized or being called from
	do_mono_metadata_parse_generic_inst().

	* class.h (MonoGenericInst): Added `initialized' and
	`init_pending' flags.

	* metadata.c (do_mono_metadata_parse_generic_inst): Don't call
	`mono_class_init (gklass)' or mono_class_initialize_generic()
	here; set `generic_inst->init_pending' while parsing the
	`type_argv'.

2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>

	* locales.c: include string.h for memxxx prototypes

2003-12-19  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
	constructor when accessing literal fields.

2003-12-17  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* reflection.c (assembly_add_resource_manifest): New function to fill
	the MANIFESTRESOURCE table.

	* reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.

	* reflection.h: Update to changes in class layout.

	* icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
	Reenable call to mono_runtime_is_shutting_down ().

	* appdomain.c (mono_runtime_is_shutting_down): New helper function to
	determine if the runtime is shutting down.

2003-12-16  Jackson Harper <jackson@ximian.com>

	* icall.c: comment out call to mono_runtime_is_shutting_down to
	fix build.
	
2003-12-16  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
	(ves_icall_System_Environment_get_HasShutdownStarted): New icall.

2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>

	* reflection.c: move definition of swap_with_size
	to before its first call

2003-12-15  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (mono_runtime_is_shutting_down): New public function.

	* icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
	icall.

	* object.c: Fix warnings.

	* icall.c (ves_icall_Type_Get...): Only consider inherited static
	members if FlattenHierarchy is set.

	* reflection.c (mono_image_add_decl_security): New function to emit
	declarative security.

	* reflection.h reflection.c: Add support for declarative security.

	* appdomain.c (MONO_CORLIB_VERSION): Bump version number.
	
2003-12-13  Zoltan Varga  <vargaz@freemail.hu>

	appdomain.c (MONO_CORLIB_VERSION): Bump version number.
	
	* appdomain.c verify.c: Moved corlib version checking into its own
	function in appdomain.c since it needs to create vtables etc.

2003-12-13  Patrik Torstensson <p@rxc.se>

	* marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
	instead of unwrapped server.

2003-12-12  Zoltan Varga  <vargaz@freemail.hu>

	* verify.c (check_corlib): Fix field index.

2003-12-10  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
	GetGacPath icall.

2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>

	* process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
	ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
	cope with sizeof(size_t) != sizeof(guint32).

2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
	in case of failure.

2003-12-10  Mark Crichton <crichton@gimp.org>

	* icall.c: removed the GetNonZeroBytes.  We now handle this case
	in managed code.

	* rand.c, rand.h: Same here.  Also cleaned up the clode slightly.

Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c, icall.c, marshal.c, object.c: ignore fields
	marked as deleted.

2003-12-09  Zoltan Varga  <vargaz@freemail.hu>

	* verify.c (check_corlib): Handle the case when the version field is 
	initialized by a static constructor.

2003-12-08  Patrik Torstensson  <p@rxc.se>

    * rand.c (InternalGetBytes): Implemented win32 version with cryptapi

2003-12-08  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
	a MonoReflectionGenericParameter, also take the parameter index
	and name as arguments.
	(ves_icall_MethodBuilder_define_generic_parameter): Likewise.
	(ves_icall_MonoGenericParam_initialize): New interncall.
	(ves_icall_Type_make_byref_type): New interncall.

	* reflection.h (MonoReflectionGenericParam): Derive from
	MonoReflectionType, not just from MonoObject.  Added `refobj' and
	`index' fields.

	* reflection.c (mono_reflection_define_generic_parameter): Create
	and return a new MonoReflectionGenericParam; don't initialize the
	constraints here.
	(mono_reflection_initialize_generic_parameter): New public method;
	initializes the constraints and creates the `param->pklass'.

2003-12-08  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h reflection.c: Use the new fields 'num_types', 
	'num_fields' and 'num_methods' to track the number of types etc.

	* verify.c (check_corlib): Check corlib version number.

2003-12-07  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
	function works on all methods.

2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>

	* domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
	* icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
	the custom_type_info flag of the transparent proxy.
	* object.c: Added method mono_object_isinst_mbyref for casting mbyref
	objects that supports IRemotingTypeInfo.
	* object.h: Added custom_type_info field in transparent proxy.

2003-12-06  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_create_from_generic): Removed.
	(mono_class_from_generic): Check `ginst->klass' before doing
	anything else.  This is important to fully support "recursive"
	generic types.

	* metadata.c (do_mono_metadata_parse_generic_inst): Create an
	empty `generic_inst->klass' before doing anything else.

2003-12-06  Dick Porter  <dick@ximian.com>

	* verify.c: 
	* object.h:
	* icall.c:
	* locales.c: Use C structs to access class fields.  Don't do a
	conversion between MonoString and UChar because both are
	platform-endian UTF-16.  Compare now takes startindex and count
	parameters.  Add a char overload for IndexOf.  Speed up the
	invariant string IndexOf.

2003-12-05  Zoltan Varga  <vargaz@freemail.hu>

	* Makefile.am (monosn_LDADD): Fix parallel build.

2003-12-04  Martin Baulig  <martin@ximian.com>

	* icall.c
	(ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
	(ves_icall_Type_make_array_type): New interncall.	

2003-12-04  Martin Baulig  <martin@ximian.com>

	* locales.c: also change it in the !HAVE_ICU case.

2003-12-04  Dick Porter  <dick@ximian.com>

	* icall.c:
	* locales.c: construct_compareinfo is now in CompareInfo, not
	CultureInfo.

2003-12-04  Zoltan Varga  <vargaz@freemail.hu>

	* image.c (mono_image_load_file_for_image): Cache loaded images in the
	image->files array.

	* image.c (load_class_name): Load class names from the EXPORTEDTYPES
	table as well.

	* assembly.c (mono_assembly_load_references): Only load references
	once.

	* class.c (mono_class_from_name): Avoid linear search of the 
	EXPORTEDTYPE table.

	* loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.

2003-12-03  Zoltan Varga  <vargaz@freemail.hu>

	* image.h (MonoImage): Add 'field_cache' field.

	* loader.c (mono_field_from_token): Cache field lookups.
	
	* reflection.c (mono_module_get_object): Fix name property.

	* icall.c (ves_icall_get_enum_info): Update after changes to 
	mono_metadata_get_constant_index ().

	* icall.c: Get rid of get_type_info icall, use a separate icall for
	each type property to avoid needless memory allocations. Fixes #51514.

	* metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
	to avoid needless binary searches.

	* class.c (class_compute_field_layout): Move the initialization of
	field->def_value to mono_class_vtable ().

	* class.c (mono_class_layout_fields): Enable GC aware auto layout for
	non-corlib types.

	* object.c (mono_object_allocate): Make it inline.

	* object.c (mono_object_allocate_spec): Make it inline.
	
2003-12-02  Dick Porter  <dick@ximian.com>

	* locales.c (create_NumberFormat): NumberFormatInfo construction.
	Patch by Mohammad DAMT (mdamt@cdl2000.com).

2003-12-01  Dick Porter  <dick@ximian.com>

	* threads.c: Fix signature and call in CreateMutex and
	CreateEvent.

2003-12-01  Dick Porter  <dick@ximian.com>

	* icall.c: 
	* locales.c: Implement string compares and searching

	* object.h: Add extra Thread field

2003-11-30  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (fixup_method): Add support for MonoCMethod.

2003-11-28  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c: Fix hangs and error messages when GC_DONT_GC is set.

	* reflection.c (assembly_name_to_aname): Allow extra characters in
	assembly names. Fixes #51468.

2003-11-26  Zoltan Varga  <vargaz@freemail.hu>

	* exception.c (mono_exception_from_name_domain): New helper function.

	* appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
	exception object in the correct domain.

	* appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
	formatting + make a copy a the input data.

	* loader.c (mono_get_method_from_token): Methods which contain
	native code do not have entries in the ImplMap.

	(ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
	Thanks to Gonzalo for spotting this.
	
	* appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
	patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.

	* assembly.h (mono_assembly_load_from): Split the second part of 
	assembly loading into a new public function.

	* exception.h (mono_get_exception_bad_image_format): New function.

2003-11-24  Zoltan Varga  <vargaz@freemail.hu>

	icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
	Enumerate all modules inside a dynamic assembly. Fixes #51293.
	
	* icall.c: Add new icall for creating dynamic methods.

	* loader.h debug-helpers.c: Add new wrapper type for dynamic methods.

	* reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.

	* reflection.c (mono_reflection_create_dynamic_method): New icall to
	create a dynamic method.

	* reflection.c (resolve_object): New helper function.

	* reflection.c: Generalize ReflectionMethodBuilder and the functions
	which manipulate it so they can also work on dynamic methods.

	* reflection.c (reflection_method_builder_to_mono_method): Avoid 
	creating the MonoReflectionMethodAux structure if it is not needed.
	
	* reflection.h verify.c: Update after changes to object layout.

	* reflection.c (method_builder_encode_signature): Fix compilation on
	gcc 2.95.x.

2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>

	* appdomain.h: Added support for context static fields. Added static_data
	  field to MonoAppContext and renamed thread_static_fields to a more
	  generic special_static_fields in MonoAppDomain, since it can now contain
	  context static fields.
	* domain.c: Updated hashtable name.
	* object.c: Replaced field_is_thread_static() for a more generic
	  field_is_special_static() which also checks for context static attribute.
	  In mono_class_vtable(), added support for static context fields.
	* threads.c: Changed methods that manage thread static fields to more
	  generic methods so they can be reused both for thread and context static
	  data.
	* threads.h: Declared some new methods.

2003-11-21  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h: Update after changes to the managed types.

	* reflection.c (encode_custom_modifiers): New helper function.

	* reflection.c (method_encode_signature): Emit custom modifiers.

	* reflection.c (field_encode_signature): Emit custom modifiers.

2003-11-18  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.

	* icall.c (ves_icall_System_ValueType_Equals): New optimized 
	implementation.

	* icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
	icall.

	* object.c (mono_field_get_value_object): New function.

	* object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
	specific.

2003-11-17  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
	return a preallocated out-of-memory exception instance.

	* object.c (out_of_memory): Use the new function.

	* metadata.c (mono_metadata_parse_type): Handle the case when the byref
	flag is before the custom modifiers. Fixes #49802.

2003-11-16  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_is_open_constructed_type): Implemented the
	MONO_TYPE_GENERICINST case.

2003-11-16  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_fill_assembly_name): New function to
	fill out the MonoAssemblyName structure.
	(mono_assembly_open): Use the new function.

	* icall.c (fill_reflection_assembly_name): New helper function.

	* icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
	new function.

	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.

2003-11-15  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_is_open_constructed_type): New public
	function; checks whether a type is an open constructed type,
	ie. whether it still contains type parameters.
	(mono_class_inflate_generic_type): If we're a type parameter and
	the inflated type is also a MONO_TYPE_(M)VAR, return the original
	type.

	* class.h (MonoGenericInst): Added `guint32 is_open'.

	* loader.c (method_from_methodspec): Check whether we're an open
	or closed constructed type and set `ginst->is_open'.

	* reflection.c (mono_reflection_bind_generic_parameters): Check
	whether we're an open or closed constructed type and set
	`ginst->is_open'.
	(mono_reflection_inflate_method_or_ctor): Don't inflate methods
	from open constructed types.

2003-11-15  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_bind_generic_parameters): If we're
	a generic instance (instead of a generic type declaration) with
	unbound generic parameters, bind them to our actual types.

2003-11-14  Martin Baulig  <martin@ximian.com>

	* reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.

	* reflection.c (mono_reflection_bind_generic_parameters): If we're
	an interface type, populate `res->interfaces' with instantiated
	versions of all the interfaces we inherit.

2003-11-13  Aleksey Demakov  <avd@openlinksw.com>

	* assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
	when MONO_PATH is set but doesn't contain the install dir.

2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(ves_icall_Type_GetInterfaces): don't return an interface twice when
	it's also implemented in base classes. Fixes bug #50927.

2003-11-13  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
	if this method is called from a finalizer. Fixes #50913.

2003-11-12  Miguel de Icaza  <miguel@ximian.com>

	* threads.c: Implement VolatileRead/VolatileWrite

	* icall.c: Add new icalls for VolatileRead/VolatileWrite

2003-11-12  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
	patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
	2.95.3.

	* assembly.c (mono_assembly_open): Fix windows build. Applied patch 
	from Peter Ross (pro@missioncriticalit.com).
	
2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>

	* icall.c: Added internal call for System.Environment::GetMachineConfigPath

2003-11-12  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_load_references): Disable check because it
	triggers on older corlibs which lots of people have.

2003-11-12  Jackson Harper  <jackson@ximian.com>

	* assembly.c: Change corlib name to mscorlib. Add a temp. hack to
	load corlib.dll if mscorlib.dll is not found.
	* assembly.h: Remove corlib name define.
	* class.c:
	* domain.c:
	* image.c: Change corlib name to mscorlib.
	
2003-11-12  Zoltan Varga  <vargaz@freemail.hu>

	* debug-mono-symfile.c: Add patch from FreeBSD ports tree.

2003-11-11  Miguel de Icaza  <miguel@ximian.com>

	* appdomain.h: Added loader_optimization here to sync with the C#
	code, and add disallow_binding_redirects field.

2003-11-11  Zoltan Varga  <vargaz@freemail.hu>

	* mono-debug.c (mono_debug_add_method): Ignore unknown modules.

	* reflection.c (mono_image_build_metadata): Fix crash on modules
	with no types.

	* reflection.h (MonoMethodInfo): Track changes to the managed structure.

	* icall.c (ves_icall_get_method_info): Return callingConvention as
	well.

	* icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
	namespaces from the EXPORTEDTYPE table as well.

	* icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
	from all modules inside the assembly.
	
2003-11-11  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_bind_generic_parameters): Make
	this work for interfaces.

2003-11-11  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_add_type): Ignore unknown modules.

2003-11-11  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_inflate_method_or_ctor): Allow
	"MonoInflatedMethod" and "MonoInflatedCtor".

2003-11-11  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (resolution_scope_from_image): Use the assembly table
	from the manifest module, since other modules don't have it.

	* debug-helpers.c (mono_type_full_name): New helper function.

	* image.h (MonoAssembly): Change 'dynamic' to a boolean.

	* image.c (mono_image_load_file_for_image): New public function which
	is a replacement for the load_file_for_image in class.c.

	* assembly.c (mono_assembly_load_module): A wrapper for the function
	above which does assembly association and reference loading too.

	* class.c (mono_class_from_name): Call mono_assembly_load_module.

2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: not all of the attributes for the full assembly name
	are required and the order doesn't matter. Fixes bug #50787.

2003-11-10  Dick Porter  <dick@ximian.com>

	* locales.c: Use platform-endian UTF16

2003-11-10  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: Emit FILE and EXPORTEDTYPE tables.
	
2003-11-10  Martin Baulig  <martin@ximian.com>

	* metadata.c
	(mono_metadata_load_generic_params): Make this actually work.

	* reflection.c (mono_reflection_bind_generic_parameters): If our
	parent is a generic instance, pass all the `types' to it, no
	matter whether it has the same number of type parameters or not.

2003-11-10  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: Emit FILE and EXPORTEDTYPE tables.

	* assembly.c (mono_assembly_load_references): Move the image<->assembly
	assignment code to this function so it gets called recursively for all
	modules.

	* image.c (load_modules): Remove the assembly assignment since it is
	now done by mono_assembly_load_references.
	
	* icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
	Add 'module' argument.
	(mono_module_get_types): New helper function.
	(ves_icall_System_Reflection_Module_InternalGetTypes): New icall.

2003-11-08  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_inflate_generic_method): Interface method
	don't have a header.

	* reflection.c (mono_image_get_methodspec_token): Take an
	additional `MonoGenericInst *' argument instead of reading it from
	the header; this is necessary to support interfaces.
	(mono_image_create_token): Pass the `MonoGenericInst *' from the
	MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
	(inflated_method_get_object): Take an additional `MonoGenericInst *'
	argument.

	* reflection.h (MonoReflectionInflatedMethod): Added
	`MonoGenericInst *ginst'.

2003-11-07  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c (mono_domain_finalize): Fix compilation for no GC case.

2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>

	* appdomain.c (mono_domain_unload): Add a workaround for bug #27663.

2003-11-06  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c 
	(reflection_methodbuilder_from_method_builder):
	(reflection_methodbuilder_from_ctor_builder): New helper functions to 
	initialize a ReflectionMethodBuilder structure.
	(mono_image_get_methodbuilder_token):
	(mono_image_get_ctorbuilder_token): New functions to emit memberref
	tokens which point to types in another module inside the same assembly.

	* reflection.c: Use the new helper functions.
	
	* reflection.c (mono_image_basic_init): Initialize basedir and culture.

	* icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
	instead of AssemblyBuilder->dynamic_assembly in the appropriate places.

	* reflection.c (resolution_scope_from_image): Emit a moduleref if
	neccesary.

	* reflection.c (mono_image_build_metadata): Emit metadata only for the
	current module. Emit the manifest only for the main module.

	* reflection.c (mono_image_create_token): Add assertion when a 
	memberref needs to be created.

	* reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.

	* reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
	larger buffer for the custom attribute blob. Fixes #50637.
	
2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: notify listener on async processing handles after
	invoking the async callback. Thanks to Zoltan.

2003-11-03  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (create_dynamic_mono_image): Call mono_image_init to 
	avoid code duplication.

	* reflection.h (MonoDynamicImage): New type which is currently unused,
	but will be used through the ref.emit code in place of 
	MonoDynamicAssembly.

	* reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
	object layout.

	* reflection.c (create_dynamic_mono_image): Rewrote so it now creates
	a MonoDynamicImage instead of just a MonoImage.
	
	* reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
	icalls to ModuleBuilder but keep their semantics, so they will work
	with moduleb->assemblyb. This will change later.
	
2003-11-03  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
	object layout.

	* reflection.c (mono_image_build_metadata): Avoid creation of a default
	main module, since it is now done by the managed code.

2003-11-03  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_inflate_method_or_ctor): Set
	`ginst->klass' here.
	(method_encode_methodspec): Don't use the `ginst->generic_method's
	klass if it's a generic instance, use `ginst->klass' in this case.

2003-11-03  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_get_generic_method_param_info):
	Removed, use mono_image_get_generic_param_info() instead.
	(mono_image_get_type_info): Write the GenericParam table before
	the Method table.  This is neccessary because in the GenericParam
	table, type parameters of the class (ie. '!0' etc.) must come
	before the ones from its generic methods (ie. '!!0' etc).

2003-11-03  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.

2003-11-02  Martin Baulig  <martin@ximian.com>

	* reflection.c (create_generic_typespec): Take a
	`MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
	the generic parameters from it.

2003-11-02  Martin Baulig  <martin@ximian.com>

	* reflection.c (fieldref_encode_signature): Take a `MonoType *'
	instead of a `MonoClassField *' since we just need the type.
	(create_generic_typespec): New static function.  Creates a
	TypeSpec token for a generic type declaration.
	(mono_image_get_generic_field_token): New static function.
	(mono_image_create_token): If we're a FieldBuilder in a generic
	type declaration, call mono_image_get_generic_field_token() to get
	the token.

2003-11-02  Martin Baulig  <martin@ximian.com>

	* reflection.h
	(MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
	`MonoReflectionGenericInst *declaring_type' and
	`MonoReflectionGenericInst *reflected_type' fields.

	* reflection.c (mono_reflection_inflate_method_or_ctor): Take a
	`MonoReflectionGenericInst *declaring_type' and a
	`MonoReflectionGenericInst *reflected_type' argument instead of a
	single `MonoReflectionGenericInst *type' one.  Set
	`res->declaring_type' and `res->reflected_type' from them.
	(mono_reflection_inflate_field): Likewise.	

2003-11-02  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_setup_vtable): Don't store generic methods
	in the vtable.	

2003-11-02  Martin Baulig  <martin@ximian.com>

	* reflection.h (MonoReflectionGenericInst): Added
	`MonoReflectionType *declaring_type'.

	* reflection.c (mono_reflection_bind_generic_parameters): Use
	`if (tb->parent)' instead of `klass->parent'.

2003-11-01  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c (mono_assembly_open): Avoid crash if a module is loaded
	with an empty ASSEMBLY table.

	* reflection.c (mono_image_build_metadata): Avoid using the same loop
	variable in the inner and outer loops.

2003-10-31  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.h (mono_metadata_make_token): Put parentheses around macro
	argument.

	* appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
	
	* appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
	icalls. Instead, do everything in managed code. This is needed since
	it is hard to restore the original domain etc. in unmanaged code in the
	presence of undeniable exceptions.

	* appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
	New icalls to push and pop appdomain refs.

2003-10-31  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_type): Renamed to
	mono_class_inflate_generic_type() and made it public.

	* icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
	New interncall.

	* loader.c (mono_field_from_memberref): Also set the retklass for
	typespecs.

	* fielder.c (mono_image_get_inflated_field_token): New static
	method; creates a metadata token for an inflated field.
	(mono_image_create_token, fixup_method): Added support for
	"MonoInflatedField".
	(fieldbuilder_to_mono_class_field): New static function.
	(mono_reflection_inflate_field): New public function.

	* reflection.h
	(MonoReflectionGenericInst): Added `MonoArray *fields'.
	(MonoReflectionInflatedField): New typedef.	

2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>

	* socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
	for Solaris and other platforms without s6_addr16

2003-10-30  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_type): Take just one `MonoGenericInst *'
	argument instead of two.
	(mono_class_inflate_generic_signature): Likewise.
	(inflate_generic_header): Likewise.
	(mono_class_inflate_generic_method): Likewise.  In addition, if
	`ginst->klass' is set, it becomes the new `method->klass'.

	* class.h (MonoGenericInst): Removed the `gpointer mbuilder'
	field.

	* reflection.c (encode_generic_method_sig): Write a 0xa as the
	first byte. [FIXME]
	(method_encode_methodspec): If we have generic parameters, create
	a MethodSpec instead of a MethodRef.
	(fixup_method): Added support for "MonoInflatedMethod" and
	"MonoInflatedCtor".
	(mono_image_create_token): Added support for "MonoInflatedMethod"
	and "MonoInflatedCtor".
	(inflated_method_get_object): New static function; returns a
	managed "System.Reflection.MonoInflatedMethod" object.
	(mono_reflection_bind_generic_method_parameters): Return a
	`MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
	(mono_reflection_inflate_method_or_ctor): Likewise.
	(mono_image_get_generic_method_param_info): Initialize unused
	fields to zero.
	(mono_image_get_generic_param_info): Likewise.

	* reflection.h (MonoReflectionInflatedMethod): New public
	typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
	"S.R.MonoInflatedCtor" classes.

	* loader.c (method_from_memberref): If we're a TypeSpec and it
	resolves to a generic instance, inflate the method.

2003-10-28  Dick Porter  <dick@ximian.com>

	* object.c (mono_runtime_run_main): Convert command-line arguments
	into utf8, falling back to the user's locale encoding to do so.

2003-10-27  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_get_method_from_token): Avoid looking up the icalls
	at this time.

	* marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.

	* reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
	up icalls at method definition time. Partially fixes #33569.

2003-10-25  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
	marshalling of arrays. Fixes #50116.

	* appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.

	* appdomain.c (unload_thread_main): Clear class->cached_vtable if it
	points to a vtable in the dying appdomain.

	* appdomain.c (mono_domain_unload): Move the notification of OnUnload
	listeners into unmanaged code inside the lock.

	* object.c (mono_class_vtable): Turn off typed allocation in non-root
	domains and add some comments.

2003-10-25  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericInst): Added `MonoClass *klass' field.

	* image.h (MonoImage): Added `GHashTable *typespec_cache'.

	* metadata.c (mono_metadata_parse_generic_inst): Renamed to
	`do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
	currently parsing.  Create the generic class and store it in
	`generic_inst->klass' before parsing the type arguments.  This is
	required to support "recursive" definitions; see mcs/tests/gen-23.cs
	for an example.
	(mono_type_create_from_typespec): Use a new `image->typespec_cache'
	to support recursive typespec entries.

	* class.c (mono_class_setup_parent): If our parent is a generic
	instance, we may get called before it has its name set.
	(mono_class_from_generic): Splitted into
	mono_class_create_from_generic() and mono_class_initialize_generic().

2003-10-25  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_BindGenericParameters): Return a
	`MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
	("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
	("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.

	* reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
	(create_typespec): Likewise.
	(mono_reflection_bind_generic_parameters): Return a
	`MonoReflectionGenericInst *' instead of a `MonoClass *'.
	(mono_reflection_inflate_method_or_ctor): New public function.

	* reflection.h (MonoReflectionGenericInst): New typedef.	

2003-10-24  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_class_proxy_vtable): Run the whole vtable construction
	inside the domain lock. Fixes #49993.
	
	* object.c (mono_class_vtable): When typed allocation is used, 
	allocate vtables in the GC heap instead of in the mempool, since the
	vtables contain GC descriptors which are used by the collector even
	after the domain owning the mempool is unloaded.

	* domain.c (mono_domain_set): Rename to mono_domain_set_internal.

	* domain.c (mono_domain_unload): Rename to mono_domain_free to better
	reflect what it does. Also invalidate mempools instead of freeing
	them if a define is set.

	* appdomain.h (MonoAppDomainState): New enumeration to hold the state
	of the appdomain.
	
	* appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
	hold the finalizable objects in this domain.

	* appdomain.h (_MonoDomain): New field 'state' to hold the state of the
	appdomain.

	* appdomain.c (mono_domain_set): New function to set the current
	appdomain, but only if it is not being unloaded.

	* appdomain.c threads.c threadpool.c object.c: Avoid entering an
	appdomain which is being unloaded.
	
	* appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
	unloading of the root appdomain.

	* appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
	icall to execute a method in another appdomain. Intended as a 
	replacement for InternalSetDomain, which can confuse the code 
	generation in the JIT.

	* appdomain.c (mono_domain_is_unloading): New function to determine
	whenever an appdomain is unloading.

	* appdomain.c (mono_domain_unload): New function to correctly unload
	an appdomain.

	* assembly.c (mono_assembly_load_references): Check that an assembly
	does not references itself.

	* gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
	domain manually, it asks the finalizer thread to do it, then waits for
	the result. Also added a timeout.

	* icall.c: Register the new icalls.

	* threads.h threads.c: Export the mono_gc_stop_world and 
	mono_gc_start_world functions.
	
	* mempool.h mempool.c (mono_mempool_invalidate): New debugging 
	function to fill out the mempool with 0x2a.

2003-10-22  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h (MonoReflectionMethodAux): New structure to store
	information which is rarely used, thus is not in the MonoMethod
	structure.

	* reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
	store the aux info.

	* reflection.c (mono_methodbuilder_to_mono_method): Store param names
	and marshalling info into the aux structure.

	* loader.c (mono_method_get_marshal_info): Retrieve the marshal info
	from the aux structure.

	* loader.c (mono_method_get_param_names): Retrieve the param names from
	the aux structure.
	
2003-10-21  Zoltan Varga  <vargaz@freemail.hu>

	* exception.h exception.c: Add AppDomainUnloadedException && fix 
	warning.

2003-10-21  Dick Porter  <dick@ximian.com>

	* socket-io.c
	(ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
	patch from Laramie Leavitt moving divide out of loop. (Bug 45381).

2003-10-21  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_bind_generic_parameters):
	`klass->parent' is NULL for interfaces.

2003-10-21  Martin Baulig  <martin@ximian.com>

	* reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.

2003-10-20  Zoltan Varga  <vargaz@freemail.hu>

	* exception.c (mono_exception_from_name_msg): New helper function for
	creating exceptions and initializing their message field.

	* exception.c: Simplify functions using the new helper.

	* exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
	New function.

	* object.h object.c: Remove G_GNUC_NORETURN from the signature of
	mono_raise_exception, since otherwise gcc doesn't generate the function
	epilog for raise_exception, confusing the stack unwinding in the JIT.
	Fixes #45043.

	* rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
	PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
	Fixes #49499.

2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: OutputDebugStringW expects 16-bit unicode characters, not
	utf8.

2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>

	* icall.c: Removed GetUninitializedObject method because
	  AllocateUninitializedClassInstance does the same.

2003-10-18  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_signature): Renamed to
	mono_class_inflate_generic_signature() and made it public.
	(my_mono_class_from_generic_parameter): New static function; if we
	don't already have the generic parameter's MonoClass, create a
	very simple one which is just used internally in the runtime and
	not passed back to managed code.

	* class.h (MonoGenericInst): Added `gpointer mbuilder' field.

	* metadata.h (MonoMethodSignature): Moved the
	`MonoGenericParam *gen_params' to the MonoMethodHeader.
	(MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.

	* icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
	ves_icall_MonoMethod_GetGenericArguments(); this is now an
	interncall on the MonoMethod class, not on MethodInfo.
	(ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
	calling mono_reflection_bind_generic_method_parameters() directly.

	* loader.c (mono_method_get_signature): If this is a MethodSpec;
	return the already computed `method->signature'.
	(method_from_methodspec): New static function to load a method
	from a MethodSpec entry.
	(mono_get_method_from_token): Call the new method_from_methodspec()
	for MethodSpec tokens.  
	(mono_get_method_from_token): If we're a generic method, load the
	type parameters.

	* reflection.c (mono_image_get_memberref_token): Allow
	MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
	table.
	(fixup_method): Added support for MONO_TABLE_METHODSPEC.
	(mono_image_create_token): First check whether it's a generic
	method (so we'd need to create a MethodSpec), then do the other
	two alternatives.
	(mono_reflection_bind_generic_method_parameters): Return a
	`MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
	called directly from the interncall.

2003-10-17  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (load_public_key): Move loading of the public key
	into managed code.

	* image.h (MonoAssemblyName): Add public_key and hash_alg fields.

	* assembly.c (mono_assembly_open): Fill in public_key and hash_alg
	fields.

	* icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
	culture, hash_alg and public_key. Fixes #49555.

2003-10-17  Martin Baulig  <martin@ximian.com>

	* class.h (MonoGenericInst): Moved this declaration here and added
	`MonoMethod *generic_method'.

	* icall.c
	(ves_icall_MethodInfo_GetGenericArguments): New interncall.
	(ves_icall_MethodInfo_BindGenericParameters): New interncall.

	* metadata.c (mono_metadata_type_equal): Two types of
	MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
	index; ie. don't compare the address of the `MonoGenericParam'
	structure.
	(mono_metadata_load_generic_params): Removed the `MonoMethod
	*method' argument.

	* metadata.h (MonoGenericInst): Moved declaration to class.h.
	(MonoMethodHeader): Added `MonoGenericInst *geninst'.

	* reflection.c (method_encode_signature): Encode the number of
	generic parameters.
	(encode_generic_method_sig): New static function.
	(method_encode_methodspec): New static function; creates an entry
	in the MethodSpec table for a generic method.
	(mono_image_get_methodspec_token): New static function.
	(mono_image_create_token): Call mono_image_get_methodspec_token()
	for generic methods.
	(mono_reflection_bind_generic_method_parameters): New public
	function.  Instantiates a generic method.

2003-10-16  Martin Baulig  <martin@ximian.com>

	* metadata.h (MonoMethodSignature): Moved `MonoGenericParam
	*gen_params' here from MonoMethodHeader.

	* metadata.c (mono_metadata_parse_method_signature): If we have
	generic parameters, initialize `method->gen_params' and then set
	the correct `type->data.generic_param' in all the parameters.

2003-10-16  Zoltan Varga  <vargaz@freemail.hu>

	* threads.c (mono_threads_get_default_stacksize): New function to 
	return the default stacksize.

	* gc.c (mono_gc_cleanup): Use a separate event for waiting for the
	termination of the finalizer thread, since the previous method had
	race conditions. Fixes #49628.

	* gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
	as for the other managed threads.

2003-10-16  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_signature): Copy `generic_param_count'
	and `gen_params'.

	* icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
	New interncall.

	* metadata.c (mono_metadata_parse_method_signature): Actually set
	the `method->generic_param_count' here.
	(mono_metadata_load_generic_params): Initialize `pklass' to NULL.

2003-10-15  Zoltan Varga  <vargaz@freemail.hu>

	* object.h: Add a new field to TypedRef to simplify the implementation
	of the REFANY opcodes in the JIT.

	* icall.c: Make use of the new field.

	* metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
	dynamically.

2003-10-15  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_from_gen_param): Renamed to
	mono_class_from_generic_parameter() and moved most of the
	functionality from mono_reflection_define_generic_parameter()
	here; ie. we create a "real" class here.
	(mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
	MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
	previously been called.

	* class.h (MonoGenericParam): Moved the declaration of this struct
	here from metadata.h and added `MonoMethod *method'.

	* icall.c (ves_icall_MonoType_get_DeclaringMethod): New
	interncall.

	* loader.c (mono_get_method_from_token): If we have any generic
	parameters, call mono_metadata_load_generic_params() to read them
	from the MONO_TABLE_GENERICPAR.

	* metadata.c (mono_metadata_load_generic_params): Added
	`MonoMethod *method' argument which is used MONO_TYPE_MVAR.

	* metadata.h (MonoMethodSignature): Replaced
	`MonoGenericInst *geninst' with `guint16 generic_param_count'.
	(MonoMethodHeader): Added `MonoGenericParam *gen_params'.

	* reflection.c (mono_reflection_define_generic_parameter): Moved
	most of the functionality into the new
	mono_class_from_generic_parameter(); set the `method' field if
	we're a method parameter.	

2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>

	* marshal.c (emit_struct_conv): if native size is 0
	emit no code.

2003-10-14  Martin Baulig  <martin@ximian.com>

	* icall.c: The generics API has changed in the spec since it was
	added to System.Type; these modifications make it match the spec
	again.
	(ves_icall_Type_GetGenericParameters): Renamed to
	`ves_icall_Type_GetGenericArguments'.
	(ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
	(ves_icall_MonoType_get_HasGenericParameteres): Renamed to
	`ves_icall_MonoType_get_HasGenericArguments'.
	(ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
	`ves_icall_MonoType_get_IsGenericParameter'.
	(ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
	this is no interncall anymore.
	(ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
	`ves_icall_TypeBuilder_get_IsGenericParameter'.

2003-10-14  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_bind_generic_parameters): Also
	inflate generic methods if we're reading the class from IL.

2003-10-13  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_define_generic_parameter): This
	method isn't called directly from the icall anymore; take a
	`MonoReflectionAssemblyBuilder *' so we can use this for type and
	method generic parameters.
	(ReflectionMethodBuilder): Added `MonoArray *generic_param'.
	(method_builder_encode_signature): Encode generic parameters.
	(mono_image_get_method_info): Write generic params to the
	MONO_TABLE_GENERICPARAM table.

	* reflection.h (MonoReflectionMethodBuilder): Added
	`MonoArray *generic_params'.

	* metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.

	* icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
	wrapper for mono_reflection_define_generic_parameter().
	(ves_icall_MethodBuilder_define_generic_parameter): Likewise.	

2003-10-13  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.h: Add missing function to fix build.

	* marshal.c (mono_marshal_get_native_wrapper): Add support for 
	the SetLastError pinvoke attribute.

	* marshal.c (mono_marshal_set_last_error): New helper function called
	by the generated code.
	
	* marshal.c (mono_mb_emit_branch): New helper function.

	* marshal.c (mono_mb_emit_exception): Added exception name parameter.

	* marshal.c (mono_marshal_get_managed_wrapper): Added support for
	classes as parameters and return values of delegates. Fixes #29256. 

2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>

	* locales.c: use gint32 in non HAVE_ICU case

2003-10-11  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_add_method): Added a workaround for
	bug #48591.

2003-10-10  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_managed_wrapper): Under windows,
	delegates passed to native code must use the STDCALL calling 
	convention. Fixes #35987.

2003-10-10  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_type): If we're inflating for a generic
	type instance (and not for a generic method), return
	MONO_TYPE_MVAR unchanged.

2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* string-icalls.c: Join ignores null strings in the source array.
	* threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
	* threads.c: GetAvailableTheads is slightly more accurate.

2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>

	* threads.h threads.c : add mono_threads_set_default_stacksize
	and pass default to CreateThread calls.

2003-10-09  Dick Porter  <dick@ximian.com>

	* icall.c:
	* locales.h:
	* locales.c: Internal calls for constructing CultureInfo and
	related objects from libicu (if its available.)

2003-10-09  Zoltan Varga  <vargaz@freemail.hu>

	* debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.

2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: added an argument to async_invoke_thread that is the
	item to process, pass the MonoAsyncResult to the thread start function
	when creating a new thread. This way we don't need to acquire any lock
	when we're creating a new thread. Readded a semaphore for faster
	response times (instead of that Sleep i added).

2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>

	* icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
	get daylight change dates better on Windows, fix handling
	of platforms without tm_gmtoff.

2003-10-06  Martin Baulig  <martin@ximian.com>

	* class.c (inflate_generic_method): Renamed to
	mono_class_inflate_generic_method() and made public.
	(mono_class_init): Don't inflate the generic methods here.
	(mono_class_from_generic): Added `gboolean inflate_methods'
	argument.  Inflate the methods here.

	* loader.c (mono_method_get_param_names): Ignore instances of
	generic types for the moment.

	* reflection.c (fixup_method): Added support for inflated methods.
	(mono_image_create_token): Use mono_image_get_methodref_token()
	for inflated methods.
	(mono_custom_attrs_from_param): Ignore instances of generic types
	for the moment.
	(mono_reflection_bind_generic_parameters): New public function.
	Moved all the functionality from
	ves_icall_Type_BindGenericParameters() here and added support for
	dynamic types.
	(mono_reflection_define_generic_parameter): Initialize
	`klass->methods' here.

	* icall.c (ves_icall_Type_BindGenericParameters): Moved all the
	functionality into mono_reflection_define_generic_parameter().
	(ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
	TypeBuilder, return that TypeBuilder.

2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: removed mono_delegate_semaphore.

	* threadpool.c:
	(mono_thread_pool_add): moved hash table creation inside and the thread 
	creation outside of the critical region.
	(mono_thread_pool_finish): removed obsolete code.
	(async_invoke_thread): don't use the semaphore. Use a plain Sleep and
	continue or exit the thread depending on the queue.

2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>

	* metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
	marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
        handle more bool marshalling options

2003-10-07  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
	arrays of structs. Also add a more descriptive error message when
	a structure member is marshalled as LPArray.

2003-10-06  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_get_native_wrapper): Add support for
	marshalling arrays of complex types. Fixes #29098. Also remove an
	usused and incomplete function.

Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* gc.c: report heap_size - free_bytes as total memory allocated
	(bug#49362).

2003-10-05  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
	fix timezone handling problems on Windows.
	
	* icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
	asserts when the year is outside the range handled by ms the functions.

	* class.c (setup_interface_offsets): If the class is an interface,
	fill out its interface_offsets slot.

2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: mark threadpool threads as background.

2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>

	* decimal.c - define DECINLINE to nothing if not using GCC

2003-10-03  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.c: More refcount fixes.

2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* string-icalls.c: if we're not trimming, return the same string.
	When not splitting, don't create a new string.

2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* image.c:
	(mono_image_open): increment the ref_count inside the critical section.

2003-10-02  Zoltan Varga  <vargaz@freemail.hu>

	* image.c (mono_image_open): Fix reference counting bug.

2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>

	* marshal.c (mono_marshal_type_size) struct alignment changed for 
	64bit machines.  (emit_ptr_to_str_conv)	Fix bool conversions for 
	64bits. Avoid leak in mono_marshal_get_native_wrapper when
	mono_lookup_pinvoke_call throws.	

2003-09-30  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_parse_type): Fix #49114.

	* file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
	temporary workaround for cygwin header problem.

	* object.c (mono_object_isinst): Synchronize this with the code
	generated by the JIT for casts.

2003-09-29  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (encode_type): Fix #38332.

2003-09-26  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_method_from_wrapper): New function to return
	the original method from the wrapper method.

2003-09-25  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
	interncall since it was identical to `Type.GetGenericTypeDefinition()'.
	(ves_icall_Type_get_IsGenericInstance): New interncall.

2003-09-24 Bernie Solomon <bernard@ugsolutions.com>

        * object.c: fix cast warning in big endian code.

2003-09-19 Jackson Harper <jackson@latitudegeo.com>

	* icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
	
2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c: don't call check_env from mono_assembly_load. It's
	already done once in mono_assemblies_init and may cause headaches when
	multiple threads are loading assemblies.

2003-09-19  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_define_generic_parameter): Don't
	allocate `klass->methods', set `klass->flags' to
	TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.

2003-09-18  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): Don't create `class->methods' if it's
	already initialized.

	* metadata.c (mono_metadata_load_generic_params): Make this
	actually work.

	* reflection.c (mono_reflection_define_generic_parameter): Set
	parent class and interfaces from the constraints.

	* reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
	to keep this struct in sync with the declaration in TypeBuilder.cs.

2003-09-17  Martin Baulig  <martin@ximian.com>

	* metadata.h (MonoType): Replaced the data's `int type_param'
	field with `MonoGenericParam *generic_param'.
	(MonoGenericParam): Added `MonoClass *klass'.

	* class.c (mono_class_from_gen_param): Removed the
	`MonoImage *image' and `int type_num' arguments.

	* metadata.c (mono_metadata_parse_generic_param): New static
	method; creates a MonoGenericParam which just contains the index.
	(do_mono_metadata_parse_type): Call
	mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
	MONO_TYPE_MVAR.

	* reflection.c (mono_image_typedef_or_ref): Generic type
	parameters may be in the same assembly, but never use a typedef
	for them.
	(mono_reflection_define_generic_parameter): We're now creating a
	"real" class for the type parameter; it's now safe to call
	mono_class_from_mono_type() on the class'es type, it'll do the
	right thing.

2003-09-16  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
	`symfile->range_entry_size' and `symfile->class_entry_size' here;
	the `symfile' data structure must be fully initialized before it
	gets added to the table.

2003-09-15  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.

	* appdomain.h domain.c (MonoDomain): Added new hashtable to store the
	class init trampolines.

2003-09-11  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
	to the built-in profiler to turn off time and allocation profiling
	respectively.

2003-09-10  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
	g_direct_equal.

	* debug-helpers.c (mono_method_full_name): Print the wrapper type
	in human readable form.

2003-09-08  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c icall.c: Fixed warnings.

	* image.c (load_class_names): Use a temporary hash table to hold the
	namespaces in order to avoid doing many string comparisons.

	* image.h: Fix typo.

	* image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
	Pass NULL instead of g_direct_equal to the GHashTable constructor 
	since the NULL case is short-circuited inside g_hash_table_lookup, 
	leading to better performance.	

	* metadata.c (mono_metadata_custom_attrs_from_index): New function to
	obtain the first custom attribute for a given index. Depends on the
	CustomAttribute table being sorted by the parent field.

	* reflection.c (mono_custom_attrs_from_index): Use the new function 
	for better performance.

2003-09-07  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_init): If we're a generic instance, inflate
	all our methods instead of loading them from the image.
	(mono_class_from_generic): Set `class->methods = gklass->methods'.

2003-09-07  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Added support for constructors.

2003-09-06  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
	New interncall.

	* reflection.c (mono_reflection_setup_generic_class): Call
	ensure_runtime_vtable() to create the vtable.

2003-09-05  Martin Baulig  <martin@ximian.com>

	* class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
	MONO_TYPE_MVAR.

2003-09-04  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_reflection_define_generic_parameter): Generic
	parameters start with zero.

2003-09-04  Martin Baulig  <martin@ximian.com>

	* metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.

	* reflection.h (MonoReflectionGenericParam): New typedef.
	(MonoReflectionTypeBuilder): Added `generic_params' fields to get
	the generic parameters from the managed TypeBuilder.

	* reflection.c (mono_reflection_define_generic_parameter): New function.
	(mono_reflection_create_runtime_class): Encode generic parameters.
	(mono_reflection_setup_generic_class): New function; this is
	called after adding adding all generic params to the TypeBuilder.
	(encode_type): Added MONO_TYPE_VAR.

2003-09-04  Zoltan Varga  <vargaz@freemail.hu>

	* class.h class.c (mono_class_needs_cctor_run): Moved this method
	here from the JIT.

	* assembly.h assembly.c: Moved the AOT loading code into an assembly
	load hook.

2003-09-03  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h reflection.c class.h class.c: Delete duplicate 
	definition of mono_type_get_name () from reflection.c and export the
	one in class.c.

	* class.c: Class loading fixes from Bernie Solomon 
	(bernard@ugsolutions.com).

	* reflection.c: Endianness fixes from Bernie Solomon 
	(bernard@ugsolutions.com).
	
2003-09-01  Zoltan Varga  <vargaz@freemail.hu>

	* assembly.h assembly.c: Define a file format version for AOT
	libraries.
	
	* assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.

	* appdomain.h (MonoJitInfo): New field to determine whenever the
	code is domain neutral.
	
2003-08-31  Miguel de Icaza  <miguel@ximian.com>

	* marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR

2003-08-30  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
	(ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
	Avoid caching the result since strings must be domain specific.	Fixes
	#48050.

2003-08-29  Zoltan Varga  <vargaz@freemail.hu>

	* marshal.c (mono_marshal_init): Make this callable multiple times
	since it is hard to find a correct place to call it.

	* object.c (mono_runtime_class_init): Execute static constructors in
	the correct appdomain.

	* image.c (build_guid_table): Handle the case when multiple images have
	the same GUID.

2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added a couple of icalls for System.Web.

2003-08-28  Martin Baulig  <martin@ximian.com>

	* icall.c (ves_icall_Type_BindGenericParameters): Use
	`klass->generic_inst' instead of `&klass->byval_arg' in the
	mono_type_get_object() call.  The returned type must be
	MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.

2003-08-27  Zoltan Varga  <vargaz@freemail.hu>

	* NOTES: New file.

	* object.c (mono_class_proxy_vtable): Make it thread safe.

	* pedump.c: Fix warning.

	* object.c appdomain.h: Get rid of metadata_section. 
	It is no longer needed and it was causing deadlocks with domain->lock.

	* appdomain.c (add_assemblies_to_domain): Make it thread safe.

2003-08-26  Martin Baulig  <martin@ximian.com>

	* pedump.c (main): Don't call mono_image_close() if `verify_pe'.

2003-08-26  Martin Baulig  <martin@ximian.com>

	* pedump.c (main): Call mono_metadata_init(),
	mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
	and mono_loader_init().

2003-08-26  Zoltan Varga  <vargaz@freemail.hu>

	* loader.h: Add missing include to fix build.

	* image.h: mono_image_load_references is no more.

	* assembly.c: Reworked assembly loading to make it really thread safe.
	After these changes, the assembly returned by mono_assembly_open is
	fully initialized, i.e. all its references assemblies are loaded.

	* assembly.c (mono_image_load_references): Renamed to 
	mono_assembly_load_references, and made private, since clients no
	longer need to call it.

	* class.c: Removed calls to mono_assembly_load_references, since it was
	a source of deadlocks.

	* loader.h loader.c class.h class.c: Protect data structures using a 
	new lock, the loader lock.

	* class.c (mono_class_setup_vtable): Create temporary hash tables and
	GPtrArrays only when needed.

	* class.c (mono_class_layout_fields): Ignore the dummy field inserted 
	into empty structures by mcs. Fixes pinvoke7.cs.
	
	* domain.c (mono_init): Call a new initialization function.

	* appdomain.c (mono_runtime_init): Call the new initializer function
	of the marshal module.

	* marshal.c (mono_marshal_load_type_info): Ignore the dummy field
	inserted into empty structures by mcs. Fixes pinvoke7.cs.

	* marshal.h marshal.c: Added locks around the wrapper caches to make
	this module thread safe.

	* icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
	this argument. Fixes pinvoke1.exe.

2003-08-25  Lluis Sanchez <lluis@ximian.com>

	* object.h: Added call_type field to MonoMethodMessage and the corresponding
	enumeration of values. Removed fields to store remote call output values in
	MonoAsyncResult. Not needed any more.
	* object.c: Initialize call_type and async_result fields in mono_message_init.
	* marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
	dispatching the message.
	mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
	async call to finish. To do it use a message with EndInvoke call type.

2003-08-25  Zoltan Varga  <vargaz@freemail.hu>

	* loader.h loader.c (mono_method_hash_marhal_info): New function which
	determines whenever a method has marshalling info.

2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* assembly.c: fix the build on windows.

2003-08-22 Lluis Sanchez <lluis@ximian.com>

	* object.cs: Fixed bug #47785.

2003-08-22 Jackson Harper <jackson@latitudegeo.com>

	* string-icalls.c (StringReplace): If their are no occurances of
	the old string found return a reference to the supplied
	string. This saves some memory and matches MS behavoir.
	
2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: fixed compilation for systems that define AF_INET6
	and don't define SOL_IP/SOL_IPV6.

2003-08-21  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_object_isinst): Fix casts to TransparentProxy in
	the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).

	* rawbuffer.c rawbuffer.h: Make this module thread safe.

	* domain.c: Make this module thread safe.

	* domain.c (mono_init): Call new initialization function.

	* icall.c (ves_icall_System_Array_SetValueImpl): Check types for
	reference types too. Fixes #38812.

	* image.c (mono_image_init): Fixed warnings.

	* class.c (mono_class_from_typeref): Handle assembly load failure
	correctly.

	* appdomain.c (add_assemblies_to_domain): Handle the case when
	the references of an assembly are not yet loaded.

	* metadata.c image.c assembly.c: Moved initialization of global
	variables to a separate function called at startup since lazy 
	initialization of these variables is not thread safe.
	
	* image.c assembly.c: Made this module thread safe by adding locks in 
	the appropriate places.

	* domain.c (mono_init): Call the new initialization functions of the
	three modules.

2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>

	* marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
	  make a direct call. It is proxy's work to make the call asynchronous.
	  mono_delegate_end_invoke(): If the targe is a proxy, just collect
	  the return values.
	* object.cs: mono_method_call_message_new(): read AsyncResult and
	  state object from parameters list, if this info is requested.
	* object.h: Added fields to store remote call output values in
	  MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.

Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.h: add needed fields to MonoThread.
	* threads.c, threads.h: allow registering a function to cleanup data
	allocated per thread by the JIT.

Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* loader.h: portability fix by Bernie Solomon
	* <bernard@ugsolutions.com>.

2003-08-16  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h reflection.c (mono_param_get_objects): Changed this to 
	return a MonoArray. This simplifies the code and also ensures that
	the cache allways contains an object reference as a value.

	* icall.c (ves_icall_get_parameter_info): Simplified using the new
	function.

2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
	fixes a problem with byte ordering when getting the address family for
	a socket.

2003-08-15  Zoltan Varga  <vargaz@freemail.hu>

	* .cvsignore: Added monosn.

	* reflection.h reflection.c loader.c: Added support for parameter
	marshalling to dynamically created types. Fixes #47295.

Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* rand.c: remove useless warnings.

Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: implemented ldtoken for methods and fieldrefs.

2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: when mono_async_invoke was called, no one took care of
	monitoring the queue. So if the method invoked took some time and we
	got new async invoke requests after 500 ms (the thread created waited
	that long in WaitForSingleObject), the new async invoke was not called
	until the previous one finished.

	This is fixed now. Thanks to Totte for helping with it.

2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threadpool.c: set threadpool_thread to TRUE. Patch by totte.

2003-08-11  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_lookup_type): New function.

2003-08-06  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Added support for static fields,
	properties and methods.

2003-08-06  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Don't store the MonoString's vtable to
	make this work for applications with multiple application domains.

2003-08-04  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Completely reworked the type support; the
	most important thing is that we're now just using one single
	`MonoType' instance per type.

Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>

	* mono-endian.h, mono-endian.c, icall.c: Added icall
	ves_icall_System_Double_AssertEndianity to assert double word endianity
	on ARM (FPA). The icall uses a macro defined in mono-endian.h.

Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h, reflection.c, metadata.c, icall.c: more generics
	support, icalls and fixes.

2003-07-31  Miguel de Icaza  <miguel@ximian.com>

	* unicode.c (ves_icall_System_Char_IsPunctuation): The set of
	classes that are a punctuation character in .NET is not the same a
	g_unichar_ispunct.

Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).

2003-07-29  Miguel de Icaza  <miguel@ximian.com>

	* icall.c: Add new MemCopy internalcall.
	(ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
	Simplified code; It is not necessary to handle all the cases here,
	as the C# code takes care of it.  Only handle the case of the name
	resource embedded into the assembly.

	Changed signature to return the data pointer and the size of the
	data. 

2003-07-26  Miguel de Icaza  <miguel@ximian.com>

	* reflection.c (mono_image_get_method_info): Allow for 0x40 to be
	encoded.	(Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).

2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>

	* socket-io.c: ignore EINTR error in select.

Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: removed unused subclasses field in MonoClass.

2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>

	* icall.c: improve fix of get_base_definition(). If the parent class
	  doesn't have the mehod, look at the parent of the parent.
	* object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
	  to check if a parameter is an in or out parameter
	  (PARAM_ATTRIBUTE_IN is not set by default).
	  mono_method_return_message_restore(): Use mono_class_value_size to
	  get the size of a value type. mono_type_stack_size (parameterType)
	  does not return the correct value if parameterType is byRef.
	  mono_load_remote_field(), mono_load_remote_field_new(),
	  mono_store_remote_field(), mono_store_remote_field_new():
	  raise exception if the remote call returns an exception.

2003-07-28  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_runtime_invoke): New
	method.  This is a wrapper around mono_runtime_invoke() which
	boxes the instance object if neccessary.

Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h, image.c, image.h, loader.c, metadata.c,
	metadata.h, row-indexes.h, verify.c: first cut of generics support.

Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: disable mcs bug workaround.

2003-07-21  Miguel de Icaza  <miguel@ximian.com>

	* object.c (mono_runtime_class_init): Take the metadata_section
	mutex before obtaining the domain mutex.

	* appdomain.h: Added definition of metadata_section mutex here. 

	* object.c: define metadata_mutex here.

2003-07-24  Ravi Pratap  <ravi@ximian.com>

	* icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
	fixed.

2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>

	* reflection.c: Fix bug #46669

2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* exception.c:
	* exception.h:
	* icall.c:
	* object.h: fill in the type name for TypeLoadException.

2003-07-23  Ravi Pratap  <ravi@ximian.com>

	* class.c: Fixes from Paolo in response to bug #45415 (Subclass
	relationship between TypeBuilders while compiling corlib) and bug
	45993 (Array types returned from the runtime while compiling
	corlib were from the loaded corlib).

2003-07-22  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Reworked the type support a bit more;
	distinguish between types and classes.

Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: add IsArrayImpl icall.

2003-07-22  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_layout_fields): Fix gc aware auto layout by
	initializing real_size only once. Also fix bug #46602.

2003-07-21  Jerome Laban <jlaban@wanadoo.fr>

	* object.c: Renamed mono_metadata_section to metadata_section.

2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>

	* icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
	  empty array if the type is an array. Fixed.
	  ves_icall_MonoMethod_get_base_definition: if the base method
	  is abstract, get the MethodInfo from the list of methods of
	  the class.
	* reflection.c: ParameterInfo.PositionImpl should be zero-based
	  and it was 1-based. Fixed in mono_param_get_objects.

2003-07-20  Martin Baulig  <martin@ximian.com>

	* mono-debug.h: Set version number to 31.
	(mono_debug_init): Added `MonoDomain *' argument.

	* mono-debug-debugger.c: Reworked the type support; explicitly
	tell the debugger about builtin types; pass the `klass' address to
	the debugger.

2003-07-20 Jackson Harper <jackson@latitudegeo.com>

	* image.c: Allow new metadata tables to be loaded without a
	warning. Also update the warning message to give the new constant value.
		
Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
	metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
	array type representation changes.

Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c, appdomain.h, appdomain.c: support full runtime shutdown
	on Environment.Exit () call.

Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c, reflection.h, reflection.c, verify.c: cleanups,
	requires a matching corlib.

2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>

	* Changelog: My editor decided to add a CR to each line. Sorry about that.
	  Committed again without the CRs.
	
2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>

	* socket-io.c: Get system_assembly using mono_image_loaded(), instead
	  getting it from the "this" socket instance. Did not work
	  if the socket is a subclass of Socket.
	  Also fixed bug #35371.

Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* metadata.c: fixed size for TypedByRef.
	* loader.c: when searching for a method, consider the vararg amrker.
	* unicode.c, decimal.c: constify some arrays.

2003-07-15  Dick Porter  <dick@ximian.com>

	* socket-io.c: Fixed compilation for gcc < 3.2.

	Fixed compilation for machines that don't have AF_INET6 (thanks to
	Bernie Solomon <bernard@ugsolutions.com> for that part.)

	Fixed compile warnings.
	
	Fixed formatting and line endings.

2003-07-14  Jerome Laban <jlaban@wanadoo.fr>

	* socket-io.h:
	* socket-io.c: Added IPv6 support.

2003-07-13  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_is_assignable_from): New function to implement
	the is_assignable_from logic. Used by mono_object_isinst, 
	Type::IsAssignableFrom () and the interpreter.

	* class.c (mono_class_is_subclass_of): Make all classes a subclass of
	Object, even interfaces.
	
	* object.c (mono_object_isinst): Implement in terms of 
	is_assignable_from.

	* icall.c (ves_icall_type_is_assignable_from): New icall.

2003-07-11  Zoltan Varga  <vargaz@freemail.hu>

	* domain.c (foreach_domain): fix compiler warning.

2003-07-11  Dietmar Maurer  <dietmar@ximian.com>

	* image.c (load_metadata_ptrs): use g_strndup because strndup is
	not available on all plattforms

2003-07-10  Zoltan Varga  <vargaz@freemail.hu>

	* image.h image.c: Store the metadata version string in MonoImage.
	* icall.c: New icall to retrieve the image version.
	* reflection.c (create_dynamic_image): Fill in the image version field
	* reflection.c (build_compressed_metadata): Use the image version
	from the image structure.

2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: modified comment.
	* gc.c: finalizer_thread can call finalizers even when finished == TRUE.
	That will be its last iteration when mono_gc_cleanup is called from
	mono_runtime_cleanup and before the domain is unloaded.

	Fixes bug #45962.

2003-07-04  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
	attributes.

Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
	rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
	Bernie Solomon <bernard@ugsolutions.com>.

Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.c, object.h: provide mono_object_new_fast() for faster
	allocation in some special cases.

Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.h, reflection.h, verify.c: fixes for some 64bit issues,
	mostly from a patch by Laramie Leavitt <lar@leavitt.us>.

Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* threadpool.c: fix leaks.

2003-07-01  Dick Porter  <dick@ximian.com>

	* threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
	using MonoGHashTables.  Fixes threadpool bug posted to list.

Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* image.h, image.c: added support to load an assembly from a byte array.
	* Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
	assembly bundle support.

2003-06-27  Dietmar Maurer  <dietmar@ximian.com>

	* threadpool.c (mono_thread_pool_add): keep a reference to the
	AsyncResult to prevent GC

Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: leak fix.

2003-06-25  Dick Porter  <dick@ximian.com>

	* threadpool.c (mono_thread_pool_add): Don't set up a finaliser
	for the async object, the WaitHandle object will close the handle.
	Fixes bug 45321.

Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: in mono_array_class_get (), lookup from the hash with the
	same type we insert: this works around a bug in
	mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
	lluis. The real fix will have to wait for after the release.

Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix memory leak when getting type members.

Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: added more pubtoken special cases.

Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: handle field offset correctly when class size
	is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).

2003-06-20  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
	*image' field.

2003-06-20  Martin Baulig  <martin@ximian.com>

	* image.h, mono-debug-debugger.h: Fixed compiler warnings.

2003-06-20  Martin Baulig  <martin@ximian.com>

	* mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
	just distinguish between variables in registers and variables at
	an offset relative to a register.

2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: #ifdef out latest changes until mcs is fixed.

Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: return members in metadata order.

Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: avoid infinite loop in GetTimeZoneData.

Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: added Marshal.Prelink/All icalls.

Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.c, object.h: fix warnings and do some overflow checking
	when creating arrays.

2003-06-17  Dick Porter  <dick@ximian.com>

	* file-io.h:
	* file-io.c: File attributes need to be tweaked slightly when
	passed from the managed to the w32 world.

2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
	* profiler.h profiler-private.h profiler.c: Rework last patch
	based on suggestion by Paolo.
	
2003-06-17  Zoltan Varga  <vargaz@freemail.hu>

	* profiler.h profiler-private.h profiler.c: Added infrastructure for 
	instruction level coverage data collection.
	* profiler.h profiler.c (: Added new callback function which can be
	used by the profiler to limit which functions should have coverage
	instrumentation.
	* profiler.c (mono_profiler_load): Call g_module_build_path to
	generate the file name of the profiler library.

Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* profiler.c, profiler.h, profiler-private.h: added basic block 
	coverage profiling API.

2003-06-15  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_create_runtime_class): Add support
	for events in dynamically generated code.

	* gc.c: Start GCHandle indexes from 1, since 0 means the handle is
	not allocated.

Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: when getting timezone info, return reasonable values if we
	can't get the actual data.

2003-06-14  Dick Porter  <dick@ximian.com>

	* threads.c (start_wrapper): Remove the reference to the thread
	object in the TLS data, so the thread object can be finalized.
	This won't be reached if the thread threw an uncaught exception,
	so those thread handles will stay referenced :-( (This is due to
	missing support for scanning thread-specific data in the Boehm GC
	- the io-layer keeps a GC-visible hash of pointers to TLS data.)

Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: ensure streams and tables are first allocated with
	ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).

Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: fixed GetElementType for byrefs (bug# 44792).

2003-06-13  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_create_runtime_class): Add support for
	properties to dynamically created classes.
	* reflection.c: Fix a few places where non-MonoObjects were inserted
	into the tokens hashtable.

Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.c: some support to handle out of memory exceptions.

2003-06-12  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): support reference
	return types

Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.h, object.c: more portability stuff from Bernie Solomon.
	Unexport mono_object_allocate(). Added mono_object_unbox ().
	Set exitcode when an unhandled exception is thrown.

2003-06-11  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): use custom
	marshaler for return types.

2003-06-10  Dick Porter  <dick@ximian.com>

	* socket-io.c: Don't assume that one of struct ip_mreqn or struct
	ip_mreq is available

Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
	mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
	by Bernie Solomon <bernard@ugsolutions.com>.

2003-06-10  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c (mono_gc_init): Avoid error message on shutdown when
	GC_DONT_GC=1 is used.

	* icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
	New icall to return the GUID of a module.

Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: ensure instance size always includes the parent's size
	even whem class size is set explicitly (fixes bug#44294).

Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* profiler.h, profiler.c: made the simple profiler thread-safe,
	get more accurate timing info. Allow the loading of an
	externally-developed profiler module.

2003-06-05  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): improved
	class/byref arguments.
	(mono_marshal_get_native_wrapper): better string marshaling support.

Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: ensure .pack and .size are handled correctly and
	simplified layout of static fields.

2003-06-04  Dietmar Maurer  <dietmar@ximian.com>

	* appdomain.c
	(ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934

	* loader.c (mono_lookup_pinvoke_call): look for modules in the
	current directory (fix bug 44008)

2003-06-03  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): started support for
	custom marshalers.
	(mono_delegate_to_ftnptr): consider marshalling specifications

Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h: emit custom marshal info.

2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c: free the GError.
	* icall.c: added CloseEvent_internal.
	* threads.[ch]:
	(ves_icall_System_Threading_Events_CloseEvent_internal): new internal
	call.

2003-06-01  Zoltan Varga  <vargaz@freemail.hu>

	* loader.c (mono_method_get_signature): Add support for dynamic
	assemblies.

Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixed bug #43905.

Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c, domain.c, icall.c, metadata.h, object.h: support for
	handling TypedReference and ArgIterator.
	* loader.c, loader.h: added function to get signature at call site.

Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
	data readonly. Buglets and warning fixes. Some MethodSpec support.

Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c, object.c: remove relative numbering support.

2003-05-26  Miguel de Icaza  <miguel@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): For now, do not
	free the string, until we get a chance to fix Gtk#

2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* marshal.c: revert last patch.

Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: updates for new mono_class_vtable() not calling
	the type constructor anymore.

Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* object.h, object.c: separate vtable creation from type
	initialization. Make running the .cctor thread safe.

2003-05-26  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): free string return values.

2003-05-21  Dietmar Maurer  <dietmar@ximian.com>

	* loader.c (mono_get_method): consider calling convention

2003-05-21  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
	to return the invisible global type for a module.

	* reflection.c (mono_image_build_metadata): Emit global fields too.

2003-05-20  Peter Williams  <peterw@ximian.com>

	* loader.c (mono_lookup_internal_call): Add a few newlines.

2003-05-20  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
	literal strings.

	* appdomain.c (set_domain_search_path): Recalculate search path when
	AppDomainSetup.PrivateBinPath changes.

	* object.c (mono_class_compute_gc_descriptor): It turns out some
	parts of the class libs (like System.Thread) holds pointers to
	GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
	to treat native int a pointer type here.
	
Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, domain.c: add hashtable for jump target resolution.

2003-05-19  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h reflection.c icall.c: Added new icalls 
	GetManifestResourceInfoInternal, GetModulesInternal and support
	infrastructure.

2003-05-16  Dick Porter  <dick@ximian.com>

	* icall.c:
	* file-io.h:
	* file-io.c: Implement System.IO.MonoIO::GetTempPath

2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>

	* object.c: mono_store_remote_field: little fix to previous patch.

Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: add constructors to array classes.
	* icall.c: special case array construction for InternalInvoke (),

2003-05-14  Zoltan Varga  <vargaz@freemail.hu>

	* class.h class.c reflection.c object.c: Added support for field
	defaults in dynamically generated classes.

Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: properly encode charset for ddlimport.

Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* threads.c: allow compiling without GC.

Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, object.c, object.h, threads.c, threads.h: added
	handling of thread static data.

Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: added mono_custom_attrs_free ().

2003-05-13  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_array_class_get): always set the serializable flags
	(mono_array_class_get): always set the SEALED attribute for array types

2003-05-12  Dietmar Maurer  <dietmar@ximian.com>

	* loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
	attributes (fix for bug 42021).

2003-05-12  Dick Porter  <dick@ximian.com>

	* gc.c: Don't run finalizers when the finalizer thread is
	finishing up, because the default domain has already been
	destroyed.

2003-05-11  Miguel de Icaza  <miguel@ximian.com>

	* string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
	value is null, we should throw an exception.   This is slightly
	different than the other conventions used for the constructor.

2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: fixed windows build.

2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: patch by Jerome Laban that fixes bug #42393.

2003-05-10  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_string_new_wrapper): Compatibility fix for MS
	compilers.

2003-05-09  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_layout_fields): Add experimental GC aware
	auto layout facility. Requires class library changes to work correctly.

	(mono_class_setup_vtable): Avoid overriding explicit interface
	method implementations. Fixes iface3.exe test.

	* object.c (mono_class_compute_gc_descriptor): Type I can't hold an
	object reference.
	(mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
	(mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.

	* metadata.h: Add new type classification macro which determines
	whenever the type holds an object reference.

2003-05-08  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): cleanups

2003-05-07  Zoltan Varga  <vargaz@freemail.hu>

	* gc.c (finalizer_thread): Work around a GC bug.

2003-05-07  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (emit_struct_conv): allow unions

	* class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>

2003-05-06  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke

2003-05-06  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.

2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c:
	(Select_internal): allow NULLs, don't create arrays if not needed.
	Coupled with Socket.cs changes.

	* threadpool.c:
	(mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
	register a finalizer for it that will close the semaphore handle. This
	fixes the leak and make Lupus' test run with > 4080 loops.

2003-05-05  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
	Jerome Laban (bug #42287)

2003-05-02  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h
	(MonoSymbolFile): Moved declaration into mono-debug.h.
	(MonoDebugMethodJitInfo): Likewise.
	(mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
	argument.
	(_mono_debug_address_from_il_offset): Take a
	MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.

	* mono-debug.h
	(MonoDebugDomainData): New struct.
	(mono_debug_get_domain_data): New function.
	(mono_debug_add_method): Take an additional `MonoDomain *'
	argument.
	(mono_debug_source_location_from_address): Likewise.
	(mono_debug_il_offset_from_address): Likewise.
	(mono_debug_address_from_il_offset): Likewise.

Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: one more check for null type in custom attrs.

2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c: avoid warning (comparison is always false due to limited
	range of data type).

2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: throw an exception in Type.GetField if the argument 'name'
	is NULL.

Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixed handling of enums in named arguments to custom
	attributes (bug #42123).

Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: use the right array element type and handle
	a null for a Type argument, too.

Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle arrays as arguments to custom attributes.

Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle a string value in a custom attr
	ctor that takes an object.

2003-04-29  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
	(fix bug #42063)

2003-04-28  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_Type_GetNestedType): Fixed warnings.

2003-04-27  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.h (MonoDebuggerEvent): Renamed
	MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
	MONO_DEBUGGER_EVENT_BREAKPOINT.
	(mono_breakpoint_trampoline_code): Removed.
	(mono_debugger_event_handler): The last argument is now a
	`guint32'.
	(mono_debugger_insert_breakpoint_full): Removed the
	`use_trampoline' argument.
	(mono_debugger_method_has_breakpoint): Likewise.
	(mono_debugger_trampoline_breakpoint_callback): Renamed to
	mono_debugger_breakpoint_callback(); take the method and
	breakpoint number as arguments.

Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* metadata.c: fix off by one when loading parameters attributes.

2003-04-24  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c (mono_debugger_io_layer): Put this back.

2003-04-24  Martin Baulig  <martin@ximian.com>

	* mono-debug-debugger.c: Moved all code which interacts with the
	Mono Debugger here.

	* debug-mono-symfile.c: This code now just deals with the symbol
	file itself, the debugger code is now in mono-debug-debugger.c.

2003-04-23  Martin Baulig  <martin@ximian.com>

	* mono-debug.c (mono_debug_source_location_from_il_offset):
	New method; like mono_debug_source_location_from_address(), but
	takes an IL offset instead of a machine address.

2003-04-23  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
	`line' field; this is now computed by the debugger.

2003-04-23  Martin Baulig  <martin@ximian.com>

	* mono-debug.[ch]: New files.  This is the new debugging interface.

	* mono-debug-debugger.[ch]: New files.  Moved all code which
	interacts with the Mono Debugger here.

2003-04-22  Dietmar Maurer  <dietmar@ximian.com>

	* domain.c (mono_init): initialize mono_defaults.monitor_class

2003-04-21  Miguel de Icaza  <miguel@ximian.com>

	* reflection.c (method_encode_code): Add a spicy exception to help
	future compiler authors.

2003-04-21  Martin Baulig  <martin@ximian.com>

	* icall.c
	(ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
	Make this work with relative pathnames; g_filename_to_uri() needs
	an absolute filename.

2003-04-18  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: Track name changes in Object and ValueType.

2003-04-18  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_type_stack_size): size should be a multiple of
	sizeof (gpointer)

2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* gc.c:
	(internal_domain_finalize): moved into mono_domain_finalize. No need
	to create another thread because the finalizers will be run in the
	finalizer thread.
	
	(ves_icall_System_GC_WaitForPendingFinalizers): implemented.
	(finalizer_notify): if shutting down, wait 2 seconds for the finalizers
	to be run (MS does this too).

2003-04-17  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_class_compute_gc_descriptor): Update comment.

	* loader.h marshal.h marshal.c: Added synchronized method wrappers.

	* image.h: Add synchronized wrapper cache.

	* image.c (do_mono_image_open): Initialize cache.

	* reflection.c (create_dynamic_mono_image): Initialize cache.

2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
	ves_icall_System_Buffer_ByteLengthInternal.

Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: setup klass->nested_in earlier. Allow
	a dash in the assembly name.

2003-04-15  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_type_to_unmanaged): dont access
	type->data.klass for MONO_TYPE_OBJECT
	(mono_type_to_unmanaged): consider System.Delegate class

Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: just setup supertypes in the proper place instead of
	initializing the full element class for arrays.

Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: ensure the element class of arrays is initialized.
	Setup the supertype info for array classes, too.

2003-04-14  Miguel de Icaza  <miguel@ximian.com>

	* icall.c (ves_icall_Type_GetNestedType): Add new internal call.

2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: re-added -m option when running cygpath. This way,
	MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
	separator.
	* mono-config.c: same codepath for locating mono config file for WIN32
	and the rest.
	* assembly.c: if mono_assembly_setrootdir is called, don't override
	the value set.

2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
	MONO_ASSEMBLIES variable.

Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: added Assembly::GetNamespaces() icall.

2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c: fix from Jaak <jaak@zd.com.pl>.

2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>

	* appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
	* object.c: fixed bug in the construction of vtable for proxies

2003-04-10  Zoltan Varga  <vargaz@freemail.hu>

	* object.c (mono_array_new): Mark mono_array_new as an icall.

2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* class.c: fixed test for public method when overriding interfaces.
	Closes bug #40970.

Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, domain.c: added mono_domain_foreach() to
	be able to access the currently loaded appdomains.
	* object.c: make string interning work across sppdomains.
	Mark some functions for use as icalls.

2003-04-09  Zoltan Varga  <vargaz@freemail.hu>

	* class.c reflection.c: Fix memory leaks reported by ccmalloc.

	* reflection.h reflection.c: Allocate long living data using 
	GC_MALLOC_ATOMIC so the collector does not need to scan it.

	* reflection.c: Double the allocation size in streams instead of
	increasing it, to prevent unneccesary copying on large assemblies.
	
	* reflection.c (mono_reflection_create_runtime_class): Avoid vtable
	creation if the assembly does not have the Run flag set.

Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* class.h: avoid the C++ keywords in header files (Jerome Laban
	spotted and fixed this).

2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c:
	(mono_unhandled_exception): fill in the arguments for the
	UnhandledException event. Only trigger that event for the default
	domain (as MS does).

2003-04-04  Zoltan Varga  <vargaz@freemail.hu>

	* object.c: Improve typed allocation stuff based on suggestions from
	Paolo. Also turn it on if the GC library supports it.

2003-04-03  Zoltan Varga  <vargaz@freemail.hu>

	* object.c object.h class.h: Added experimental typed allocation
	facility using the interfaces in gc_gcj.h.

	* os/gc_wrapper.h: Added new include files.
	
2003-04-03  Martin Baulig  <martin@ximian.com>

	All the following changes are conditional to `WITH_INCLUDED_LIBGC'
	which is not yet enabled by default.

	* gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
	functions.
	(mono_gc_lock, mono_gc_unlock): New static functions.

	* threads.c (mono_gc_stop_world, mono_gc_start_world): New public
	functions; stop/start the world for the garbage collector.  This
	is using the windows API; we need to complete the SuspendThread()/
	ResumeThread() implementation in the io-layer to make this work on Unix.
	(mono_gc_push_all_stacks): New public function; tells the garbage
	collector about the stack pointers from all managed threads.

2003-04-03  Martin Baulig  <martin@ximian.com>

	* object.h (MonoThread): Added `gpointer stack_ptr'.

	* threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.

2003-04-03  Martin Baulig  <martin@ximian.com>

	* Makefile.am: It's called `cygpath -w', not `cygpath -m'.

2003-04-03  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (typebuilder_setup_fields): Initialize field.first and
	field.last.

2003-04-02  Miguel de Icaza  <miguel@ximian.com>

	* loader.c (mono_lookup_internal_call): Report the corlib that is
	out of sync.

2003-03-05  Aleksey Demakov <avd@openlinksw.com>

	* icall.c (ves_icall_type_GetTypeCode): fixed check for
	System.DBNull (it's class not valuetype).

Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: set table_idx in MonoReflectionArrayMethod object even 
	if the array method was already assigned a token (fixes bug#40646).

2003-04-02  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_get_type): Attempt type resolve even
	if no assembly is given.

2003-04-01  Miguel de Icaza  <miguel@ximian.com>

	* metadata.h: Added the new tables.

	* row-indexes.h: Added definitions for new tables.

	* metadata.c: Add schemas for new tables, and add support for
	computing the sizes of them.

	* class.c: Update for handling the new type cases.

2003-04-01  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.h (MONO_TYPE_IS_VOID): new macro

2003-03-31  Martin Baulig  <martin@ximian.com>

	* threads.h (MonoThreadCallbacks): Added `thread_created'.

	* threads.c (mono_thread_new_init): Call `thread_created' in the
	mono_thread_callbacks.

2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>

	* loader.h: added marshalbyrefobject_class to mono_defaults
	* domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
	* icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
	  generation of output parameters.
	  ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
	* marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
	  contextbound and the target object belongs to the context of the caller.
	* object.h: added context and unwrapped_server variables in MonoRealProxy.
	* object.c: Implemented support for interfaces and abstract classes
	  in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
	  proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.

2003-03-30  Zoltan Varga  <vargaz@freemail.hu>

	* class.h class.c (mono_class_is_subclass_of): New function.
	
	* icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
	routines for most common case (calls from ArrayList::ToArray).

	* icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
	routine so programs which call Environment::Exit() can be profiled.

	* icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
	Added MONO_ARCH_SAVE_REGS.

	* icall.c (ves_icall_type_is_subtype_of): Use new function.

2003-03-29  Miguel de Icaza  <miguel@ximian.com>

	* blob.h: Add a couple of new MonoType types definitions.

	* tabledefs.h: Add a couple of new call convs.

2003-03-27  Zoltan Varga  <vargaz@freemail.h>

	* reflection.h (MonoReflectionDynamicAssembly): track changes in
	the layout of the class.

	* reflection.c (alloc_table): double the size on overflow to avoid
	unnecessary copying.

	* reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
	avoid filling out metadata tables and blobs. Also set mb->ilgen to
	null so it can be garbage collected.
	
2003-03-27  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_get_type): Return the resolved type
	only if it is in the assembly we searched.

	* reflection.c (ensure_runtime_vtable): Initialize method slots.

	* class.c (mono_class_setup_vtable): Set the slot of the overriding
	method.

2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	(set_domain_search_path): allow 'file://blah'. It's an invalid URI,
	the right one is 'file:///blah', but MS allows it.
	* assembly.c:
	(mono_assembly_open): allow 'file://blah'

	Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).

2003-03-26  Aleksey Demakov <avd@openlinksw.com>

	* socket-io.c: fixes bug #40310.

2003-03-25  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_parse_type): handle deeply nested
	types correctly.

	* reflection.c (mono_image_create_token): Use unique token values
	since they will be put into a hash table.

	* class.c (mono_class_setup_vtable): If a method occurs in more than
	one place in the vtable, and it gets overriden, then change the
	other occurances too.

	* marshal.c (mono_marshal_get_managed_wrapper): Added support for
	object as return type.

2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>

	* icall.c: Deleted "ToString" implementation for double and float
	because they are full implemented in managed code.

Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h: implemented and exported functions
	to retrieve info about custom attributes.

2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: moved Uri handling to assembly.c
	* assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
	work when using a file Uri in *nix and windows.

	* icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
	GetReferencedAssemblies.

2003-03-18  Dick Porter  <dick@ximian.com>

	* icall.c: Rename a couple of internal calls

	* threads.c: Set the thread state to Stopped when a thread exits.
	Fixes bug 39377.

2003-03-17  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
	New icall.

	* object.c (mono_class_vtable): fix warning.

2003-03-17  Zoltan Varga  <vargaz@freemail.hu>	

	* icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.

	* reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
	memory.
	(method_encode_clauses): Create exception info structures in the right
	order.
	(mono_reflection_setup_internal_class): Initialize supertypes field.

	* class.c object.c: Handle interfaces which implement other interfaces 
	correctly.

	* class.h class.c: Move the supertypes array initialization code into 
	a separate function so it can be used for dynamic types too. Also call
	it earlier, in mono_class_init(), since it can be used before the
	type is initialized.

2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am:
	* assembly.c:
	* icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.

	* appdomain.c:
	* appdomain.h:
	* marshal.c:
	* object.c: remove warnings.

2003-03-13  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
	(MonoDebugLexicalBlockEntry): New types.

	* debug-mono-symfile.c
	(_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.

2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* process.c: ret can be any non-zero value accroding to MS doc.

2003-03-07  Miguel de Icaza  <miguel@ximian.com>

	* class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
	fixing a warning for a miss-used prototype, would have cause
	random memory corruption.

2003-03-07  Martin Baulig  <martin@ximian.com>

	* marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
	getting really annoying ....

2003-03-07  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (fixup_method): added support for array methods.

Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>

	* socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
	(pointed out by Michael Adams).

2003-03-04  Dick Porter  <dick@ximian.com>

	* icall.c: Temporarily reverted the Double and Single ToString()
	change, because it broke nunit.

Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>

	* object.h, threads.h: make include files compatible with C++
	(patch by Jerome Laban <jlaban@wanadoo.fr>).

2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>

	* icall.c: Erased ToString helper functions for Double and Single.
	Now, that implementations ar all in managed code (Double and Single
	Formatters).

2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>

	* appdomain.c: Added method for initializing the default context of
	a domain. Added internal call for getting the default context.
	* appdomain.h: Added context variable in MonoDomain struct.
	* domain.c: mono_domain_set also sets the default context of the domain
	* icall.c: Mapped internal method InternalGetDefaultContext.
	* object.c: mono_object_get_virtual_method returns always a remoting
	wrapper if the object is a transparent proxy.
	mono_runtime_invoke_array: when creating an object by calling the
	constructor, if the created object is a proxy, then the constructor should
	be called using the a remoting wrapper.

2003-03-03  Dick Porter  <dick@ximian.com>

	* socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
	variable so it compiles on solaris.  Problem spotted by
	Christopher Taylor <ct@cs.clemson.edu>

2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c:
	(get_info_from_assembly_name): don't leak value.

	* icall.c:
	(ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
	result.

Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>

	* assembly.c: export mono_image_load_references ().
	* class.c: handle function pointers. mono_class_from_name() now
	supports nested type names directly.

2003-02-28  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.h reflection.c: Encode already created dynamic methods 
	and fields correctly as a DEF instead of a REF.

	* reflection.c: Get rid of the force_ref argument to 
	mono_image_typedef_or_ref since it was wrong in the first place.

	* string-icalls.c: add error checking to string constructors according
	to the MSDN docs.

	* reflection.c: Emit types in the order their TypeBuilders were 
	created. Previously, a new table index was assigned to each type before
	the tables were emitted. This was wrong because the signature blob
	might already refer to a type by its original table index.

2003-02-27  Zoltan Varga  <vargaz@freemail.hu>

	* metadata.c (mono_metadata_nesting_typedef): fix bug in previous
	change.
	
2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: make assemblies dir have \ instead of / on windows.

2003-02-27  Zoltan Varga  <vargaz@freemail.hu>	

	* metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
	iterate over the NESTEDCLASS table using a linear search since the
	table is not guaranteed to be sorted by the secondary key.

	* class.c (mono_class_create_from_typedef): fixed up call to
	mono_metadata_nesting_typedef.
	
2003-02-27  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_string_to_byvalstr): clear the memory as
	suggested by Jerome Laban <jlaban@wanadoo.fr>

2003-02-26  Dick Porter  <dick@ximian.com>

	* process.c: Cope with padding in .rsrc blocks

2003-02-26  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.h: reverted the filter_len change, it breaks reflection
	
2003-02-26  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.h: added a new field to store the filter_len
	

Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle custom attributes for types and members
	created with Reflection.Emit (bug#38422).

2003-02-22  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: define RTSpecialName automatically for constructors for
	compatibility with MS.NET.

	* reflection.c (mono_reflection_create_runtime_class): initialize
	nested_in field of dynamically created classes.

2003-02-22  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h: Incremented version number.

2003-02-21  Zoltan Varga  <vargaz@freemail.hu>

	* object.h icall.c process.c: fix warnings.

2003-02-21  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.h appdomain.c:
	(mono_domain_try_type_resolve): split the 
	name_or_tb argument into a name and a tb argument.
	(mono_domain_has_type_resolve): new function to check whenever the
	application has registered a TypeResolve event handler.
	
	* icall.c reflection.h reflection.c: move the type resolve logic into
	mono_reflection_get_type () so it will be invoked when 
	Assembly::GetType () is called.

	* reflection.c:
	(mono_reflection_get_type): renamed to get_type_internal.
	(mono_reflection_get_type): fixed type name generation so it works 
	for nested types too.
	(mono_reflection_get_type): call has_type_resolve () to avoid the 
	costly type name generation if there is no resolve event handler.

Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>

	* class.c, image.c: load exported types from file references.

2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>

	* appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
	  used to cache the managed methods used to create proxies and make 
	  remote invocation of methods.
	* class.h: Added in MonoVTable a flag to indicate that a class needs 
	  to be remotely created.
	* object.c: Modified the method mono_class_vtable(). It now initializes 
	  the remote flag of the vtable. Modified mono_object_new_specific(), 
	  so now it checks the remote flag.
	* icall.c: Added a couple of internal methods, one for enabling instance 
	  creation interception for a type, and one for creating objects bypassing
	  the remote check.

2003-02-18  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
	New interncall to get a method's metadata token.

	* icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
	New interncall for the debugger.

2003-02-18  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_setup_vtable): allocate supertype array

2003-02-18  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.

2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c:
	(assembly_name_to_aname): jump over unknown properties (i've found
	something like: 'type, assembly, version=xxx, custom=null, public...',
	so now will ignore custom=null and still get the rest of the values).

2003-02-17  Dick Porter  <dick@ximian.com>

	* threads.c: Have Thread.Start() wait for a semaphore to signal
	that the thread has set up all its local data.  This fixes bug
	34323, where Abort() raced the new thread's TLS data.

	Also removes the handle_store() call from start_wrapper, because
	threads are now always created suspended and there is no longer a
	race between the parent and child threads to store the info.

Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>

	* image.c: explain the #- heap issue in a message, hopefully
	avoiding FAQs on mono-list.

2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(GetEntryAssembly): if the domain has not invoked
	AppDomain.ExecuteAssembly yet, return the assembly of the default
	AppDomain.

2003-02-16  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_ldtoken): make it work in dynamic assemblies.

Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>

	* metadata.c, reflection.c: simple speedup to type hash
	and equals code.

Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>

	* image.c, image.h, class.c, assembly.c: move module loading
	to MonoImage. When loading metadata, consider alignemnet from
	the start of metadata, not from the metadata address in memory.

2003-02-13  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_reflection_get_custom_attrs): Added support for 
	AssemblyBuilder objects. Factored out custom attribute creation into
	a separate function.
	(create_custom_attr): new function to create custom attributes.

2003-02-12  Miguel de Icaza  <miguel@ximian.com>

	* Makefile.am: Got tired of typing the full pathname to pedump.
	Until there is another option, am installing this.

2003-02-12  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (class_compute_field_layout): always set field->parent 
	(mono_ldtoken): use mono_defaults.fieldhandle_class;

2003-02-11  Dick Porter  <dick@ximian.com>

	* threads-types.h:
	* monitor.c: Rewrote Monitor, making lock much faster and
	Pulse/Wait work as specified.  Also uses much fewer handles, and only
	creates them as needed.

	* exception.c: Added SynchronizationLockException

	* threads.c: Deleted old Monitor implementation.  The new one is
	in a new file.

Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>

	* class.c: handled TypedReference type code. Set the correct size for
	class data. Setup interface_offsets for interface classes, too.

2003-02-09  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h: Reflect latest symbol writer changes.

Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>

	* loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
	* metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
	* object.c: fixed mono_object_get_virtual_method () for interfaces.
	* verify.c: check for code that runs after the end of the method.

2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>

	* icall.c: Added "System.Math::Floor", "System.Math::Round" and
	"System.Math::Round2".
	* sysmath.h: Added Floor, Round and Round2 definitions.
	* sysmath.c: Modified certain functions that were not 100% compliant
	with MS.NET (math precision) and added the implementation of Floor,
	Round and Round2.

2003-02-07  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.

2003-02-07  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c: Reflected latest symwriter changes.
	(mono_debug_create_mono_symbol_file): Removed.
	(mono_debug_open_mono_symbol_file): Take an argument which
	specifies whether to create a dynamic symbol file.

2003-02-07  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF

2003-02-05  Martin Baulig  <martin@ximian.com>

	* reflection.c (mono_image_build_metadata): Make this public,
	protect it against being called multiple times, don't create
	resources and don't build the compressed metadata here.
	(mono_image_create_pefile): Do this here.

	* icall.c
	("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.

2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: fixed bug #36322.

2003-02-06  Piers Haken	<piersh@friskit.com>

	* appdomain.[ch]:
	* class.h:
	* debug-mono-symfile.c:
	* icall.c:
	* loader.c:
	* mono-config.c:
	* monosn.c:
	* reflection.c:
	* socket-io.c: warning cleanups

2003-02-06  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_remoting_invoke_with_check): new
	function. works like remoting invoke, but does a check for the Proxy first.

2003-02-05  Miguel de Icaza  <miguel@ximian.com>

	* appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.

2003-02-05  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): only allocate an
	array of pointers.
	(mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
	(mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.

	* object.c (mono_store_remote_field_new): used by the new jit
	instead of mono_store_remote_field
	(mono_load_remote_field_new): used by the new jit
	instead of mono_load_remote_field

2003-02-05  Patrik Torstensson

	* appdomain.c: changed unload to take the domain id instead
	of domain
	
	* icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload


2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: don't look for assemblies in ApplicationBase if
	PrivateBinPathProbe is set.

2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c: make the first argument in main_args contain the absolute
	path to the assembly. Fixes bug #37511.

2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: get correct UTC offset for countries not using daylight
	time saving. Fixes bug #30030.

2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
	and 1 are the family).

2003-02-04  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_InternalExecute): removed wrong assertion

	* marshal.c (mono_marshal_get_remoting_invoke): generate valid IL

2003-02-04  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c: added support for SignatureHelper tokens, which is
	needed by the Calli opcode.

	* reflection.h: track changes to SignatureHelper class.

	* metadata.c (mono_metadata_parse_signature): handle dynamic tokens.

2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: fixed loading assemblies from PrivateBinPath.

2003-02-03  Patrik Torstensson
	* appdomain.[c|h], domain.c : 
	 - Added support for getting a domain via domain id
	 - Support for setting and getting domain from System.AppDomain 
	   (used in cross appdomain channel)
	 - Added support for get/set for a MonoAppContext on a thread 
	   (Context class in System.Runtime.Remoting.Contexts),
	 - Removed hack in Get/SetData and ExecuteAssembly.
	
	* icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
	the managed world to get control when a proxy is created.

	* icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
	
2003-02-03  Miguel de Icaza  <miguel@ximian.com>

	* icall.c
	(ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
	Populate the codebase field as well.

2003-02-02  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c
	(MonoSymbolFileMethodAddress): Added `wrapper_address' field.
	(mono_debug_symfile_add_method): Allow interncalls.

2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: throw parse exception if strtod fails or the string is empty.

Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>

	* marshal.c: handle object type separately from defined
	class types.

Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>

	* marshal.c: handle NATIVE_LPSTR for strings when it's
	explicitly specified.

Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h, icall.c: setup the reflection
	handle cache for ModuleBuilders and AssemblyBuilders.

2003-01-30  Dietmar Maurer  <dietmar@ximian.com>

	* reflection.c (reflection_methodbuilder_to_mono_method): set
	pinvoke flag

2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: implemented ves_icall_MonoMethod_get_base_definition.

2003-01-29  Dick Porter  <dick@ximian.com>

	* threads.c: No need for the fake_thread kludge now that Thread
	doesn't run a class constructor
	
2003-01-29  Dick Porter  <dick@ximian.com>

	* threads.c: Use g_direct_hash instead of the rather bogus
	g_int_hash

2003-01-29  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): add check for null
	(fix pinvoke12.exe)
	(mono_marshal_get_struct_to_ptr): generate valid IL code
	(mono_marshal_get_ptr_to_struct): generate valid IL code
	(*): correctly set sig->pinvoke, we need to memdup the signature
	to do that

Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>

	* marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
	to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).

Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>

	* profiler.c: provide more callers information.

2003-01-28  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code

	* appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object

	* marshal.c (mono_marshal_get_native_wrapper): generate valid IL code

2003-01-27  Zoltan Varga  <vargaz@freemail.hu>

	* icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
	exception instead of going into an infinite loop on dates which it 
	can't yet handle.

	* string-icalls.c (ves_icall_System_String_get_Chars): raise 
	out-of-range exception if needed.

	* class.c (mono_class_setup_vtable): allow a virtual method to provide
	an implementation for an interface method and to override an inherited
	method at the same time. 
	Imagine a scenario when a virtual method is used to override a
	virtual abstract method in a parent class, and this same method 
	provides an implementation for an method inherited from an interface. 
	In this case, the interface resolution code will set im->slot, which 
	means that the virtual method override pass will skip this method 
	which means a pointer to the abstract method inherited from the parent
	will remain in the vtable of this non-abstract class.

	* class.c: (mono_class_setup_vtable): continue search for a real 
	method if only an abstract method is found.	

Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.c: add size to encoding for ByValStr and ByValArray
	marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).

2003-01-27  Zoltan Varga  <vargaz@freemail.hu>

	* class.c (mono_class_setup_vtable): pass the override info as an
	argument.

	* class.c (mono_class_setup_vtable): set the slot of overriding methods
	correctly.
	
	* reflection.c (ensure_runtime_vtable); add support for method 
	overrides.
	
2003-01-27  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (resolution_scope_from_image): Hack to work to work with
	dynamic assemblies.

	* reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
	added a 'force_ref' argument to force this function to allways return 
	a TypeRef. This is needed by mono_image_get_memberref_token ().
	
2003-01-27  Zoltan Varga  <vargaz@freemail.hu>

	* reflection.c (mono_image_get_type_info): interfaces really don't have
	a parent.

	* reflection.c (mono_image_basic_init): fill out missing fields of
	image structure.

	* reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
	dynamic assemblies. This is required so dynamic assemblies show up in
	AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
	Type::GetType() etc. This is consistent with MS behaviour.

	* image.c image.h reflection.c: add newly created classes to the name 
	cache so mono_class_get () will find them.	

2003-01-27  Zoltan Varga  <vargaz@freemail.hu>

	First part of changes to get IKVM.NET running under mono.
	
	* appdomain.h, appdomain.c: added new function 
	mono_domain_try_type_resolve() which will emit TypeResolve events. 
	This function will call AppDomain::DoTypeResolve to do the actual work.

	* class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
	moved existing code dealing with dynamic tokens to a new function 
	called mono_reflection_lookup_dynamic_token (). This function will 
	raise TypeResolve events when appropriate. Since reflection.c is not 
	part of libmetadata, a new hook function called 
	mono_lookup_dynamic_token() is added to class.c which will call this.

	* assembly.h assembly.c: make the invoke_load_hook function public,
	so it can be called for dynamic assemblies.

	* icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.

	* icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
	type isn't found.

	* reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
	MonoGHashTable, since it contains pointers to objects which the GC 
	needs to track.

	* assembly.c (search_loaded): remove unused variable.
	
Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>

	* object.c: fixed issue exposed by gcc-generated IL programs
	that use RVA data for pointers.

2003-01-25  Martin Baulig  <martin@ximian.com>

	* threads.c (start_wrapper): Moved the initialization of
	`start_func' above the mono_new_thread_init() call to which we
	pass it as argument.

2003-01-24  Martin Baulig  <martin@ximian.com>

	* threads.h (MonoThreadCallbacks): Pass the thread ID instead of
	the MonoThread pointer.

2003-01-21  Miguel de Icaza  <miguel@ximian.com>

	* icall.c: Rename `PowImpl' to Pow.

2003-01-23  Dick Porter  <dick@ximian.com>

	* threads.c (start_wrapper): Create a Thread object if needed, so
	the Main() thread can do the class initialisation in a subthread
	that has been set up to allow managed code execution.

	Pass the thread ID instead of the MonoThread pointer to the thread
	start and attach callbacks.  This change is required, because the
	jit thread start callback must be called _before_ the Thread
	object can be created.
	
	(mono_thread_init): Removed much object creation code that is no
	longer needed.  No managed code is called from here now.

	* object.c (mono_runtime_exec_managed_code): Create a subthread
	for Main, and call back to the runtime to use it.
	Set the exit code when Main exits.

	* gc.c: Make sure domain finalisation happens in a subthread.
	Re-enable threaded GC, fixing bug 31333 (again).

	* environment.c: System.Environment internall calls (so far just
	ExitCode is here, the others are still in icall.c)

	* appdomain.c (mono_runtime_cleanup): All threads running managed
	code should have finished before mono_runtime_cleanup() is
	reached, so no need to clean up threads.

2003-01-22  Martin Baulig  <martin@ximian.com>

	* appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
	`gpointer func' arguments.	
	(MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
	but added `MonoThread *thread' argument.
	(mono_runtime_init): The last argument is now a MonoThreadAttachCB.

	* threads.c (mono_new_thread_init): Added `gpointer func' argument
	and pass it to the mono_thread_start_cb callback.
	(mono_install_thread_callbacks): New public function to install a
	set of callbacks which are set by the debugger.
	(mono_thread_init): The last argument is now a MonoThreadAttachCB.

2003-01-22  Martin Baulig  <martin@ximian.com>

	* Makefile.am: Install debug-mono-symfile.h.

2003-01-21  Aleksey Demakov <avd@openlinksw.com>

	* marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.

2003-01-21  Dietmar Maurer  <dietmar@ximian.com>

	* added the following fix from Jackson Harper <jackson@latitudegeo.com>
	* class.c (mono_ptr_class_get): correctly set access levels of pointers
	(mono_array_class_get): correctly set access levels of arrays

2003-01-20	Patrik Torstensson
	* image.h (MonoAssemblyName): changed major, minor, build, revision
	from signed to unsigned.

2003-01-20  sean kasun <skasun@azstarnet.com>

	* reflection.c (load_cattr_value): Now this handles
	MONO_TYPE_SZARRAY.  Fixes bug #35629

2003-01-20  Miguel de Icaza  <miguel@ximian.com>

	* marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
	integer value

2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* decimal.c: fixed bug #26056.

2003-01-17  Martin Baulig  <martin@ximian.com>

	* gc.c: Raise an ExecutionEngineException instead of using g_error().

2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* exception.[ch]:
	(mono_get_exception_type_initialization): new function.

	* object.c: throw a TypeInitializationException when an exception is
	thrown invoking the class constructor.

2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c: fixed attribute reading.

2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
	provided, look for the type in the calling assembly and then in
	mscorlib; if the assembly name is provided, only try that one.

Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>

	* object.c: register the vtable before there is a chance it's
	queried again recursively.

2003-01-13  Duncan Mak  <duncan@ximian.com>

	* Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
	gc-internal.h. 
	
2003-01-12  Patrik Torstensson <totte@race-x-change.com>

	* string-icall.[c|h], icall.c: Added support for CompareOrdinal mode

2003-01-11  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
	this to 20 for the release.

2003-01-10  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT

	* loader.c (mono_method_get_marshal_info): bug fix

	* marshal.c (mono_marshal_get_ptr_to_struct): don't convert
	structures with explicit layout

Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>

	* profiler.c: made the output more readable (and sorted). 
	Added caller information for the allocation profiler.

2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>

	* icall.c, rand.c, rand.h: Prepended RNG functions with Internal.

2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
	to get value types.
	
Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>

	* object.c, profiler.h, profiler.c, profiler-private.h:
	Added object allocation profiler.

Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: handle global methods.
	Compress blob entries.

Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>

	* marshal.c: fix compilation.

2003-01-09  Dietmar Maurer  <dietmar@ximian.com>

	* loader.c (mono_method_get_marshal_info): impl.

	* metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info

2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
	for reference types.

Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>

	* loader.c: fixed off by one error in loaded parameter names.

2003-01-08  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_icall_wrapper): like
	mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
	instead of a MonoMethod.

2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* decimal.c: fixed bug #36537.

Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>

	* marshal.c: throw a missing method exception if a
	P/Invoke method is not found.

Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: allow a null this for constructors.

Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>

	* icall.c: raise the proper exceptions if the arguments to the
	internal Invoke are incorrect.

2003-01-03  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_ptr_to_struct): code cleanups

2003-01-03  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.

2002-12-31  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.c: Completely rewrote the type section.
	Instead of using individual malloc()ed fields, we use one big
	continuous memory area and offsets into this area.
	See the comments in the source code for details.

2002-12-30  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.

2002-12-30  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
	line number table in this data blob instead of using an external
	pointer.

2002-12-28  Martin Baulig  <martin@ximian.com>

	* debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.

2002-12-22  Rachel Hestilow  <hestilow@ximian.com>

	* marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
	as a boxed return type.

2002-12-21  Miguel de Icaza  <miguel@ximian.com>

	* appdomain.c
	(ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
	g_build_filename to properly get separators on the filename created.

	* object.h: Small change, introduce MonoMarshalByRefObject to
	track the layout of that structure in the C# universe as we make
	changes there.

Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: removed assert to allow static fields on interfaces.
	* loader.c: a TypeSpec may be used for any type, not just arrays.

Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: added mono_class_array_element_size ().
	Ignore static methods in interfaces.

2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* threads.c: fixed the build under cygwin.

Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle nullref constants. Allocate keys for
	reflection handles with the GC.

Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>

	* threads.c, threads.h: added mono_thread_get_abort_signal()
	to get a suitable signal for thread abort.

Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.c: fix handling of ExportedType table.

2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added WriteWindowsDebugString internal call.

2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.h: added fields to match C# implementation.

2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.

2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>

	* gc.h, gc-internal.h: Rename header for GC internal calls to
	gc-internal.h from gc.h as to not clash with Boehm GC having its
	header installed as <gc.h> in outside include paths.
	* appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
	* threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.

2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: assign minor, build and revision in FillName.

2002-12-11  Zoltan Varga  <vargaz@freemail.hu>

	* image.h reflection.h reflection.c class.h class.c loader.c object.c:
	Added support for running code generated by Reflection.Emit.

2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: check for NULL argument in LoadFrom.

2002-12-10  Dick Porter  <dick@ximian.com>

	* threads.c: WaitHandle fixes from Tum <tum@veridicus.com>

2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: fix buglet when building exe file name.  Handle full
	assembly name (needed after latest changes to AssemblyName).
	* image.c:
	(mono_image_close): free some hashtables.

2002-12-05  Dietmar Maurer  <dietmar@ximian.com>

	* threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
	instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
	on some systems (redhat 7.3) 

Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>

	* threads.c: delete the critical section of a sync block,
	spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).

Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>

	* pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.

2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.[ch]: handle the assembly preload event to try loading the
	assemblies using the paths we have in the current domain.

	* assembly.[ch]: created an assembly preload hook that is called to try
	loading the assembly by other means that the ones provided here.

	* domain.c: initialize the domain search path.

	From now on, assemblies (TODO: except corlib and System) are loaded
	according to these rules when using mono_assembly_load ():

		1. It tries to load the assembly from the ApplicationBase
		of the current domain appending .dll and .exe (TODO: have to
		try loading from name/name.dll and name/name.exe).

		2. It tries the search path specified in PrivateBinPath for the
		current domain (if any).

		3. Previous behavior.

Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: implemented GetInterfaceMap() related icall.
	* domain.c, loader.h: load MethodInfo in mono_defaults.

Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: disable the finalizer thread for now, untill all the issues
	with it are resolved.

Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>

	* string-icalls.c: handle embedded nulls in string ctor when the
	length is specified.

Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: look for explicit interface implementation in parent
	classes, too.

2002-12-03  Dietmar Maurer  <dietmar@ximian.com>

	* gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 

Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: protect handles with a critical section.

2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(ves_icall_type_from_name): it now has throwOnError and ignoreCase
	parameters. If no assembly specified, try getting the type from all
	the assemblies in the current domain, else, load the assembly and get
	the type from it.

2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* marshal.c: applied patch from Aleksey Demakov that fixes
	ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.

2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: fixed get_location.

2002-11-28  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
	declarations to make it work with older gcc. 

	* loader.c (mono_get_method): set signature->pinvoke for native calls

2002-11-20  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_init): Set the main thread's handle

Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: allow compilation without GC support. Changed to match the
	mono coding style.

Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.

Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: set a public key token on the core assemblies.

2002-11-18  Dick Porter  <dick@ximian.com>

	* threads.c: Split out some thread initialisation so that other
	files can set the start callback function.

	* gc.c: Run finalisers in a separate thread, to avoid stack
	overflow.  Fixes bug 31333.

	* appdomain.c: Set up GC finalisation thread.

	* reflection.c: 
	* object.c: 
	* domain.c: Use gc.h macros for GC_malloc
	
2002-11-15  Dick Porter  <dick@ximian.com>

	* threadpool.c: 
	* threads.c:
	* appdomain.c: Removed mono_runtime_init_with_attach(),
	mono_thread_create_arg(), and mono_thread_init_with_attach(), by
	merging the extra parameter with the existing function.  Removed
	unneeded code in mono_thread_attach().

2002-11-14  Dietmar Maurer  <dietmar@ximian.com>

	* image.c (mono_image_loaded_by_guid): a method to get loaded
	images by guid. 
	(load_metadata_ptrs): we store the guid as string.

2002-11-11  Dietmar Maurer  <dietmar@ximian.com>

	* assembly.c (mono_assembly_open): check the guid of aot compiled lib.

	* metadata.c (mono_guid_to_string): imported method form Zoltan
	Varga (slightly modified)

	* assembly.c (mono_assembly_open): load precompiled code

	* loader.h (MonoMethod): we store the method token for use in the
	aot compiler. 

2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: insert the loaded assemblies in the domain->assemblies in
	the hook function called when an assembly is loaded.
	
	* domain.c: Modified file.
	(mono_domain_assembly_load): removed hash table insertion of assemblies.

	Fixes bug #33196.

2002-11-07  Miguel de Icaza  <miguel@ximian.com>

	* reflection.c: Map PEFileKind to the value expected by the WinNT
	image loader. 

2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* rand.c: use /dev/urandom. If it fails to open, use the previous one.
	Read until the buffer is filled completely.

2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: implemented MonoType.InternalGetEvent ().

2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: implemented InitAppDomainSetup. Delayed
	AppDomain.SetupInformation until mono_runtime_exec_main, where we get
	the entry_assembly.

	* assembly.c: base_dir is now an absolute path ending with
	G_DIR_SEPARATOR.

	* icall.c: modified get_location according to the above changes.

	* object.c: init AppDomain.SetupInformation for the default domain after
	we have the entry assembly.

	* domain.c: when unloading a domain, setup = NULL.

2002-11-04  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (emit_ptr_to_str_conv): try to fix bug 29548

Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>

	* object.h, object.c: introduced mono_object_get_virtual_method ()
	to lookup the method invoked on an object when a callvirt is done on
	a method.
	* icall.c: make MethodInfo::Invoke() always do a virtual call.

2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
	current domain when loaded an assembly and failed to load it.

	* icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.

2002-10-31  Dick Porter  <dick@ximian.com>

	* icall.c: 
	* file-io.h: 
	* file-io.c: Return the error status in a parameter, as the
	GetLastError() value has long since been blown away if we try and
	look it up in a subsequent internal call invocation.  Delete the
	GetLastError() internal call, because it's useless.

2002-10-31  Dietmar Maurer  <dietmar@ximian.com>

	* class.[ch]: added cast_class to fix bug 29517

Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>

	* marshal.c: create valid IL code in the filter clause:
	the new JIT is less forgiving:-)

2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: removed get_property internal call.

2002-10-25  Zoltan Varga  <vargaz@freemail.hu>

	* appdomain.h domain.c: Added an ID to appdomains.
	
	* threads.c threads.h icall.c: Implement icall
	Thread:GetDomainID(), and remove unused icall 
	CurrentThreadDomain_internal.

2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: Don't recurse through the base types in GetConstructor.
	Fixes bug #32063. 

Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* mempool.h, mempool.c: added mono_mempool_empty() and
	mono_mempool_stats().

2002-10-23  Dick Porter  <dick@ximian.com>

	* file-io.c: 
	* file-io.h: 
	* icall.c: Added MonoIO.GetFileType internal call

2002-10-17  Dick Porter  <dick@ximian.com>

	* appdomain.c (mono_runtime_cleanup): Don't signal the async
	delegate semaphore before waiting for all threads to finish,
	because new threads can also call async delegates.  Fixes bug
	32004.

	* threadpool.c (async_invoke_thread): Only wait for 500ms instead
	of 3 seconds, in case another async job is queued.  (This part is
	needed because the bug fix reintroduced the 3s exit lag.)  This
	makes the mono_runtime_shutdown flag superfluous.

Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: include ehader size in method section headers.
	Really check for suplicated modules entries.

2002-10-17  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Added back support for locals.

2002-10-14  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
	MONO_TYPE_VOID.

2002-10-14  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
	mono_class_get() instead of looking in the class cache.	

2002-10-13  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Set version number to 28, include the
	signature in method names.

2002-10-13  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.h: Set version number to 27.

2002-10-11  Martin Baulig  <martin@gnome.org>

	* gc.c: Don't register/unregister NULL pointers as disappearing links.

Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h: added helper function to allocate signatures.

2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added internal call to get the location of machine.config.

2002-10-08  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Ignore classes with a pending init for the
	moment.

2002-10-03  Dick Porter  <dick@ximian.com>

	* threads.c: Freebsd pthread_t is a pointer

2002-10-03  Dick Porter  <dick@ximian.com>

	* socket-io.c: Implemented GetHostName_internal

2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* mono-config.c:
	(mono_config_parse_file): don't leak the text.

2002-10-02  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Added support for methods.

2002-10-01  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Don't emit methods and line numbers for
	the dynamic symbol file, just write the type table.  We can easily
	have an external helper program which creates a symbol file for an
	IL file.	

2002-10-01  Dick Porter  <dick@ximian.com>

	* threads.c (ves_icall_System_Threading_Thread_Start_internal):
	Only add the handle to the cleanup array when we're about to
	launch the thread.  Bug 31425 deadlocked when the test was run on
	mono under w32.

2002-10-01  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Added support for properties.

Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: unaligned store fix from Mark Crichton
	<crichton@gimp.org>.

2002-09-27  Martin Baulig  <martin@gnome.org>

	* icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
	New interncall.

Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.h, assembly.c: use a sane API to hook into the assembly
	loading process instead of a useless special-purpouse hack
	(ngen needs a hook, too, for example).

2002-09-27  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_init): Call GetCurrentProcess() so
	io-layer can set up some process handle info.  Not needed on w32,
	but doesn't hurt either.

	* process.c: Pass the program name in the second parameter to
	CreateProcess, so the path is searched.  Include the working
	directory. Implemented process name, process enumeration, and some
	process detail internal calls.
	
	* icall.c: Added internal calls for process lookup, and some
	process details

2002-09-26  Martin Baulig  <martin@gnome.org>

	* assembly.c (mono_install_open_assembly_hook): New global
	function to install a function to be invoked each time a new
	assembly is loaded.
	(mono_assembly_open): Run this callback function if set.

	* debug-mono-symfile.c: Put back line numbers for the dynamic
	symbol file and also record the .il file as source file.  This
	allows us to install the temporary symbol file as `file.dbg' just
	like a compiler-generated one.

2002-09-26  Nick Zigarovich <nick@chemlab.org>

	* Corrected typo in gc.c (BOHEM vs BOEHM).

2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: fixed bug #31235 by copying a few lines from GetMethods to
	GetProperties. Also avoid calling g_slist_length in GetProperties and
	GetMethods.

Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: avoid unaligned stores (bug spotted by
	Mark Crichton  <crichton@gimp.org>).

2002-09-25  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
	instead of guint64 for addresses and added prologue/epilogue info.

2002-09-25  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
	store line number info.  For the dynamic symbol file, we only need
	to provide the JIT generated dynamic line number info for the dynamic
	symbol file.

2002-09-25  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.h: Incremented version number.

2002-09-24  Martin Baulig  <martin@gnome.org>

	* class.c (mono_debugger_class_init_func): New global function
	pointer variable.
	(mono_class_init): If mono_debugger_class_init_func is non-NULL,
	call it.

	* debug-mono-symfile.c (mono_debug_symfile_add_type): New
	function.  This is called via the mono_debugger_class_init_func
	hook to add all types to the dynamic type table.
	(ves_icall_MonoDebugger_GetType): New interncall to get a class
	from its metadata token.

	* icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
	New interncall for the debugger.

2002-09-24  Nick Drochak <ndrochak@gol.com>

	* icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
	before using it in case it is null.
	
Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.c: allow custom modifiers in local var signatures
	(bug spotted by Zoltan Varga).

Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: deal with the <Module> class that may have a NULL vtable.
	Eliminate warnings.

Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* image.c, image.h: more strong name helpers.
	* monosn.c: more work: convert pem keys to cryptoapi format.

Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* string-icalls.c: speedup IndexOf.

Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: updates from Zoltan.2.Varga@nokia.com.

Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: cleanup: use mono_object_domain ().

2002-09-23  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Improved type support.

2002-09-22  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Added support for reference types and strings.

2002-09-22  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Started to work on the type table.

2002-09-21  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Largely reworked the symbol table format.
	The symbol table is now incrementally updated each time a new
	method is added.  We're now also using our own magic and version
	so that you don't need to recompile all your classes if the
	dynamic table changes.
	(mono_debug_update_mono_symbol_file): Removed.
	(mono_debug_symfile_add_method): New function to add a method.

2002-09-21  Martin Baulig  <martin@gnome.org>

	* icall.c
	("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
	New interncall.

	* debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
	New interncall to get a method from its metadata token.

2002-09-21  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Create type table.

2002-09-20  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.

2002-09-20  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Provide information about params and locals.

2002-09-20  Martin Baulig  <martin@gnome.org>

	* icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
	New interncall.

	* debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
	interncall to get a method from its metadata token.

2002-09-20  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Added a few checks for method->header
	being non-NULL.  This should never happen, but for the moment
	let's use a g_warning() rather than a g_assert().

2002-09-19  Mark Crichton  <crichton@gimp.org>

	* gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
	even if support for it isn't present.  Added an #ifdef to fix this.

	* socket-io.c: Added checks back for Solaris support.

2002-09-19  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c (read_string, write_string): Reflect latest
	changes in the symbol file format.

2002-09-18  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Set version number to 21.

2002-09-18  Dick Porter  <dick@ximian.com>

	* threads.c (mon_new): Use the GC_MALLOC macro to hide differences
	on netbsd.  Fixes bug 30051.

2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c:
	(set_version_from_string): little fix.

Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* monosn.c, Makefile.am: added strong name utility.
	* reflection.h, reflection.c: implemented delayed signing,
	locale, version and hash id assembly attributes.

Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* loader.c, metadata.c: load param attributes in signatures.

2002-09-16  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Added string table with all method names.

2002-09-14  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.h (MonoSymbolFile): Added method range table for
	fast method lookup.

Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: record the public key token of referenced assemblies.

Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* image.c, image.h: added functions to get the strong name and the
	public key of an assembly.
	* pedump.c: use them.

2002-09-12  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.

2002-09-12  Miguel de Icaza  <miguel@ximian.com>

	* marshal.c (mono_marshal_get_managed_wrapper): Added
	MONO_TYPE_BOOLEAN 

2002-09-11  Martin Baulig  <martin@gnome.org>

	* gc.c: Call GC_unregister_disappearing_link() on all links when
	finalizing them, this is necessary to aviod a crash in boehm's
	finalize handler.

Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: handle GetTarget for finalized objects spotted and fixed by
	nick@chemlab.org.

Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: implemented MonoType::Module.
	* reflection.c, reflection.h: mono_module_get_object () from
	Tomi Pakarinen <tomi.pakarinen@welho.com>.

Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: ignore overridden methods in GetMethods ().
	Fix for FieldInfo::SetValue().
	* object.c: handle float/double in runtime invoke.

Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: allow a constructor to be called again on an object.

Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: move field layout code to it's own function and
	export it. Get an interface id earlier. Move fields in MonoClass
	so they are more cache friendly and align the bitfields.
	* loader.c: temporary handle get_param_names() for a runtime method.
	* reflection.c, reflection.h: more code to handle runtime creation of
	types.

2002-09-09  Martin Baulig  <martin@gnome.org>

	* marshal.c (mono_marshal_get_native_wrapper): We need to use a special
	signature with the pinvoke field being set for the actual call.

Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: removed some unused icalls. Start of map of glib charsets
	to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().

Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* debug-helpers.c: break infinite loop (found and fixed by
	Holger Arnold <harnold@gmx.de>).

Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: target may be null in create_delegate.

Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* marshal.c: handle a boolean return type.

Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: put HIDE_POINTER/REVEAL_POINTER only here.

Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: fix weakreferences.

Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: added icall to get default codepage.

2002-09-03  Dick Porter  <dick@ximian.com>

	* threads.h: 
	* threads.c: Use MonoThread instead of MonoObject where
	apropriate.

	Store running thread objects in a hash table, so that we have all
	the info to hand when waiting for them to finish
	(means we don't need OpenThread() any more, so mingw builds should
	be fully functional again.)

	* verify.c:
	* object.h: Added thread ID to MonoThread

2002-09-03  Martin Baulig  <martin@gnome.org>

	* icall.c (System.Reflection.Assembly::get_location): New interncall.

2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: fixed leak in get_temp_path. Thanks lupus.

2002-09-03  Martin Baulig  <martin@gnome.org>

	* debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
	argument to store the end address of the disassembled instruction.

	* debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
	here from debug-symfile.h.
	(MonoDebugMethodJitInfo): Moved all fields which are filled out by the
	JIT into this struct.
	(MonoSymbolFile): Added `char *image_file' field.
	(MonoDebugGetMethodFunc): Removed.
	(mono_debug_update_mono_symbol_file): Removed the hash table argument.
	(mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
	(mono_debug_find_method): New method.

	* debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
	create a full symbol file.
	(mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
	and static symbol files.
	(mono_debug_find_method): The symbol file keeps an internal method hash,
	call this to get a MonoDebugMethodInfo from a MonoMethod.

	* debug-symfile.[ch]: Removed.

2002-08-29  Miguel de Icaza  <miguel@ximian.com>

	* image.c (do_mono_image_open): Remove linker version check.

2002-08-29  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_managed_wrapper): don't cache
	wrappers for instance methods.
	
2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added ves_icall_System_IO_Path_get_temp_path.

2002-08-28  Dick Porter  <dick@ximian.com>

	* Makefile.am: Export HOST_CC for w32 builds

Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* file-io.c process.c: MonoString are null terminated, no
	need for mono_string_to_utf16() anymore.

Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c, unicode.h, unicode.c: removed unused iconv stuff.

Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c, reflection.h: speedup System.MonoType.

Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: allow null as the value of a string argument in
	custom attributes constructors.

2002-08-27  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
	`trampoline_address' field.

2002-08-27  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): removed wrong null
	check (fixes bug #29486) 

2002-08-27  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c: Changed the file format in a way that allows us
	open it read-only and to use a specially malloced area for all the
	dynamic data.  We can now also generate a symbol file on-the-fly if we're
	debugging IL code and there is no MCS generated symbol file for it.

Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: added a define for a good string and array
	creation speedup (not enabled by default because we need to deal with
	the synch stuff).

2002-08-26  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
	function to create a dynamic symbol file.  This is used by the
	debugger to create a symbol file for IL code on-the-fly.

2002-08-26  Martin Baulig  <martin@gnome.org>

	* loader.c (mono_lookup_pinvoke_call): Include the error message
	from g_module_error() in the error message.

2002-08-24  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
	function to update the symbol file.  The symbol file is mmap()ed
	writable, but private.  This allows us to install the symbol file
	together with the assembly.

2002-08-24  Martin Baulig  <martin@gnome.org>

	* debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
	but they can read the new symbol file format which mcs is now creating.

	* debug-symfile.c (mono_debug_find_source_location): Moved to
	debug-mono-symfile.c; this is now operating on the new symbol file.

2002-08-23  Martin Baulig  <martin@gnome.org>

	* debug-helpers.c (mono_method_desc_from_method): New function to get
	a MonoMethodDesc from a MonoMethod.

Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: fixes assertion failure caused by multiple ExecuteAssembly
	calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).

Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* string-icalls.[ch]: make helper methods static.

2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
	types to it and to SetValueInternal.

	* object.c: Moved handle_enum label to its proper place. This was the
	f... bug! ;-)

	This time i compiled mcs and gtk-sharp and they both work.

2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: reverted partially my previous patch until 
	object.c:set_value handles enums correcly.

2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
	(ves_icall_System_Environment_get_MachineName): removed warning when
	compiling under cygwin.

Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: fixed field_get_value() for reference types.

2002-08-22  Dick Porter  <dick@ximian.com>

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
	Don't free a buffer while it's still needed.  Patch from Jonathan
	Liger <Jonathan.liger@wanadoo.fr>

2002-08-21  Miguel de Icaza  <miguel@ximian.com>

	* icall.c (ves_icall_System_Environment_get_Platform): Add new
	internal call.

2002-08-21  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
	(ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/

	* marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
	we call unmanaged code which throws exceptions.

Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h: added per-domain entry_assembly.
	* appdomain.c: ensure mono_runtime_exec_main () gets non-null
	arguments.
	* icall.c: Assembly::GetEntryAssembly icall.
	* object.c: set domain->entry_assembly in mono_runtime_exec_main().
	Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.

Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, gc.c: added mono_domain_finalize ().

2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c:
	(mono_print_unhandled_exception): changed g_warning by g_printerr
	because g_log has a 1024 characters limit (yeah, i got a big stack
	trace). Don't print exception name, that should be in ToString 
	returned string.

2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added ves_icall_FieldInfo_SetValueInternal.
	* object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.

2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c:
	(mono_print_unhandled_exception): after previous commit, i realized
	that MS calls ToString on the exception. I changed this function to
	do that. This way we get stack_trace for free.

2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* object.c:
	(mono_print_unhandled_exception): invoke Message property instead of
	getting 'message' field from Exception. Don't allocate memory for
	'trace' and 'message' if not needed.

2002-08-18  Dick Porter  <dick@ximian.com>

	* unicode.c: Fix asserts to match Encoder.cs checks

Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* marshal.c: fix unaligned store issue and a few wrong
	opcode argument types.

2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c: added GetUninitializedObjectInternal internal call.

2002-08-16  Dietmar Maurer  <dietmar@ximian.com>

	* appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
	to the right domain.

2002-08-14  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_runtime_invoke): unbox value types

	* class.c (class_compute_field_layout): set blittable to false for Strings

	* appdomain.c (mono_domain_transfer_object): added support for ISerializable

Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, reflection.c, icall.c, object.c, reflection.h:
	first chunk of code to create types at runtime. Code to
	handle ReflectedType/DeclaringType. Make reflection handles
	domain specific.

Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: set correct name in arrays.

2002-08-13  Dietmar Maurer  <dietmar@ximian.com>

	* appdomain.c (mono_domain_transfer_object): make it work with
	valuetypes. bug fixes.

2002-08-12  Dick Porter  <dick@ximian.com>

	* object.h: Rename some parameters to avoid c++ keywords (Patch
	from Joseph Wenninger <kde@jowenn.at>)

Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: added icall to implement Assembly.GetFile*.

Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: code to embed managed resources.

Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: move all the type size stuff into
	class_compute_field_layout().

Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: ensure enums have always the correct instance size.
	* unicode.c: remove wrong assert.

Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c: fix mem corruption issue.
	* image.h, image.c: added mono_image_get_resource () to access
	managed resources.
	* icall.c: implemented Assembly.EntryPoint property and some
	Managed Resources related internalcalls.


Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* image.c, image.h: impemented mono_image_get_entry_point ().
	* appdomain.c: use mono_image_get_entry_point.

Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: support the object type argument when loading
	custom attributes.

2002-08-05  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_managed_wrapper): add suppport for
	String as return type.

Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix encoding of named args for custom attrs to match
	the ms implementation. Read them back when instantiating custom
	attributes.

2002-08-02  Radek Doulik  <rodo@ximian.com>

	* marshal.c (mono_mb_add_data): convert ret value to LE, suggested
	by Dietmar as quick fix
	(mono_marshal_get_delegate_begin_invoke): use sig->param_count +
	16 as stack size, used on more places as quick fix before Dietmar
	will fix it properly

Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.h, object.c: added accessors for fields and properties.

Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: made mono_class_get_field_from_name ()
	loop on parent types.
	Added mono_class_get_property_from_name ().

Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: move the code to setup the type vtable in its own
	function so that it can be reused also for types created at runtime.
	Eliminate the "class" identifier from the header file.
	* reflection.c: setup the vtable for enums so that we can create
	objects for use in SetConstant ().

2002-08-02  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_delegate_to_ftnptr): pass delegate->target
	instead of the delegate itself as this pointer (bug #28383)

2002-08-01  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_managed_wrapper): added return type
	conversions.

Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* loader.c: don't set the pinvoke bit on icalls.

2002-07-31  Dietmar Maurer  <dietmar@ximian.com>

	* debug-helpers.c (mono_method_full_name): only print a number to
	indicate wrapper type (so that the output is more readable in traces).

2002-07-30  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_init): include method override patch from Paolo

Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: fixed GetTypeCode().

2002-07-29  Dietmar Maurer  <dietmar@ximian.com>

	* threads.c (ves_icall_System_Threading_Thread_Thread_internal):
	use real delegate invoke function to make it work with multicast
	delegates (fix bug# 28291).

Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: load constant strings.

Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: no magic numbers.
	* tabledefs.h: security action enum.

Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c: fix possible memory corruption.

Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: added support for linking resources.
	* verify.c: check we have an updated corlib.

2002-07-25  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): correctly marshal
	string arrays.
	(mono_marshal_string_array): null terminate unmanaged string arrays.
	(mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)

Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: Type.GetType () can now return also types from the
	calling assembly.

Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* loader.h, loader.c: stack walking support.
	* icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
	GetCallingAssembly.

2002-07-24  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c: added optimisations for blittable types 

	* class.c (mono_array_class_get): do not set blittable attribute on arrays
	(mono_class_setup_mono_type): set blittable attribute for single
	and double.

	* marshal.c (mono_string_utf8_to_builder): impl.
	(mono_string_builder_to_utf8): impl.
	(mono_marshal_get_native_wrapper): impl. StringBuilder marshaling

2002-07-23  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): impl. byref types
	(mono_marshal_get_managed_wrapper): impl. byref types

2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(search_method): don't display debug message. 

2002-07-22  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_type_stack_size): removed temporary fix for new gcc

Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c: set the missing filename when throwing exception.

2002-07-22  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_type_size): code cleanup
	(mono_type_stack_size): removed some test code

2002-07-21  Miguel de Icaza  <miguel@ximian.com>

	* appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
	mono_get_exception_file_not_found now.

	* exception.c (mono_exception_from_name_two_strings): New version
	that will call a constructor with two string arguments. 
	(mono_get_exception_file_not_found): New helper routine, used to
	report file-not-found errors.

2002-07-20  Dick Porter  <dick@ximian.com>

	* process.h:
	* process.c: Pass file handles to CreateProcess
	
	* icall.c:
	* file-io.h:
	* file-io.c: Implemented CreatePipe

2002-07-19  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_get_param_info): set alignment for value types

Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
	Constify mono_domain_assembly_open().
	* loader.c: handle null namespace in icalls.

2002-07-19  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (emit_ptr_to_str_conv): marshal object as structs
	(emit_str_to_ptr_conv): marshal object as structs

	* metadata.c (mono_type_to_unmanaged): marshal object as structs

	* marshal.c (mono_marshal_get_runtime_invoke): support value types

2002-07-18  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_runtime_invoke): use exception filters
	(mono_marshal_get_native_wrapper): we an now return value types

Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* verify.c: more checks implemented.

2002-07-17  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_delegate_to_ftnptr): invoke the right method
	(fix bug #27695)
	(mono_marshal_get_native_wrapper): allow byref arguments
	(ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
	impl. PtrToStringXXX methods
	(ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
	(ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
	(ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
	(ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
	(ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.

Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix buglet in parsing an assembly name.

2002-07-16  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (emit_ptr_to_str_conv): first impl.

Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c, class.h: cache the vtable in the class as suggested by
	vargaz@freemail.hu (Zoltan Varga).

Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.h, loader.c: added mono_field_from_token().
	* verify.c: first cut of type checking code.

2002-07-16  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): support valuetypes

2002-07-15  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): handle enum types
	(fix bug #27782)
	(mono_marshal_get_remoting_invoke): impl.
	(mono_delegate_begin_invoke): impl.
	(mono_mb_emit_save_args): impl.
	(mono_delegate_end_invoke): impl.
	(mono_marshal_get_delegate_begin_invoke):
	(mono_marshal_get_delegate_end_invoke):
	(mono_marshal_get_delegate_invoke): generate a special name for
	those methods (including the signature) and associate them whith
	the delegate class. 

2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>

	* reflection.[ch]: 
	(mono_reflection_type_from_name): now it has a MonoImage parameter
	which is used as the default image to search the type in. If the image
	is NULL or getting the type from it fails, it defaults to corlib.

	* icall.c: changed 1 call to mono_reflection_type_from_name to match
	new parameter.

Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: update the parameter table index.

Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* domain.c: don't include the mark byte in the string hash.

Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.cs: icall for Type.GetTypeCode ().
	* verify: a couple of fixes and disabled local initialization checks.

2002-07-12  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c: better debugging support (DEBUG_RUNTIME_CODE)

	* debug-helpers.c (mono_method_full_name): print the type of the
	runtime wrapper

	* metadata.c (mono_signature_hash): a hash function for signatures
	(mono_signature_hash): better hash algorithm

	* marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature

	* debug-helpers.c (mono_method_full_name): this can now generate
	method names with signatures

	* marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
	method dont have this pointers.

Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixup typebuilder tokens.
	* image.c: fix buglet.
	* marshal.h: remove whitespace.
	* metadata.h, metadata.c: reinstate code that was removed.
	* verify.c: handle catch directives and fix another couple of bugs.

2002-07-11  Dietmar Maurer  <dietmar@ximian.com>

	* marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
	(mono_marshal_get_native_wrapper): make it comp. with the old code
	(mono_marshal_get_native_wrapper): support boolean
	(mono_marshal_get_managed_wrapper): support more types

2002-06-25  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (class_compute_field_layout): compute class->blittable attribute.

2002-07-09  Dick Porter  <dick@ximian.com>

	* threads.c: Make the thread cleaning up cope with threads that
	call ExitThread()

2002-07-08  Radek Doulik  <rodo@ximian.com>

	* reflection.c (method_encode_code): use non-translated values to
	compute finally_start, this fixes exception handling on ppc, yay!

	* decimal.h (struct signscale): fix endianess

2002-07-07  Radek Doulik  <rodo@ximian.com>

	* reflection.c: swap box_val and not val

Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h: handle full assembly info in type name.
	Handle Type arguments when loading custom attributes.
	* icall.c: updated to use new mono_reflection_type_from_name () method.

2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* loader.c:
	(method_from_memberref): also print assembly name when method not found.

2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(ves_icall_TypeGetProperties): fixed bug #27473. 

2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* reflection.c: display image name and token when cannot find the
	.ctor for an attribute.

2002-07-05  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.

2002-07-04  Dick Porter  <dick@ximian.com>

	* threads.c (mono_thread_cleanup): Nasty kludge to get this to
	compile on mingw.  This will cause mingw builds to not wait for
	subthreads to terminate after the main thread does.  I've lodged a
	bug with the mingw developers for them to wrap OpenThread().

2002-07-03  Dick Porter  <dick@ximian.com>

	* threads.c: Store thread IDs instead of handles, because
	GetCurrentThread() returns a pseudohandle and therefore stores
	useless values.  mono_thread_cleanup() continues checking the
	array of threads until it is empty, to cope with subthreads
	spawning new threads after the main thread has finished.

	* profiler.h:
	* profiler.c:
	* profiler-private.h: Pass the thread ID to thread profiler
	functions, instead of a handle

Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* verify.c: fixes to make it more usable.
	* pedump.c: added --verify code to verify IL code in an assembly.

Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: turn errors into warnings to allow compiling corlib.

Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: add special cases to compile corlib.

Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle properties with only a set method.

Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* opcodes.h: add enum with opcodes in opval order.

2002-07-01  Dick Porter  <dick@ximian.com>
	
	* object.h:
	* object.c (mono_runtime_run_main): Removed unneeded argument

2002-06-28  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.

2002-06-27  Dick Porter  <dick@ximian.com>

	* threads.c: Store the handle in both the parent thread and in the
	subthread, to minimise the time between starting a new thread and
	storing its ID.

2002-06-26  Dick Porter  <dick@ximian.com>

	* appdomain.c (mono_runtime_cleanup): Close the socket library
	after all the threads have finished, not before

2002-06-26  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c (mono_debug_find_source_location): Added
	`guint32 *line_number' argument.  If it's not NULL, store the line number
	there and return the file name without the line number.

2002-06-25  Dick Porter  <dick@ximian.com>

	* icall.c:
	* process.h:
	* process.c: Process forking and other support functions

2002-06-25  Dick Porter  <dick@ximian.com>

	* image.c (do_mono_image_open): Set ref_count to 1, so that bad
	things dont happen when the image is closed.
	(mono_image_lookup_resource): Walk the resource section looking
	for a particular entry

	* cil-coff.h: PE resource section decoding

2002-06-25  Dick Porter  <dick@ximian.com>
	
	* assembly.h:
	* assembly.c: 
	(mono_assembly_foreach): Accessor functions to walk the list of
	loaded assemblies
	(mono_assembly_set_main):
	(mono_assembly_get_main): Process methods need to know which
	assembly is the "main" one

	* object.c (mono_runtime_run_main): Record the main assembly

	* debug-helpers.c: Fix typo

2002-06-24  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
	(ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.

Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.

2002-06-21  Miguel de Icaza  <miguel@ximian.com>

	* image.c (do_mono_image_open): Initialize reference count,
	otherwise we leak the MonoImage.

Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: small tweak to handle self-hosting.

Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix type name parse code.

Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: break out of the loop.
	* image.c: special case corlib.

Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: add all the custom attrs at the end to ensure the
	ctors have been properly initialized when the attributes are defined
	in the current assembly.

Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle correctly multiple-nested types.

Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* row-indexes.h: fix typos.
	* reflection.c: adjust for typos and fix method_def_or_ref
	encoding in MethodImpl table.

Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix entry point patching (thanks Serge!).

2002-06-18  Dietmar Maurer  <dietmar@ximian.com>

	* verify.c: add check for System.Exception

Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* image.c, class.c: minifix for code just c&p'ed.
	* reflection.c: warning fix.
	* object.h, loader.h, domain.c: load also StringBuilder.

Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* marshal.h, marshal.c: some support code to handle complex marshaling.

Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c, reflection.c: handle ignorecase in GetType ().
	Better signatures with vtable error dump.

Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h, icall.c: fixes for multiple-nested types.

2002-06-17  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_Type_GetField): impl.

Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c: added mono_metadata_get_marshal_info()
	to retrieve a marshal description blob for a field or param.

Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: change order of nested type emission
	to avoid table corruption. The NestedTypes table is sorted.
	* icall.c: change order of GetConstructor results to workaround mcs bug.

Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: handle field and param marshal
	information.

Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c, marshal.c marshal.h: more Marshal class implementation.

Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix call convention.

Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: mono_image_get_memberref_token()
	takes a type instead of a class, now. Added
	mono_image_get_array_token() to create tokens for the special
	multi-dim array methods.

Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c: handle modules (no assembly table). Split
	loading references in its own function.
	* class.c: handle moduleref resolution scope.
	* image.c, image.h: cache module name in image.

2002-06-07  Martin Baulig  <martin@gnome.org>

	* reflection.c (mono_image_get_type_info): Only add a class layout entry
	if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).

Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: more signature fixes that used uint instead of int.

Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixed signature of field refs.

Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, reflection.c: handle typerefs of nested types
	(both on read and when writing files).

Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix method signatures that tried to workaround the previous
	typo, d'oh!

Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* debug-helpers.c: fix typo.

Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
	rewrote the PE/COFF writing code (our programs are understood by the
	ms runtime, now).

Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c, gc.h, icall.c: weakreference support.

Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, mono-config.c: use $(sysconfdir).

Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: changed default precision of Double.ToString() to 15.
	Fixed memory leak. Unified with Single.ToString.

Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* sysmath.c: workaround systems missing NAN and/or HUGE_VAL.

Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
	gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
	warnings and compilation fixes from Dennis Haney (davh@davh.dk)
	and myself.

Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* debug-symfile.c, sysmath.c: yet more compilation fixes.

Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c, socket-io.c: more compilation fixes.

Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
	domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
	unicode.c: warning and compiler compatibility fixes.

Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.h, metadata.c: fixed warnings/compilation errors.

Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, mono-config.c, mono-config.h: configuration file
	support routines.
	* loader.c, loader.h: make Dll mapping configurable at runtime in the
	config file. Export methods to insert and lookup mappings.

Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle types and boxed objects in custom attr
	constructors.

2002-05-30  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c
	(ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.

Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h: added mono_metadata_implmap_from_method()
	to lookup the implmap row for a P/Invoke method.
	* loader.c: added mono_lookup_pinvoke_call(): we only lookup a
	P/Invoke method from the runtime on an as needed basis.

2002-05-28  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_metadata_parse_signature): impl.

Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: handle .pack directive.

Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: initialize static fields with RVA data.

2002-05-25  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c
	(ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.

2002-05-24  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c
	(ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
	(ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
	`ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.

Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: special case string ctros in invoke.
	* gc.c: silly whitespace changes.

2002-05-23  Dietmar Maurer  <dietmar@ximian.com>

	* threadpool.[ch]: impl. a threadpool that can
	be used by mint and mono.

2002-05-22  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
	The first argument is now a `MonoReflectionModuleBuilder *', the return
	value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
	`methods' field to get the method builder.  The `token' argument is the
	unfixed token.

	* unicode.c (iconv_get_length, iconv_convert): Silently ignore all
	invalid characters instead of g_assert_not_reached()ing.  This seems
	to be the behaviour of mscorlib.

2002-05-22  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_runtime_invoke_array): applied patch from Rachel
	Hestilow to fix bug #25104

2002-05-21  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c (mono_debug_find_source_location): New function.
	Looks up an IL offset in the line number table and returns the source
	location as a string.

2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	(mono_double_ToStringImpl): changed %f by %g until we have something
	better.

2002-05-21  Nick Drochak  <ndrochak@gol.com>

	* icall.c : Use different name for Math.Pow's icall.  Needed to check
	parameters first in C#.

Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c, reflection.h: added icall to get info about an event.

2002-05-20  Radek Doulik  <rodo@ximian.com>

	* object.c (mono_value_box): don't use memcpy for boxing on BIG
	endian
	(mono_value_box): don't use memcpy for small sizes on
	architectures with unaligned access

2002-05-20  Martin Baulig  <martin@gnome.org>

	* reflection.c (mono_reflection_setup_internal_class): Don't crash
	if `tb->parent == NULL'.
	(mono_reflection_create_internal_class): New function.  This is
	called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
	for enum types.

	* icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
	New interncall.

2002-05-19  Martin Baulig  <martin@gnome.org>

	* unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
	argument to get the length, don't default to the array length.

2002-05-18  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c (mono_assembly_setrootdir): New function used to
	override the MONO_ASSEMBLIES directory.

Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: ValueType_GetHashCode() initialize local var.

Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: sort custom attributes table.

Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: support named args in custom attributes (write support).

Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix finally position calculation.

2002-05-15  Radek Doulik  <rodo@ximian.com>

	* reflection.c: fixed endianess at many places

	* icall.c (ves_icall_InitializeArray): comment out debug msg

2002-05-15  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_unhandled_exception): new function to handle
	unhandled exceptions.
	(mono_unhandled_exception): call the UnhandledException event.
	(mono_runtime_delegate_invoke): impl.

Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c, class.c: mono_metadata_field_info ()
	returns the RVA, not the direct pointer to the data. Handle the case
	when the class size is fixed.

Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fix some endianess issues.

2002-05-14  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_runtime_invoke): is now able to catch exceptions.

	* threads.c (mono_thread_init): added a callback which is invoked
	at thread start.

2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
	
	* icall.c: make GetHashCode return non-negative values.

2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>

	* object.c, icall.c, gc.c: revert to address-based hashcode.

2002-05-13  Miguel de Icaza  <miguel@ximian.com>

	* icall.c (mono_double_ParseImpl): Added ParseImpl method.

Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c, class.c: special case <Module>.

2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>

	* icall.c: fix bug in GetNow().

2002-05-11  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_runtime_class_init): make sure that we call all
	static class constructors.

Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: sort methodsemantics table.

Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: honour init locals setting.

Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>

	* icall.c: copied Double ToStringImpl for Single ToStringImpl

Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: support ContructorBuilders in attribute blob creation.

Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: some changes to build a binary that can be run
	directly in windows.

Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* loader.c: print a big message when an icall can't be found.

2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* string-icalls.c: fix bug 24248.

Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
	icall.c, reflection.h: separate assembly loading by pathname and by
	assembly name. Use the MONO_PATH env var to search for assemblies.

Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c, image.h: add some support for assemblies
	with multiple modules.
	* class.c, class.h: export mono_class_from_typeref().
	* loader.c: remove duplicated code and use mono_class_from_typeref(),
	instead.

Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* unicode.c: Char.IsNumber doesn't include hex digits as the ms
	documentation says (the ECMA one is correct).

2002-05-02  Dick Porter  <dick@ximian.com>

	* threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
	Don't name the synchronisation mutex.

2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>

	* rand.c
	(ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
	Make the prototypes match.
	(ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
	Same.

	* icall.c
	(ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
	systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
	all systems have tm.tm_zone, so use strftime() with %Z to print
	the timezone abreviation into a temp string.

	* object.c (mono_ldstr): Fixed to use mono_string_chars() macro
	rather than mono_array_addr() on a MonoString on Big Endian
	machines.

2002-04-30  Dietmar Maurer  <dietmar@ximian.com>

	* string-icalls.c (ves_icall_System_String_InternalReplace_Str):
	fix bug 24041

2002-04-30  Dick Porter  <dick@ximian.com>

	* socket-io.c: Cope with SOCKET being an integer rather than a
	pointer now.

	* threads.c: Added Thread_free_internal, to deal with thread
	handle cleanup.  Moved calls to handle_store() and handle_remove()
	to start_wrapper(), so each can only be called once.  Allocate
	synchronisation blocks with GC_malloc(), and use GC finalisation
	to close the handles.

	* icall.c: added System.Threading.Thread::Thread_free_internal

Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: support Environment.Exit, CommandLineArgs().

Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c, object.h: added mono_runtime_run_main () and
	mono_runtime_get_main_args () for use in System.Environment.

Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c: fix thinko, enable actual finalization since the jit is now
	fixed.

Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* gc.c, object.c: take into account that an object may be offset wrt the address
	returned by GC_malloc().

Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* image.c: handle files without entries in the assembly table (modules).

2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>

	* reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
	mcs selfhosting	again (build breaker) and did move the check to class instead. parent is
	allowed to be null when it's System.Object class setup.

2002-04-27  Martin Baulig  <martin@gnome.org>

	* reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
	if `tb->parent == NULL' rather than crashing.

2002-04-28  Nick Drochak  <ndrochak@gol.com>

	* sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
	calling acos() where asin() should have been called.

2002-04-26  Martin Baulig  <martin@gnome.org>

	* assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
	instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
	there's a subdirectory called `System', but we don't want to read that
	subdirectory as an assembly.

2002-04-25  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c: Reflect latest MonoString changes.

Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* rand.c, rand.h: instance method icalls need to have an explicit
	this pointer as first argument in the C implementation.

2002-04-25  Nick Drochak <ndrochak@gol.com>

	* icall.c: Fix typo in map for GetNonZeroBytes

2002-04-24	Patrik Torstensson <patrik.torstensson@labs2.com>

	* string-icalls.c : String does now passes unit tests without any 
	errors, the following changes has been made:
	
	Implemented replace methods.
	Renaming of methods to (try) follow the standard.
	Fixed compare ordinal
	Made all memory allocated directly to function instead of via icall function.
	Small performance fix in is_in_array function
			
 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>

	c (mono_string_Internal_ctor_charp_int_int):
	(mono_string_Internal_ctor_sbytep_int_int):  Removed check for
	sindex < 0, throw ArgumentOutOfRangeException instead of
	ArgumentNullException.

	Added new check for length == 0, however
	I need to make it return String.Empty from the C code.
	
	(mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
	that calculate the length for us here.
	
	(mono_string_Internal_ctor_sbytep_int_int): Replaced
	mono_string_new_utf16 with mono_string_new, since value is utf8.

Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: register the object for finalization if needed.
	Allocate one more char in the string for the terminating 0 char.

Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h, image.c: check if a type implemenst a destructor.
	Use the proper key for array class lookups.
	* icall.c: register the icalls in the System.GC class.
	* gc.c, gc.h: GC-related functions and icalls.

2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* icall.c:
	* socket-io.c:
	* unicode.c: free some strings gotten from mono_string_to_utf8 and
	changed a couple of free () by g_free ().

	* decimal.c: one-liner in the comments for decimal2string ().

2002-04-24	Patrik Torstensson <patrik.torstensson@labs2.com>

	* object.c (mono_runtime_invoke_array) : Bug because of my incompetence.

2002-04-24	Patrik Torstensson <patrik.torstensson@labs2.com>

	* reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
	* object.c (mono_runtime_invoke_array) : handle null in params

2002-04-23	Patrik Torstensson <patrik.torstensson@labs2.com>

	* string-icalls.c: fixed bug in split (one off bug)

2002-04-23	Patrik Torstensson <patrik.torstensson@labs2.com>

	* string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
	* icalls.c: added String::Equals as internal method

2002-04-23	Patrik Torstensson <patrik.torstensson@labs2.com>

	* threads.c: fixed bug in the double interlocked functions

2002-04-22	Patrik Torstensson <patrik.torstensson@labs2.com>

	* threads.c: implemented all of the new interlocked icalls.
	* string-icalls.c: fix a bug in insert.
	* icalls.c: added the icalls for interlocked, removed old string functions.
	
Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* loader.c: fix off-by-one error when reading argument names.

Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* profiler.c: win32 counter implementation (untested).
	* icall.cs: win32 GetNow() and GetTimeZoneData() implementations
	(the latter needs testing and more complete impl. from win32 folks).

2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>

	* object.c: mono_array_new_full workaround mono_array_class_get
	problem.

2002-04-17	Patrik Torstensson <patrik.torstensson@labs2.com>

	* string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
	* object.h (mono_string_chars): Changed casting type.

2002-04-17	Patrik Torstensson <patrik.torstensson@labs2.com>

	* string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
			   method signatures to use gunichar2 instead of gint16.

2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>

	* object.h, object.c: domain-specific versions of mono_object_new and
	mono_array_new.

2002-04-20  Dietmar Maurer  <dietmar@ximian.com>

	* object.c: changed String layout

	* string-icalls.c (mono_string_Internal_ctor_chara): added
	internal string constructors.

Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* threads.c: pass 'this' to the thread start routine.

2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* string-icalls.c: fix IndexOf and LastIndexOf. Now
	InternalCompareStr don't call twice mono_string_cmp_char for the last
	character. Improved performance in mono_string_cmp_char.

Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
	code into its own library: libmonoruntime.

2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>

	* object.h, object.c: changed array format so that szarrays do not
	require a bounds structure.
	* icall.c, appdomain.c: support for new szarray format.

Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.c: compare also the retuns type when comparing signatures:
	we didn't do this as an optimization since really overloaded methods
	must differ also in the arguments, but this doesn't work with
	low-level IL code (or when using explicit conversion operators: see
	bug#23498 for an example).

Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* loader.c: SZARRAY types can be saved as TYPESPEC, too.

Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: make MonoType::GetElementType its own icall.

Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: remove MonoMethod_get_Name().
	* reflection.c, reflection.h, verify: cache the method name in the MonoMethod
	object.

2002-04-17	Patrik Torstensson <patrik.torstensson@labs2.com>

	* string-icalls.c: optimized a few methods.

2002-04-17	Patrik Torstensson <patrik.torstensson@labs2.com>

	* icall.c: added all new string internal calls
	* string-icalls.c: added, new string internal call implementation.
	* object.c: added mono_string_new_size for allocating a string a size

2002-04-17  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_object_isinst): use the same code as in the
	optimized x86 version.

Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* profiler.c: TSC-based timer code (faster and more accurate).
	Not hooked up in configure, yet (set USE_X86TSC to 1).

Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* profiler.c, profiler.h: track time spent compiling methods.
	* threads.c: track thread creation/destruction.

Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* profiler.c, profiler.h, profiler-private.h: profiling interface
	and sample implementation. Moved here so that it can be used also by
	the jit.

Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c, reflection.h: keep types and other handles separate in
	the hash tables for referred tokens. Add guid for modules.

Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c: fix bugs found with valgrind.
	* metadata.h, metadata.c: added mono_metadata_guid_heap().

2002-04-14	Patrik Torstensson <patrik.torstensson@labs2.com>

	* threads: added icall support for getting current domain for
	           the thread.
 
2002-04-13  Martin Baulig  <martin@gnome.org>

	* debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
	(MonoDebugVarInfo): Added `index' field for register based addresses.
	(MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
	(MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
	`MonoDebugVarInfo *params' and `guint32 this_offset' with
	`MonoDebugVarInfo *this_var'.

	* debug-symfile.c (relocate_variable): New static function to write
	a location description for a local variable or method parameter.

2002-04-12  Martin Baulig  <martin@gnome.org>

	* debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
	stack offset and begin/end scope address of a local variable.
	(MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
	'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
	(MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.

	* debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
	Added new relocation types for start/end scope of a local variable.

Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* object.h: add mono_object_domain() macro.
	* reflection.c: handle typespecs.
	* icall.c: MonoMethod::get_Name() implementation.

Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: String::GetHashCode() icall implementation.

Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: String::IndexOfAny icall.
	* object.c, object.h: make array->max_length more useful.
	Intrduced mono_object_class() and mono_string_length() macros.

2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
	instead of g_unichar_isdigit.

2002-04-11  Nick Drochak  <ndrochak@gol.com>

	* icall.c: Implement a simple Double.ToString().

Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h: only io-layer.h is supposed to be included.
	* icall.c: explicitly import environ. Fix warning.

2002-04-10  Nick Drochak  <ndrochak@gol.com>

	* icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
		return true even if it's not Daylight Savings time.
		Only return false for the case where the function isn't
		implemented for a plaform (read Windows).

Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
	data with a mutex.

2002-04-09  Dietmar Maurer  <dietmar@ximian.com>

	* mempool.c (mono_mempool_alloc): only use g_malloc when
	absolutely necessary.

2002-04-08  Dietmar Maurer  <dietmar@ximian.com>

	* mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8

	* class.c (mono_class_vtable): use domain mempool to allocate vtable
	(mono_class_proxy_vtable): use domain mempool

Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, appdomain.c: split initialization that requires the
	execution engine support into mono_runtime_init().

2002-04-08  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_init): don't include vtable inside MonoClass
	to save some memory, gather some statistics.
	(mono_class_vtable): use g_malloc instead of GC_malloc when possible

Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: internalcall implementation for ValueType.Equals().

2002-04-06  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_message_init): moved 
	(mono_runtime_exec_main): new arch. independent impl.
	(mono_runtime_invoke_array): new method - like
	mono_runtime_invoke, but you can pass an array of objects.
	(mono_remoting_invoke): new arch. independent impl.
	(mono_message_invoke): new arch. independent impl.
	(mono_runtime_class_init): new arch. independent impl.
	(mono_runtime_object_init): new arch. independent impl.

Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.c, object.c, reflection.c: documented the exported
	functions.

Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: simpler code to pass the assembly builder data to corlib.
	Implement GetNestedTypes() internalcall.

Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: warn if a type can't be loaded.

2002-04-04  Dietmar Maurer  <dietmar@ximian.com>

	* image.h: typedef MonoImageOpenStatus
	* types.h: removed unused file
	
2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>

	* icall.c: Enum_ToObject accepts enum value arguments.

Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: move initialization of properties, events and nested
	classes, so that they happen for interfaces, too.

Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: cleanup some ugly casts in Array_SetValue*.

Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: the values array fro enums is of the correct type, now.
	Implement (correctly) getFullName instead of assQualifiedName for
	MonoType.
	* reflection.h, reflection.c: added mono_type_get_name ().

Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c, image.h: for each MonoImage, record from wich assembly
	it was loaded.
	* reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
	Make Type.Assembly work.

2002-04-03  Dietmar Maurer  <dietmar@ximian.com>

	* debug-symfile.h: use char* instead of gpointer to avoid
	unnecessary casts.

	* appdomain.c (mono_jit_info_table_find): use char* instead of gpointer

	* icall.c (ves_icall_InternalExecute): impl. FielSetter
	(ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast

2002-03-30  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (mono_message_init): impl. (code cleanup)
	(ves_icall_InternalExecute): impl. FieldGetter

	* class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
	defined we call all (non-static)methods through the vtable. 

Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: it seems GC_debug_malloc() makes the Boehm GC call the
	finalizer even though the memory is still referenced (and the chunk of
	memory is not freed).

Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c: fix brokeness.

Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: kill some warnings. Check explicit interface method
	implementation also without considering the namespace.
	Load also literal strings in static class data.

2002-03-29  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c (default_assembly_name_resolver): Kill memory leak. 
	(default_assembly_name_resolver): Make the resolver take the
	"base" directory where the assembly was originally defined, so we
	can load DLLs that are in the same directory as the assembly that
	is being referenced.

2002-03-28  Dick Porter  <dick@ximian.com>

	* file-io.h: 
	* file-io.c:
	* socket-io.c: 
	* unicode.h: 
	* unicode.c: Warning cleanups

Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>

	* object.h, reflection.h: use the correct type instead of MonoObject.

2002-03-28  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
	(mono_debug_update_symbol_file): Initialize classes if necessary.

Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
	rawbuffer.c, reflection.c, verify.c: mare warning cleanups.

Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.h: fix function prototype.
	* metadata.h, metadata.c, object.h, private.h: get rid of warnings.
	* mono-endian.h: use const cast.

2002-03-28  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c

Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>

	* loader.c: don't assert when a typeref can't be loaded, give
	a chance to the runtime to trow an exception instead.
	* loader.h: fix warning.

2002-03-28  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_proxy_vtable): added proxy support

2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>

	* icall.c: removed last of PAL calls, added System.Environment
	* file-io.h, file-io.c: MonoIO implementation
	* object.h, object.c: mono_string_to_utf16() now returns gunichar2*

Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c: do not use the byte marker in ldstr table lookup.
	* debug-helpers.c: allow two ':' to separate class and method name.
	* object.c: allocate arrays bounds with the GC, too.
	* verify: add a few more checks.

Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: output also literal strings. Allocate parameter data
	with GC_malloc() (thanks, Martin, for catching this!).

2002-03-26  Martin Baulig  <martin@gnome.org>

	* debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
	include the `this' offset in the `param_offsets'.

2002-03-25  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c (mono_debug_update_symbol_file): Use a new
	mono_debug_get_class() function to get the classes. Added new
	relocation types for arrays and strings.
	(mono_debug_get_class): New static function to search in all
	referenced assemblies for a metadata token.

	* debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.

Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, reflection.c: use a gc-safe hash for hash tables that
	hold gc-allocated objects. Make the string heap a stream like the
	others. Removed duplicated code when writing stream info.
	Added asserts to catch possible buffer overflows. Set the sorted map
	for tables that need sorting. Added some documentation.

Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
	for interned strings and vtables.

2002-03-24  Martin Baulig  <martin@gnome.org>

	* icall.c (ves_icall_Type_GetFields): Reverse the list before storing
	it in the array since it was created with g_slist_prepend().

2002-03-24  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c (mono_debug_local_type_from_signature): Renamed
	to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
	(mono_debug_method_from_token): Renamed to
	ves_icall_Debugger_MonoSymbolWriter_method_from_token().
	(ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.

	* debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
	relocation types.

	* debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.

2002-03-24  Martin Baulig  <martin@gnome.org>

	* debug-symfile.c (mono_debug_local_type_from_signature): New func.
	(mono_debug_method_from_token): New func.

	* icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
	New interncall, calls mono_debug_local_type_from_signature().
	(Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
	calls mono_debug_method_from_token().

2002-03-23  Martin Baulig  <martin@gnome.org>

	* unicode.c (ves_icall_iconv_get_char_count): The `count' argument
	specifies the number of bytes to be converted, not the array size.
	Return the number of chars, not the number of bytes.
	(ves_icall_iconv_get_chars): The `byteCount' argument
	specifies the number of bytes to be converted, not the array size.

2002-03-23  Martin Baulig  <martin@gnome.org>

	* reflection.h (MonoReflectionSigHelper): New type.

	* reflection.c (mono_reflection_sighelper_get_signature_local),
	(mono_reflection_sighelper_get_signature_local): New functions.

	* icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
	(System.Reflection.Emit.SignatureHelper::get_signature_field): New
	interncalls.

2002-03-23  Martin Baulig  <martin@gnome.org>

	* rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
	is_writeable is set.
	(mono_raw_buffer_update): New function to write the modified map
	back to disk.

	* debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.

	* debug-symfile.c (mono_debug_update_symbol_file): Call
	mono_raw_buffer_update() when done writing.

2002-03-23  Martin Baulig  <martin@gnome.org>

	* debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.

	* debug-symfile.c: Added support for arguments and local variables.

2002-03-23  Dick Porter  <dick@ximian.com>

	* debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
	protected by ifdefs, hence breaking the w32 build.

Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: implement is_interned() the right way.

2002-03-21  Martin Baulig  <martin@gnome.org>

	* debug-symfile.[ch]: New files to handle debugging information
	files. There's also support to dynamically update these symbol
	files to include machine dependent information.

2002-03-20  Dietmar Maurer  <dietmar@ximian.com>

	* threads.c (mono_thread_create): new function to create thread
	from C

2002-03-20  Martin Baulig  <martin@gnome.org>

	* icall.c (ves_icall_InternalInvoke): Create a new object if the
	method is a constructor.
	(icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
	points to ves_icall_InternalInvoke().

2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>

	* file-io.c: Flush shouldn't throw exceptions.

2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>

	* file-io.c: FileStream flush support; FileSetLength now
	restores file pointer.

Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: set image for pointer classes.

2002/03/19  Nick Drochak <ndrochak@gol.com>

	* sysmath.c: Forgot one.

2002-03-18  Miguel de Icaza  <miguel@ximian.com>

	* sysmath.c: Avoid redefining existing names.

2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>

	* sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
	handled by runtime as icall rather than dllimport from libm.so
	* file-io.c, file-io.h: fixed handle argument type.

2002-03-18  Dick Porter  <dick@ximian.com>

	* reflection.c (mono_image_get_type_info): rename interface to
	iface, because of "#define interface struct" on windows.

Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: rename and export mono_ptr_class_get().
	* metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
	* reflection.c, reflection.h, icall.c: better/saner type name
	parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
	method signatures.

2002-03-14  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_init): removed hardcoded GHC_SLOT

	* icall.c (ves_icall_InternalInvoke): impl.

Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: output the interface map table, too.

2002-03-12  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (class_compute_field_layout): separate computation of 
	static field layout

2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>

	* icall.c: added System.Buffer support.
	* file-io.c: moved file icalls from PAL to FileStream.

2002-03-12  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_System_Object_GetHashCode): impl.

2002-03-11  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_System_ValueType_GetHashCode): impl.

Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>

	* verify.c, verify.h: moved here the corlib/runtime consistency checks.

Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>

	* debug-helpers.{c,h}: moved here from monograph some useful functions
	to locate a method by name/signature in a class or image. Included
	also a small and flexible IL disassembler.

Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: fixup tokens in methods with small header size, too.

2002-03-08  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_string_to_utf8): remove assert(!error), instead
	print a warning. 

Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: update to the new mono_Array_class_get interface.

Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c, object.c: Boehm-GC enable.
	* icall.c: make get_data_chunk() support split data requests.
	Ensure a class is initialized in more cases. Return only the first
	property found in GetProperties() or the compiler gets confused. 
	Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
	* reflection.h, reflection.c: add fixup mechanism for field and method
	tokens. Initialize assembly->typeref in a single place. Output
	properties after events. Support custom attributes for events, too.
	Typo fix for paramter custom attrs.

2002-03-07  Martin Baulig  <martin@gnome.org>

	* icall.c (ves_icall_System_Array_FastCopy): Small fix.

2002-03-07  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_array_class_get): fix. for multi. dim. arrays

2002-03-06  Martin Baulig  <martin@gnome.org>

	* icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
	non-zero lower bounds. See testcases #F10-#F13.

2002-03-05  Martin Baulig  <martin@gnome.org>

	* exception.c (mono_get_exception_argument_out_of_range): New exception.

	* icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
	ves_icall_System_Array_GetValue(), only calculate the absolute array position
	here.
	(ves_icall_System_Array_SetValue): Likewise.
	(ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
	as argument and does the actual work. This function is used when copying a
	multi-dimensional array.
	(ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
	now do all the widening conversions of value types.
	(ves_icall_System_Array_CreateInstanceImpl): Implemented.

Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: remove some magic numbers and use the smbolic names,
	instead. Added init_events() to load event info at class init time.
	* metadata.h, metadata.c: added mono_metadata_events_from_typedef()
	and mono_metadata_methods_from_event().
	* reflection.h, reflection.c: added support for writing out the evnets
	related information.

Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h, icall.c: use a different method (GetInterfaces)
	to gather interface info and add isbyref, isprimitive and
	ispointer to the ves_icall_get_type_info() return value.

Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.h: stared adding support for events.
	* icall.c: split find_members implementation. Added debug icall to get
	the address of an object.
	* reflection.c: handle TypeBuilders in mono_type_get_object().

2002-03-01  Martin Baulig  <martin@gnome.org>

	* icall.c (ves_icall_System_Array_GetLength): This must throw an
	ArgumentOutOfRangeException(), not an ArgumentException().
	(ves_icall_System_Array_GetLowerBound): Likewise.
	(ves_icall_System_Array_GetValue): Improved argument checking.
	(ves_icall_System_Array_SetValue): Improved argument checking.

2002-03-01  Martin Baulig  <martin@gnome.org>

	* icall.c (ves_icall_System_Array_GetValue): Raise an exception when
	called with invalid arguments rather than just dying with g_assert().
	(ves_icall_System_Array_SetValue): Likewise.
	(ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
	raise a NotImplementedException instead.
	(ves_icall_System_Array_GetLength): Added argument checking.
	(ves_icall_System_Array_GetLowerBound): Added argument checking.

2002-03-01  Dietmar Maurer  <dietmar@ximian.com>

	* object.h (mono_assert): new macros mono_assert and
	mono_assert_not_reached

2002-02-28  Martin Baulig  <martin@gnome.org>

	* icall.c: Rename "System::String::Intern" to "System::String::_Intern"
	and "System::String::IsInterned" to "System::String::_IsInterned".

Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: remove hacks for typebuilder. Added icall to create a
	modified type from a tybebuilder.
	* reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
	in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
	to create a backing MonoClass for a TypeBuilder.

Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: more refactoring of class init.
	Export mono_class_setup_mono_type() and mono_class_setup_parent().

Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>

	* marshal.c, marshal.h: start of marshaling interface.

Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix order in assembly qualified name icall.

Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: do not free str, since we store it in the hash table.
	* reflection.h: add label field to MonoILExceptionInfo.
	* reflection.c: handle references to more than one assembly. Handle
	case when there isn't a module created in the assembly.

Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: Fix typo. Start refactoring of class init code.

Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c: exit with 1 on error.
	* class.c: we already have the name in MonoClassField.
	* image.c, image.h, metadata.c, pedump.c: use directly a pointer in
	MonoStreamHeader instead of an offset of image->raw_metadata.

2002-02-26  Miguel de Icaza  <miguel@ximian.com>

	* appdomain.c (mono_init): Be even more descriptive about the error.

Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c: give the user an informative message when corlib can't
	be loaded.

2002-02-26  Martin Baulig  <martin@gnome.org>

	* icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
	New icall to get the time zone data.

Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: set virtual and raw size of section correctly.
	* threads.c: transfer domain information to newly created threads.

Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: when instancing a class in a domain, load the default
	vaules for static fields from the constant table. Fix System.Enum to
	not be an enum.
	* icall.c: implement Object::GetType() internalcall. Implemented
	MonoField::GetValue() internalcall. Avoid SEGV in search_method().
	Fixed checking of binding flags in find_members().
	* metadata.c, metadata.h: introduce mono_metadata_type_hash().
	* reflection.c: handle enumerations when writing to the constant
	table. Use a different object cache for types.


2002-02-22  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_object_isinst): fix for arrays

	* icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces

Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>

	* object.c: don't use mprotect ()  and fix intern pool hash table
	lookup for big endian systems.

Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: change type_is_subtype_of () signature.

2002-02-21  Mark Crichton  <crichton@gimp.org>

        * rand.c, rand.h: Added random number generator for
        System.Security.Cryptography classes.

        * exception.c, exception.h: Added mono_get_exception_not_implemeted.

        * icall.c: Added System.Security.Cryptography calls.

Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c, icall.c, metadata.c: better support for pointer types.
	Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
	* reflection.c: Add support for getting custom attrs for properties
	and simplify some code.

Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: change getToken () and add custom attribute GetBlob()helper
	method.
	* reflection.h: add custom attrs array to the reflection builder structures.
	* reflection.c: encode and emit custom attributes for all the relevant
	reflection objects. Cache fieldref and methodref tokens. Change
	mono_image_create_token() interface to take a MonoDynamicAssembly.
	More complete custom attributes decoder. Load custom attributes for
	Assembly, Field, Method and Constructor objects, too. Make the
	returned array an Attribute[] one, not object[]. Added
	mono_reflection_get_custom_attrs_blob() to encode the arguments of a
	custom attribute constructor.

2002-02-20  Dick Porter  <dick@ximian.com>

	* icall.c:
	* rawbuffer.c:
	* socket-io.c: Windows portability fixes (sometimes just ifdeffing
	problem code out for now).

2002-02-19  Radek Doulik  <rodo@ximian.com>

	* object.c (mono_ldstr): use hash table to avoid multiple swapping

Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: register the GetCustomAttributes method.
	* object.c, object.h: add mono_string_new_len ().
	* reflection.h, reflection.c: added mono_runtime_invoke(),
	mono_install_runtime_invoke(). Added
	mono_reflection_get_custom_attrs () to load custom attributes and
	create the attribute objects.

2002-02-19  Dick Porter  <dick@ximian.com>
	* threads-dummy-types.c:
	* threads-dummy-types.h:
	* threads-dummy.c:
	* threads-dummy.h:
	* threads-pthread-types.c:
	* threads-pthread-types.h:
	* threads-pthread.c:
	* threads-pthread.h:  Deleted obsolete files

2002-02-19  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_vtable): runtime init the class when we
	allocate static class data.

	* icall.c (ves_icall_System_Array_SetValue): check for null values.

	* appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
	and String - but we will need generic marshalling support in the
	future. 
	(mono_init): set the domain name in a ms compatible way

	* object.c (mono_string_new_utf16): bug fix: use char[] instead of
	String[].

2002-02-18  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_array_clone): use alloca() instead of g_malloc  
	for sizes

	* appdomain.c (mono_domain_unload): impl.

Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>

	* appdomain.c, object.c: fix intern pool implementation.
	* class.c: fix alignment code.

2002-02-16  Radek Doulik  <rodo@ximian.com>

	* icall.c (ves_icall_System_Enum_ToObject): in case of big endian
	and s2 > s1, just copy lower bytes to be compatible with little
	endian (i.e. 64bit value & 0xffffffff --> 32bit value)
	(ves_icall_System_Enum_ToObject): and likewise for s1 > s2

	* unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
	force big_endian to be 1 for big endian machines 
	(ves_icall_iconv_new_decoder): ditto

2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>

	* socket-io.c (convert_sockopt_level_and_name): If the system
	doesn't define SOL_IP or SOL_TCP, get them by hand using
	getprotobyname() and caching the values (because this could be a
	slow operation).
	(ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
	Use the appropriate struct when the system does support it. Ie,
	not all systems have struct ip_mreqn so use struct ip_mreq when
	appropriate.

Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: handle finally clauses.

Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>

	* socket-io.c: use g_snprintf() instead of snprintf.

2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>

	* reflection.c (mono_param_get_objects): Cast second argument to
	mono_method_get_param_names to a const char** to silence the
	compiler warning.

	* appdomain.c (mono_domain_assembly_open): Put parens around the
	truth statement in the for-loop.

	* unicode.c (iconv_convert): Got rid of a compiler warning about
	int i being unused when the system has a new iconv.
	(iconv_get_length): Same.

	* image.c (load_class_names): Cast the second argument to
	g_hash_table_insert() to char* to hush compiler warnings about the
	arg being a const.
	(mono_image_open): Same here.

	* socket-io.c: Don't conditionally include sys/filio.h or
	sys/sockio.h here anymore since we now get them from
	io-layer/io-layer.h
	(inet_pton): If the system doesn't support inet_aton, implement
	using inet_addr and also #define INADDR_NONE if it isn't defined
	by the system.

Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h: added function to get packing and size info
	of a typedef.
	* reflection.h, reflection.c: handle field RVA data. Save info about
	the table layout if needed. Assign typedef indexes to all the types
	before dumping the info about them to avoid forward reference problems.

2002-02-14  Dietmar Maurer  <dietmar@ximian.com>

	* socket-io.c (convert_sockopt_level_and_name): ifdef
	SO_ACCEPTCONN because it is not defined on my system (old debian)

Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>

	* opcode.c: use stddef.h to get NULL.

2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>

	* socket-io.c: conditionally include sys/filio.h and sys/sockio.h
	for FIONBIO, FIONREAD and SIOCATMARK.
	(ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
	define INADDR_NONE and besides, inet_addr() is deprecated and
	should not be used. Use inet_pton() instead - it also has the
	added bonus that it can easily handle IPv6 addresses as well.
	(inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.

Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>

	* decimal.c: remove _MSC_VER conditional.

2002-02-13  Dick Porter  <dick@ximian.com>

	* socket-io.c: 
	* icall.c: Internal calls for Blocking, Select, Shutdown,
	GetSocketOption and SetSocketOption

Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.cs: better resolver: use it instead of some kludgy
	code.

Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: the best way to speed-up the compiler is to avoid
	infinite loops.

2002-02-13  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_vtable): changed the object layout
	(obj->vtable->class). 
	(mono_class_create_from_typespec): consider MONO_TYPE_PTR

Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>

	* assembly.c: look for assemblies in the assembly dir, too.

Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: fix thinko in mono_class_from_type().

Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>

	* exception.h, exception.c: added TypeLoadException.
	* object.h, object.c: added mono_array_clone ().
	* icall.c: handle throwOnError in AssemblyGetType().
	Added Array.Clone().
	* opcode.h, opcode.c: use a single value for the opcode val.
	Compile fix for non-gcc compilers.

Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>

	* opcodes.c, opcodes.h: export interesting info about opcodes.

2002-02-05  Dietmar Maurer  <dietmar@ximian.com>

	* object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
	icalls. 

	* class.c (class_compute_field_layout): set element_class for enums
	(mono_class_create_from_typedef): set element_class for normal classes

	* icall.c (ves_icall_System_Enum_get_value): impl.

	* class.c (mono_class_create_from_typedef): do not set valuetype
	flag for System.ValueType and System.Enum

2002-02-04  Dietmar Maurer  <dietmar@ximian.com>

	* unicode.c (iconv_convert): fix big endian problem.

Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: add asserts if we are ever going to scribble over memory.
	* socket-io.c: not all systems have AF_IRDA defined.

2002-01-31  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (class_compute_field_layout): do not consider static
	fields to compute alignment

2002-01-25  Dietmar Maurer  <dietmar@ximian.com>

	* appdomain.c (mono_appdomain_get): impl.
	(ves_icall_System_AppDomain_ExecuteAssembly): impl.

Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: ignore "file://" prefix when loading an assembly.

2002-01-23  Dick Porter  <dick@ximian.com>

	* socket-io.c:
	* icall.c:
	* Makefile.am: Added socket support

2002-01-23  Miguel de Icaza  <miguel@ximian.com>

	* icall.c (ves_icall_appdomain_get_default_assemblies): put this
	code back.  This should return the assemblies that are loaded by
	the runtime on behalf of an application domain. 

	The current implementation is still broken, it just returns every
	assembly loaded, but until we get real applications domain this
	will do.

2002-01-23  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
	AppDomain object.

2002-01-23  Miguel de Icaza  <miguel@ximian.com>

	* icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
	the mono_class_from_name lookup.
	(ves_icall_get_parameter_info): ditto.
	(ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
	method.
	(ves_icall_System_Reflection_Assembly_get_code_base): Another new call.

Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: load also nested classes on class init.
	System.ValueType instance methods gets passed boxed
	values, unless methods in derived classed that get a pointer to the
	data.
	* icall.c: use better name parsing code in GetType().
	* image.c, image.h: add mono_image_loaded ().
	* metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
	* reflection.c, reflection.h: added mono_reflection_parse_type().

2002-01-22  Veronica De Santis <veron78@interfree.it>

	* icall.c : Added mapping of internal calls for Manual and Auto reset events
	* threads.c : Added the implementation of internal calls for events
	* threads.h : Added prototypes of internal calls for events
	
2002-01-21  Radek Doulik  <rodo@ximian.com>

	* icall.c (ves_icall_InitializeArray): swap bytes on big endians

2002-01-21  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_init): set min_align to 1 (instead of 0)
	(mono_class_value_size): use min_align

2002-01-20  Dick Porter  <dick@ximian.com>

	* threads.h:
	* threads.c: Replaced all instances of WapiHandle * with HANDLE,
	so it compiles on w32.

2002-01-17  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_type_stack_size): impl.

	* class.c (mono_class_get_field): impl. memberref token

2002-01-16 Veronica De Santis <veron78@@interfree.it>

        * icall.h : Added the internal calls mapping for CreateMutex_internal
	  	    and ReleaseMutex_internal.
	* threads.h : Added the prototype of mutexes internal calls.
	* threads.c : Added the implementations of mutexes internal calls.

Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>

	* metaparse.h: removed unused file.
	* reflection.c, reflection.h: added stream_data_align () function 
	to align data in streams and keep stream aligned. Add support for
	exception support in method headers.

Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>

	* unicode.c: make iconv_convert () return the number of bytess written
	in the output buffer.

2002-01-15  Dick Porter  <dick@ximian.com>
	* threads.c: Make the runtime's idea of infinite timeouts coincide
	with the class library's

	Fix a particularly egregious bug in mono_thread_cleanup(). That
	code was so utterly bogus it must have been written on a Monday.

Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.h: add subtypes field to TypeBuilder.
	* reflection.c: encode constants for literal fields.
	Handle subtypes. Fix user string token (and add a zero byte)
	at the end.
	
2002-01-14  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_init): bug fix: assign slot numbers for
	abstract methods.

Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: don't try to output a code RVA for abstract methods.
	Small fixes for method header format. Output parameter info to the
	ParamDef table. Save method overriding info to MethodImpl table.
	Fix property support. Allow typedef.extends to be a type in the
	building assembly.
	* verify.c: fix off-by-one error.

Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>

	* class.c: fix mono_class_from_mono_type () for szarray types.
	Remove unused cache check in mono_class_from_type_spec().
	* icall.c: *type_from_name () functions handle simple arrays and byref.
	* reflection.c: handle byref and szarray types. Handle methods without
	body (gets P/Invoke compilation working). Handle types and fields in
	get_token ().
	* reflection.h: add rank to MonoTypeInfo.

2002-01-10  Dick Porter  <dick@ximian.com>

	* threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
	internal calls

Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: initialize class in type_from_handle ().
	Loop also in parent classes for get_method ().
	* reflection.c: properly encode class and valuetype types.
	Start on encoding TypeBuilder types. Handle fieldrefs.
	Use correct length when registering a user string.
	Handle ConstructorBuilder and MonoMethod in get_token ().
	Make mono_type_get_object () aware of cached types.
	* object.c: back out change to mono_string_new ().

Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
	* object.c: mono_string_new should return a NULL when the string 
	passed in is NULL -- not try to deference it.
	
Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>

	* icall.c: hack to make IsSubType work for TypeBuilders.
	* reflection.c: emit constructors before methods.
	Retrieve param names in mono_param_get_objects().

2002/01/05  Nick Drochak  <ndrochak@gol.com>

	* Makefile.am: fix list of headers and sources so automake 1.5
	doesn't complain. Removed \# at end of list.

Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>

	* reflection.c: get token for a method ref. Set return type of
	constructor to void.
	* loader.c: debug message.
	* class.c: typo fix.

Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>

	* icall.c: fix array init with rank > 1. FindMembers
	loops in parent class as well.
	* image.c: do not insert nested types in name cache.
	* reflection.c: warning fix.
	* reflection.h: add override method (for interface impl).

Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c: fix customattr decoding.

2001-12-21  Miguel de Icaza  <miguel@ximian.com>

	* rawbuffer.cs: Added native Win32 implementation, avoids using
	mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)

Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.c: make the low-level routines handle the cache.

Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>

	* image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).

Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.c: fix mono_array_element_size() for objects.
	* class.h, class.c: add properties to MonoClass and load them
	at init time.
	* icall.c: check with isinst() when assigning a value to an array
	instead of requiring the classes to match exactly.
	Implemented icall for System.Type::GetType().
	Implemented icalls to get ParameterInfo, ProprtyInfo and info about
	enums. Handle bindingflags when looking for methods and fields.
	* metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
	and mono_metadata_methods_from_property().
	* reflection.h, reflection.c: added structures for propreties,
	parameters and enums. Implemented mono_property_get_object() and
	mono_param_get_objects().

2001-12-18  Dick Porter  <dick@ximian.com>

	* file-io.c: Use mono_string_to_utf16() instead of
	mono_string_chars()

	* object.c: Added mono_string_to_utf16(), which copies the non
	NULL-terminated MonoString into a new double-null-terminated
	buffer.

2001-12-17  Dietmar Maurer  <dietmar@ximian.com>

	* icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment

2001-12-16  Dietmar Maurer  <dietmar@ximian.com>

	* file-io.c: raise exceptions if handle is invalid.

Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>

	* assembly.c: yet another check for mscorlib.
	* class.c, class.h: load nesting info for classes.
	* icall.c: many new functions to support the Reflection classes.
	* metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
	* reflection.h, reflection.c: mono_image_create_token(),
	mono_assembly_get_object(), mono_type_get_object(),
	mono_method_get_object(), mono_field_get_object(): methods to return
	objects that parallel the C representation of assemblies, types,
	methods, fields.

2001-12-11  Dick Porter  <dick@ximian.com>

	* icall.c:
	* file-io.c: Internal calls for file IO.

Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>

	* tabledefs.h: missing FileAttributes.
	* verify.h, verify.c: use is_valid_string () to simplify and check for
	valid strings more correctly. Fix warnings and speeling.
	Check more tables: Filed, File, ModuleRef, StandAloneSig.
	Check code: branches, maxstack, method calls.

2001-12-04  Dietmar Maurer  <dietmar@ximian.com>

	* object.c (mono_object_allocate): removed static, so that the jit
	can allocate value types.

	* icall.c (ves_icall_System_DateTime_GetNow): impl.

Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.c: init enum types right away and register the
	token->MonoClass map in mono_class_create_from_typedef ().
	* verify.h, verify.c: first cut of the verifier.
	* pedump.c: add --verify switch to verify metadata tables.
	* tabledefs.h: add some missing enums.

2001-11-30  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_install_runtime_class_init): impl.
	(mono_class_init): renamed mono_class_metadata_init to
	mono_class_init, also removed the metadata_inited flag

	* object.c (mono_object_isinst): use faster algorithm

2001-11-30  Radek Doulik  <rodo@ximian.com>

	* mono-endian.h: reverted last change
	added function prototypes

	* Makefile.am (libmetadata_a_SOURCES): reverted my last change and
	add mono-endian.c back

	* mono-endian.c: returned back, as Paolo pointed out, it's needed
	for unaligned access, I've mistaked it with endianess. I am
	sorry.
	(mono_read16): fix reverted endianess
	(mono_read64): ditto
	(mono_read32): ditto

2001-11-30  Dick Porter  <dick@ximian.com>

	* exception.c: Implement mono_exception_from_name()

Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c: remove params_size and locals_size and their
	calculation from the metadata code: they are only usefult to the
	interp.

2001-11-29  Radek Doulik  <rodo@ximian.com>

	* object.c (mono_ldstr): swap bytes here, it's probably not the
	best place, but works for me now, I'll redo it once I know mono
	better, also note that I add PROT_WRITE and don't reset back, also
	note that it's only affects big endians, so x86 should be OK

	* mono-endian.h (read16): use just glib macros for both endians

	* mono-endian.c: removed as glib macros are used in in
	mono-endian.h so we don't need to care about endianess for read
	macros as glib does that for us already

Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.h, class.h: take minimum alignment into consideration so
	that the fields of a class remain aligned also when in an array.

Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>

	* loader.h, loader.c: add mono_method_get_param_names().
	* class.c: 0-init class fields.

2001-11-26  Dick Porter  <dick@ximian.com>

	* icall.c:
	* threads-types.h:
	* threads.c: New file that handles System.Threading on all platforms

	* object.c: 
	* object.h: Remove the synchronisation struct from MonoObject,
	replace it with a pointer that gets initialised on demand

	* Makefile.am: Replace all the system-specific threading code with
	a single file that uses the new wrapper library

Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: add mono_install_trampoline() so that the runtime
	can register a function to create a trampoline: removes the ugly
	requirement that a runtime needed to export arch_create_jit_trampoline.
	* object.h, object.c: added mono_install_handler() so that the runtime
	can install an handler for exceptions generated in C code (with
	mono_raise_exception()). Added C struct for System.Delegate.
	* pedump.c: removed arch_create_jit_trampoline.
	* reflection.c: some cleanups to allow registering user strings and
	later getting a token for methodrefs and fieldrefs before the assembly
	is built.
	* row-indexes.h: updates and fixes from the new ECMA specs.

Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: add enum_basetype field to MonoClass.
	* metadata.h, metadata.c: add mono_metadata_get_constant_index()
	to get index in the constant table reated to a field, param or
	property.
	* reflection.h, reflection.c: handle constructors. Set public-key and
	version number of the built assembly to 0.
	* row-indexes.h: update from new ECMA spec.

Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: add a max_interface_id to MonoClass.
	* icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
	since it's used to do that. Added mono_type_type_from_obj().
	Make GetType() return NULL instead of segfaulting if the type was not
	found. Handle simple arrays in assQualifiedName.
	* object.h: add a struct to represent an Exception.
	* reflection.c: output call convention in method signature.
	Add code to support P/Invoke methods and fixed offsets for fields.

Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>

	* decimal.c, decimal.h: mono_double2decimal() get the sign bit from
	the value.
	* icall.c: use mono_array_addr instead of array->vector: fixes the
	reflection image writing.
	* reflection.c: init call convention byte to 0 in method signature.
	Encode the property signature. Don't output property-related methods
	twice. Really process the properties for a type (don't cast a field to
	a property, my mom always told me that).
	Fix 64 bit issues in pointer alignment in a different and more
	readable way.

2001-11-10  Sean MacIsaac  <macisaac@ximian.com>

	* loader.h: Removed type class from MonoDefaults, added monotype

	* loader.c: Loaded MonoType, removed loading of Type

	* icall.c (my_mono_new_object): Now returns a System.MonoType,
	and fills in System.Type._impl with a RuntimeTypeHandle rather
	than the actual MonoClass *

	(ves_icall_type_from_handle): change from type_class to
	monotype_class

	(ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
	implemented

	(ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
	implemented

	(ves_icall_System_Reflection_Assembly_LoadFrom): implemented

	(ves_icall_System_Reflection_Assembly_GetType): implemented

	(ves_icall_System_MonoType_assQualifiedName): implemented

	(ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented

2001-11-09  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c (mono_assembly_open): Implement a cache for the
	assemblies. 

	(mono_assembly_close): only destroy the assembly when the last
	reference is gone.
	
2001-11-09  Dick Porter  <dick@ximian.com>

	* Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more

2001-11-09  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_metadata_init): bug fix: compute the right slot

Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>

	* icall.c, decimal.h, decimal.c: integrated decimal internalcalls
	from Martin Weindel.
	* object.h: add mono_string_chars ().

2001-11-07  Miguel de Icaza  <miguel@ximian.com>

	* reflection.c (build_compressed_metadata): Eliminates warnings
	and uses 64-bit clean code.

	* metadata.c (mono_type_hash): Change signature to eliminate warnings.
	(mono_type_equal): Change signature to eliminate warnings.

Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>

	* icall.c, loader.c: remove the internalcall array constructors.
	Changes to match the new MonoArray structure.
	* object.h, object.c: an array object doesn't allocate an extra
	vector. Add mono_array_new_full () to create jagged arrays easily.

Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c: add mono_metadata_field_info () to
	retreive all the info about a field from vairous tables.
	* icall.c: implement S.Runtime.CServices::InitializeArray () icall.
	* class.h, class.c: augment MonoClassField with more info.
	Implemented mono_ldtoken for fields. Implemented ExplicitLayout
	policy and load a field's RVA if needed.

2001-11-05  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_metadata_init): create a trampoline for all
	virtual functions instead of actually compiling them.

Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: include name in MonoClassField.
	* class.c: fix fundamental type of System.Object and System.String.
	Set the right fundamental type for SZARRAY, too. Handle TypeSpec
	tokens in ldtoken.
	* icall.c: remove internalcalls for the Reflection stuff that is now
	done in C# code.
	* loader.c: mono_field_from_memberref () implementation.
	* mono-endian.c: thinko (s/struct/union/g).
	* object.c, object.h: make the mono_string_* prototypes actually use
	MonoString instead of MonoObject.
	* reflection.c, reflection.h: updates for changes in the reflection
	code in corlib: we use C structures that map to the actual C# classes.
	Handle SZARRAYs when encoding types. Handle locals in methods. Use a
	fat method header if needed and use the info from the ILGenerator for
	methods. Handle fields in types. Misc fixes.

2001-10-17  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_metadata_init): bug fix: always allocate
	space for static class data

2001-10-25  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_compute_relative_numbering): use relative
	numbering to support fast runtime type checks.

2001-10-17  Sean MacIsaac  <macisaac@ximian.com>

	* class.c (mono_class_create_from_typeref): added debugging output
	to print class name when MonoDummy is returned instead of real class

2001-10-15  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_metadata_init): interface offset table now
	contains pointers into the vtable - this is more efficient for the jit

2001-10-12  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_metadata_init): use a temporary vtable (the
	old algorithm only worked for the interpreter, but not for the jit)

2001-10-11  Dietmar Maurer  <dietmar@ximian.com>

	* loader.c (method_from_memberref): use mono_class_get to get the
	class of an array instead of using System.Array directly.
	(mono_get_method): also add MEMBERREF methods to the method cache
	which usefull for arrays.

2001-10-10  Dietmar Maurer  <dietmar@ximian.com>

	* pedump.c (arch_compile_method): added to compute vtable entry

	* metadata.c (mono_metadata_interfaces_from_typedef): also return the
	number of interfaces.
	
	* class.h: merged MonoArrayClass into MonoClass

	* class.c (mono_class_create_from_typedef): compute the vtable size and
	allocate space to include the vtable inside MonoClass
	(mono_class_metadata_init): initialize the vtable

Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
	Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
	* image.c: endian fixes by Laurent Rioux.
	* object.h, object.c: rename MonoStringObject to MonoString and
	MonoArrayObject to MonoArray. Change some function names to conform to
	the style mono_<object>_<action>. mono_string_new_utf16 () takes a
	guint16* as first argument, so don't use char*.
	Provide macros to do the interesting things on arrays in a portable way.
	* threads-pthread.c: updates for the API changes and #include <sched.h>
	(required for sched_yield()).
	* icall.c: updates for the API changes above.
	* Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
	platforms that need them.

Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.c: set the correct type for all the fundamental
	type when loading the class.

2001-10-05  Dick Porter  <dick@ximian.com>

	* threads-pthread.c (pthread_mutex_timedlock): Simple
	compatibility version for C libraries that lack this call.

Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.c: MonoTypes stored in MonoClass are stored as
	fundamental MonoTypes when the class represents a
	fundamental type (System.Int32, ...).
	The TypeHandle return by ldtoken is a MonoType*.
	* icall.c: ves_icall_get_data_chunk () write out all the
	PE/COFF stuff. Implement ves_icall_define_method (),
	ves_icall_set_method_body (), ves_icall_type_from_handle ().
	* image.c: properly skip unknown streams.
	* loader.h, loader.c: add type_class to mono_defaults.
	* metadata.c, metadata.h: export compute_size () as
	mono_metadata_compute_size () with a better interface.
	Typo and C&P fixes.
	* pedump.c: don't try to print the entry point RVA if there is no entry point.
	* reflection.c, reflection.h: many cleanups, fixes, output method
	signatures and headers, typedef and typeref info, compress the metadata
	tables, output all the heap streams, cli header etc.
	* row-indexes.h: typo fixes.

2001-10-04  Dick Porter  <dick@ximian.com>

	* object.h: Add a synchronisation mutex struct to MonoObject

	* object.c (mono_new_object): Initialise the object
	synchronisation mutexes

	* icall.c: System.Threading.Monitor internal calls
	
	* threads-pthread.h:
	* threads-pthread.c: System.Threading.Monitor internal calls

	* threads-types.h: New file, includes the system-specific thread
	structures
	
	* threads-pthread-types.h:
	* threads-pthread-types.c: New files, handle pthread-specific
	synchronisation types

	* threads-dummy-types.h: 
	* threads-dummy-types.c: New files of dummy support for
	thread-specific types

	* metadata.c:
	* image.c:
	* pedump.c: include mono-endian.h not endian.h
	
	* Makefile.am: More threads files.
	Name mono-endian.h not endian.h

Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, reflection.h, reflection.c: move here the reflection related 
	stuff and implement a few more bits.
	* icall.c: a field needs to be dereferenced twice. Do not use the same
	name for two variables in the same scope.
	* image.c, image.h: cleanups.

2001-10-02  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_metadata_init): bug fix: compute the right size

Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* icall.c: implemented some of the Reflection internalcalls.
	* image.c, image.h: start writing out the PE/COFF image.
	* metadata.h, metadata.c: implement mono_metadata_encode_value ()
	that does the reverse than decode_blob_size ().
	* object.c: use mono_metadata_encode_value (). Move here
	temporary implementation of mono_string_to_utf8 ().
	* rawbuffer.c: make malloc_map static.

Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c: fix type comparison for arrays.
	* loader.h, loader.c: half-assed fix to get more tests work in cygwin.
	Added a couple of new classes to monodefaults.
	* icall.c: added a couple of Reflection-related internalcalls.
	* class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
	Added a byval_arg MonoType to MonoClass.

2001-09-28  Dick Porter  <dick@ximian.com>

	* icall.c:
	* threads-pthread.h: 
	* threads-pthread.c: Implemented internal calls for
	LocalDataStoreSlot operations.  Applied mutexes around all shared
	data.  Reworked the thread creation and Start() operations to
	avoid a race condition.
	
	* threads-dummy.h:
	* threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations

Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* rawbuffer.c: disable mmap on cygwin since it seems to be broken there.

Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.c, loader.c: warn and return NULL instead of erroring out.
	* icall.c: added System.AppDomain::getCurDomain().
	* loader.c: we don't need to lookup the typedef again for p/invoke calls.

2001-09-25  Dick Porter  <dick@ximian.com>

	* threads-pthread.h:
	* threads-pthread.c: Implemented timed thread joining and added
	System.Threading.Thread::Join_internal internal call

	* icall.c: Added System.Threading.Thread::Join_internal internal call

	* threads-dummy.h:
	* threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal

Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
	mono_string_intern () to implement the semantics of the ldstr opcode
	and the interning of System.Strings.
	* icall.c: provide hooks to make String::IsIntern and String::Intern
	internalcalls.

2001-09-23  Dick Porter  <dick@ximian.com>

	* threads-dummy.c: 
	* threads-dummy.h: New files of dummy threading routines

	* Makefile.am (THREAD_SOURCE): Arrange to compile different thread
	support code based on system specifics

	Rename PTHREAD_LIBS to THREAD_LIBS
	
2001-09-23  Dick Porter  <dick@ximian.com>

	* threads-pthread.c: Implement the System.Threading.Thread::Sleep,
	Schedule (called when asked to Sleep for 0 ms) and CurrentThread
	internal calls.
	(mono_thread_init): Set up a Thread object instance to return when
	the main thread calls Thread.CurrentThread
	(mono_thread_cleanup): Wait for all subthreads to exit

	* icall.c: New internal calls for System.Threading.Thread::Sleep
	(including Schedule) and CurrentThread

	* threads.h: New file, to insulate thread-specific stuff from the
	rest of the code

2001-09-21  Dick Porter  <dick@ximian.com>

	* threads-pthread.h: 
	* threads-pthread.c: New file, for handling pthreads-style
	threading support.  Start() now starts a new thread and executes
	the ThreadStart delegate instance.

	* icall.c: Added the internalcall for
	System.Threading.Thread::Start_internal

	* Makefile.am: Added new files, and PTHREADS_LIBS to the link line

Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* loader.c: work around the different signatures for delegates
	constructors csc generates in compiled code vs the ones compiled in mscorlib.

Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: add mono_class_get_field_from_name ().
	* *: Fix C comments and other ANSI C issues.

Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* endian.h, assembly.c: fix some endianness issues.

Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* loader.h, load.c: add delegate_class to mono_defaults.
	Handle runtime provided methods in mono_get_method ().

2001-08-29  Dietmar Maurer  <dietmar@ximian.com>

	* loader.c (mono_get_method): use pinvoke for internal call

	* icall.c: use pinvoke for internal call

	* loader.c (method_from_memberref): set the method name

Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c: help the compiler generate better code for
	mono_class_from_mono_type ().

2001-08-28  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_metadata_init): delayed computing of the
	class size to mono_class_metadata_init ()

Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: add an interfaces member to MonoClass.
	* image.c, image.h: add assembly_name field to MonoImage
	from the assembly table.
	* metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().

Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.c: Handle Array in mono_class_from_mono_type ().
	* metadata.c, pedump.c: some endian fixes.

Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
	* metadata.c: fix small problem introduced with the latest commit.

Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
	We don't need a MonoMetadata pointer anymore to compare signatures in
	mono_metadata_signature_equal (), update callers.
	Reduced memory usage an number of allocations for MonoMethodHeader and
	MonoMethodSignature.

Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c: added compare for szarray.

Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
	and add a couple more types to it and mono_defaults. Give an hint on
	classes that need implementing in our corlib and are referenced
	in mscorlib.

Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.h, class.c: keep track if a class is also an Enum.
	* loader.c: Implement a couple more types for use in libffi
	marshalling. Gives better diagnostics when failing to dlopen
	a library. Set method->klass for P/Invoke methods, too.

Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* class.c, class.h: add a MonoType this_arg to MonoClass that
	represents a pointer to an object of the class' type that
	can be used by the interpreter and later the type cache.
	Add best guess alignment info for valuetype objects.

Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
	into MonoType: one less level of indirection and allocation and
	simplifies quite a bit of code. Added cache for MonoTypes that are
	used frequently, so that we don't need to allocate them all the time.

2001-08-24  Dietmar Maurer  <dietmar@ximian.com>

	* class.c (mono_class_create_from_typedef): System.Enum is also a
	value type, although it does not derive from System.ValueType
	(maybe a bug in the ms compiler?)

	* metadata.c (mono_type_size): return the right size for value types

	* loader.c (mono_get_method): only initialize method header if not abstract

	* class.c (mono_class_from_mono_type): use mono_default values. 

2001-08-23  Dietmar Maurer  <dietmar@ximian.com>

	* *: use MonoClass pointers instead of <type_tokens>
	
	* class.h: new flag: metadata_inited.

	* class.c (mono_class_metadata_init): impl.
	(mono_class_instance_size): impl.
	(mono_class_data_size): impl.

Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
	MonoClass now has the name and name_space fields. 
	MonoMethod has a pointer to its MonoClass, instead of MonoImage.
	mono_get_method () takes and optional MonoClass as argument.
	Removed mono_typedef_from_name() and added mono_class_token_from_name()
	instead that takes advantage of a map from class names to typedef
	tokens in MonoImage.

Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c: zero is not a valid alignment boundary.
	Merge MONO_TYPE_VOID in default decoding code.

2001-08-21  Dietmar Maurer  <dietmar@ximian.com>

	* image.h: merged MonoMetadata into MonoImage

	* class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
	identify the type of elements.

Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* blob.h: fix MONO_TYPE_TYPEDBYREF value.
	* cil-coff.h: split MonoMSDOSHeader and add size info.
	* image.c: add some consistency checks.
	* metadata.c: fix row size computation: one programmer
	error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
	add explanation for the locator routine.
	Fix decoding of size in method header.
	
2001-08-20  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c 	(g_concat_dir_and_file): Use _S for string concat.
	(g_concat_dir_and_file): Bring g_concat_dir_and_file
	function from gnome-libs.  This uses the right path separator
	based on the OS, and also works around a bug in some systems where
	a double slash is not allowed. 
	(default_assembly_name_resolver): Use g_concat_dir_and_file
	(mono_assembly_open): ditto.

2001-08-20  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_metadata_signature_equal): impl.

	* *: void is now a realy MonoType (instead of using NULL)
	
	* metadata.c (do_mono_metadata_parse_type): use
	mono_metadata_parse_type to parse void value.

Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h: in the signature and method header store
	only the space required for holding the loca vars and incoming arguments.

2001-08-15  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (do_mono_metadata_parse_type): treat void like any
	other type (instead of assigning NULL);

2001-08-14  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value

2001-08-09  Dietmar Maurer  <dietmar@ximian.com>

	* image.c (do_mono_image_open): added a cache for arrays.

Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c: add mono_metadata_decode_row_col () to
	decode a single column from a row in a metadata table and changes
	to take advantage of it in the typedef locator (gives a nice speed up).
	Store offset info for function params.

2001-08-02  Dietmar Maurer  <dietmar@ximian.com>

	* image.h (MONO_IMAGE_IS_CORLIB): removed 

Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* assembly.c: how could mono_assembly_close () had ever worked?
	* metadata.c, metadata.h: provide offset info for local vars.
	Implement mono_type_size () to take care of alignment as well
	as size (it was mono_field_type_size in cli/class.c before).

2001-08-01  Dietmar Maurer  <dietmar@ximian.com>

	* image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image

	* assembly.h (CORLIB_NAME): set to corlib.dll

	* assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()

Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
	cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
	tokentype.h: massive namespace cleanup.

Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, metadata.c: decode exception clauses when parsing method header.

2001-07-27  Dietmar Maurer  <dietmar@ximian.com>

	* metadata.c (mono_metadata_free_type): added check for type !=
	NULL (void) before calling mono_metadata_free_type()

Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, row_indexes.h: added header with enumerations to use
	to index in the columns from tables in metadata and to decode coded
	tokens: we should start using this instead of embedding magic numbers
	all over the code.

Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
	Move metadata_t info from cli_image_info_t to MonoImage, where
	it's easily accessible. Changed all the uses accordingly.
	Added the method and class caches to MonoImage.
	* metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
	and mono_metadata_decode_value () signature to be more consistent
	with the other parse functions (and simplify code). Taken advantage
	of zero-length array allocation with GCC. Removed reduntant (and
	wrong) MonoFieldType struct and use MonoParam instead. Changed
	mono_metadata_parse_field_type () to use common code for parsing.
	Added mono_metadata_typedef_from_field () and
	mono_metadata_typedef_from_method () to lookup a typedef index from a
	field or method token.
	Pack the MonoRetType structure more tightly (fits in 8 bytes now).

2001-07-23  Miguel de Icaza  <miguel@ximian.com>

	* metadata.c (mono_metadata_parse_field_type): Implement. 
	(do_mono_metadata_parse_type): Split engine from
	mono_metadata_parse_type, so that we can create smaller structures
	for things that just have one pointer to the MonoType (look at
	the MonoFieldType)

2001-07-20  Miguel de Icaza  <miguel@ximian.com>

	* metadata.c (mono_metadata_parse_mh): Correct the implementation,
	as Jan Gray found out, it is incorrect. 

2001-07-18  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c: Implement asssembly loading.  This loads an image
	and loads all the referenced assemblies.  Come to think of it, we
	could always do lazy loading of the assemblies. 

	* image.c (mono_image_open): Keep loaded images in a hashtable.

	* image.h (MonoImage): Add reference count.

2001-07-17  Miguel de Icaza  <miguel@ximian.com>

	* assembly.c (mono_assembly_open): Keep track of the file name in
	case the assembly has no ASSEMBLY table.

	* metadata.h: Fixed Paolo's quick hack.  Put the documnentation
	from get.c here.

Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.c, metadata.h: decode local vars in method header
	parse function. Change callers accordingly.

Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metadata.h, cil-coff.h: protect against multiple inclusion.
	Added some new structures to hold information decoded from metadata:
	MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
	and relevant decoding/free functions.
	* metadata.c: implement decoding functions. Add warning for out of bounds
	index in mono_metadata_locate(). Implement mono_get_method () to retreive
	all the info about a method signature and invocation. Remove check on
	uninitialized local var in parse_mh() and fix memory leak.

2001-07-12  Miguel de Icaza  <miguel@ximian.com>

	* metadata.h: More macros.

	* tokentype.h: New file.

Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* assembly.c: added a consistency check and initialize
	some structures with g_new0().
	* metadata.c: fixed a couple more bugs in table size computation
	and add other checks for out-of bound access to metadata.

Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* metatada.c: fix bugs computing table sizes. Spew a
	warning when index in string heap is out of bounds.

2001-07-04  Miguel de Icaza  <miguel@ximian.com>

	* metadata.h: Add a couple of macros to manipulate tokens. 

Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* assembly.c: g_free(ii->cli_sections) (and avoid double free of
	cli_section_tables).

2001-07-01  Miguel de Icaza  <miguel@ximian.com>

	* metadata.c (mono_metadata_user_string): New function, provides
	access to the UserString heap. 

2001-06-27  Miguel de Icaza  <miguel@ximian.com>

	* metadata.c: Add inline documentation.

2001-06-26  Miguel de Icaza  <miguel@ximian.com>

	* propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
	files. 

2001-06-22  Miguel de Icaza  <miguel@ximian.com>

	* typeattr.h: New file, TypeAttribute flags. 

2001-06-21  Miguel de Icaza  <miguel@ximian.com>

	* mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
	mono_assembly_ensure_section): Section loading code.
	(load_section_tables): Load the sections.

	* mono/metadata/metadata.c (mono_metadata_locate_token,
	mono_metadata_locate): Functions to locate the information
	definition given a token or a table and an index.
	(mono_metadata_compute_table_bases): New.
	(compute_size): New function to compute the sizes of the various
	tables.

	* mono/metadata/metadata.h: Finish listing the different index
	types. 

	* mono/metadata/pedump.c: Improve to dump new information.

2001-06-19  Miguel de Icaza  <miguel@ximian.com>

	* mono/metadata/metadata.c: Entered all the tables matching
	Beta2. 

	* mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
