
Thu Apr 24 17:11:03 CEST 2003 Paolo Molaro <lupus@ximian.com>

	* Makefile.am: rename mono and libmono to oldmono and liboldmono.

2003-04-23  Martin Baulig  <martin@ximian.com>

	* mono.c: The `--debug' command line argument doesn't take any
	arguments anymore, removed the `--debug-args' argument.

	* debug-jit.c (mono_debug_add_method): Renamed this to
	mono_debug_jit_add_method(); create the JIT-specific data
	structure and pass it to mono_debug_add_method().

	* debug.[ch]: Removed.  The code is now in
	../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].

	* debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
	last six months.

2003-04-21  Martin Baulig  <martin@ximian.com>

	* debug.c (mono_debug_open): Splitted into mono_debug_init() and
	mono_debug_init_2().
	(mono_debug_open_image): Don't open referenced assemblies; this is
	done automatically by the code in assembly.c.

	* mono.c (main_thread_handler): Call mono_debug_init() before
	opening the assembly because we need to install the assembly load
	hook before doing so.

2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* jit.c:
	(mono_jit_cleanup): moved mono_runtime_cleanup call after the call to
	mono_domain_finalize.

2003-04-05  Miguel de Icaza  <miguel@ximian.com>

	* jit.c (check_inlining): honor the NOINLING atttribute.

2003-03-31  Martin Baulig  <martin@ximian.com>

	* debug.h (MonoDebuggerEvent): Removed
	MONO_DEBUGGER_EVENT_THREAD_CREATED.

	* jit.c (mono_thread_start_cb): Don't send the
	MONO_DEBUGGER_EVENT_THREAD_CREATED event.

2003-03-13  Martin Baulig  <martin@ximian.com>

	* debug.c (_mono_debug_address_from_il_offset): Moved to
	../metadata/debug-mono-symfile.c

2003-03-07  Martin Baulig  <martin@ximian.com>

	* debug-jit.c: #include <config.h>.

2003-03-05  Martin Baulig  <martin@ximian.com>

	* debug-jit.c, debug-jit.h: New files.  Moved all JIT-specific
	stuff here.

	* debug.c (mono_debug_add_method): Moved to debug-jit.c.
	(mono_debug_handle, mono_debug_initialized): Made them global.
	(replace_suffix): Removed, this isn't used anymore.
	(record_line_number): Moved to debug-jit.c.
	(debug_generate_method_lines): Moved to debug-jit.c
	(generate_line_number): Renamed to
	_mono_debug_generate_line_number() and made it global.
	(debug_update_il_offsets): Moved to debug-jit.c
	(mono_debug_get_image): Renamed to _mono_debug_get_image() and made
	it global.
	(address_from_il_offset): Renamed to
	_mono_debug_address_from_il_offset() and made it global.
	(il_offset_from_position): Moved to debug-jit.c
	(lookup_method): Renamed to _mono_debug_lookup_method() and made
	it global.
	(mono_debug_add_method): Moved to debug-jit.c.
	(mono_debug_create_notification_function): Use two new functions
	mono_debug_codegen_breakpoint() and mono_debug_codegen_ret()
	instead of x86_breakpoint() and x86_ret().	

Sat Mar 1 12:36:45 CET 2003 Paolo Molaro <lupus@ximian.com>

	* jit.c: remove unnecessary assert when inlining.

2003-02-17  Martin Baulig  <martin@ximian.com>

	* jit.c (mono_jit_compile_method): Don't emit a `nop' at the start
	of each method.

2003-02-14  Patrik Torstensson

	* x86.brg: Implemented CONV_OVF_[I|U]4 (freg), this fixes the issues 
	with the "checked" keyword. Closes bugs #33421 and #35280 (JIT not mint)

2003-02-14  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (mono_arch_find_jit_info): better way to handle
	situations where we have no MonoJitInfo

2003-02-11  Zoltan Varga  <vargaz@freemail.hu>

	* trampoline.c (arch_create_jit_trampoline): This function should 
	allways return a trampoline for managed methods. Fixes bug #29859.

2003-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* debug.c: allocate debug->source_files. Fixes GLib-CRITICAL upon
	debugging clean up.

2003-02-02  Martin Baulig  <martin@ximian.com>

	* debug.c (mono_debug_add_wrapper): Lookup the wrapper method in a
	hash table; we need to provide the correct code_size.

2003-02-02  Martin Baulig  <martin@ximian.com>

	* jit.c (mono_jit_compile_method): Call mono_debug_add_wrapper()
	to add the interncall to the symbol file.

	* debug.c (mono_debug_add_wrapper): New public function.

2003-02-02  Martin Baulig  <martin@ximian.com>

	* debug.c (debug_update_il_offsets): Set the prologue end address
	to the address of the first source line.

2003-01-31  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): use the wrapper signature if necessary

2003-01-31  Zoltan Varga  <vargaz@freemail.hu>

	* debug.c (mono_debug_open_image): dynamic assemblies have no debug
	info.

Thu Jan 30 11:07:06 CET 2003 Paolo Molaro <lupus@ximian.com>

	* helper.c: handle MONO_TYPE_ARRAY as well.
	
2003-01-29  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): impl. CEE_MONO_LDNATIVEOBJ
	(mono_analyze_stack): RETOBJ always returns native sized objects 

2003-01-28  Zoltan Varga  <vargaz@freemail.hu>

	* x86.brg (mono_ldintftn): use <= instead of <, since the 
	interface_offsets array is max_interface_id + 1 long.

2003-01-28  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (mono_ldintftn): fix from Zoltan: use max_interface_id

2003-01-27  Zoltan Varga  <vargaz@freemail.hu>

	* exception.c (ves_icall_get_trace): avoid crash if the exception is 
	not yet thrown.

	* exception.c (ves_icall_get_trace): avoid crash on unmanaged frames.

2003-01-26  Martin Baulig  <martin@ximian.com>

	* debug.c (mono_debug_init): Take a boolean argument which
	specifies whether we're running in the Mono Debugger.

2003-01-24  Martin Baulig  <martin@ximian.com>

	* debug.c (mono_debug_io_layer): Disable this on Windows.

2003-01-23  Dick Porter  <dick@ximian.com>

	* mono.c: Use mono_runtime_exec_managed_code() to run all managed
	code in a subthread.

	* jit.c: Changed thread start and attach callbacks to pass the
	thread ID, not the MonoThread pointer.  Arrange that managed code
	execution will fail an assertion in the main thread, just to be
	sure.

2003-01-22  Martin Baulig  <martin@ximian.com>

	* debug.c: Reverted Gonzalo's last change since it is wrong.
	We're also using the debugging code on Windows, for instance the
	stabs stuff when running in gdb.  I hope this code still builds on
	Windows; if not, we need to fix this.
	Moved all the mono debugger support code into the debugger itself;
	when debugging a managed application, the debugger new launches a
	small unmanaged wrapper application which contains this stuff.

	* debug.h (MonoDebuggerIOLayer): New public typedef; this is just
	initialized to an array of function pointers to the io-layer
	function; they don't seem to be public in the `libmono' library.
	(mono_debugger_event): New public function.  Sends the debugger an
	event if we're running in the Mono Debugger and does nothing otherwise.

	* mono.c: Don't initialize the Mono Debugger here.

	* jit.c (mono_debug_insert_breakpoint): Removed, this isn't used anymore.
	(mono_thread_start_cb, mono_thread_attach_cb): Call
	mono_debugger_event() to send the debugger a callback.

2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* debug.c: make all public symbols just dummy for windows.

2003-01-20  Miguel de Icaza  <miguel@ximian.com>

	* debug.c (initialize_debugger_support): ifdef out the call to
	mono_debugger_init_thread_debug for the release. 

	Someone should look into why its not defined.  I think the problem
	is what Dick pointed out somewhere: code in io-layer is not
	supposed to ever be used in Windows, so code for the debugger that
	lives there must be moved elsewhere.

2003-01-19  Martin Baulig  <martin@ximian.com>

	* debug.c: Ok, this should now finally be working this time ....

2003-01-18  Martin Baulig  <martin@ximian.com>

	* debug.c (mono_debugger_jit_exec): Send the background thread a
	SIGKILL before returning.

2003-01-17  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: removed duplicated CONV_OVF_I4

2003-01-17  Martin Baulig  <martin@ximian.com>

	* debug.c: Don't use mono_once here.  Reworked the API a bit to
	use `mono_debug_' and `debug_' for the general debugging API and
	`mono_debugger_' and `debugger_' for the Mono Debugger stuff.

2003-01-16  Martin Baulig  <martin@ximian.com>

	* debug.c (debugger_thread_func): We don't need to `raise
	(SIGSTOP)' anymore; the thread manager already takes care of this.

2003-01-16  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (arch_handle_exception): exclude runtime invoke
	wrapper from the stack trace

	* jit.c (mono_cfg_new): allocate extra space to store esp (used by exceptions)
	(mono_thread_start_cb): save an additional LMF at thread start

2003-01-16  Martin Baulig  <martin@ximian.com>

	* jit.c (mono_runtime_install_handlers): Use SYS_sigaction() for
	the mono_thread_get_abort_signal () - this is SIGUSR1 on FreeBSD
	and the LinuxThreads port doesn't allow you to override the handler.
	[FIXME: This avoids an assertion failure on startup, but there's
	still an issue with thread termination.]

2003-01-16  Martin Baulig  <martin@ximian.com>

	* debug.c (debugger_thread_func): We don't need to `raise
	(SIGSTOP)' anymore; the thread manager already takes care of this.

2003-01-16  Martin Baulig  <martin@ximian.com>

	* debug.c: Use the mono/io-layer functions here instead of gthread.

2003-01-14  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_jit_compile_method):  make sure runtime_init is called 
	(mono_analyze_stack): make sure runtime_init is called

2003-01-14  Martin Baulig  <martin@ximian.com>

	* debug.c (debugger_update_symbol_file_table): Moved all the
	functionality into debugger_update_symbol_file_table_internal();
	the latter one will be called from the background thread while
	already owning the lock.  This'll allow us to step into
	debugger_update_symbol_file_table() in the debugger and debug it.

2003-01-14  Martin Baulig  <martin@ximian.com>

	* Makefile.am: Link against gthread.

	* jit.c: After realizing that mono-mutex doesn't work either
	because it doesn't support recursive mutexes on FreeBSD, rewrote
	the whole thread stuff to use gthread.  This seems to fix this
	weird deadlock in the debugger as well.

2003-01-12  Alp Toker  <alp@atoker.com>

	* exception.c: Typo fix: insinde -> inside

2003-01-08  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (ves_icall_get_frame_info): skip one more frame and also
	MONO_WRAPPER_RUNTIME_INVOKE wrappers
	(x86_unwind_native_frame): disable unnecessary assertion

2003-01-07  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (ves_icall_get_frame_info): fix bug 36382

Tue Jan 7 15:15:41 CET 2003 Paolo Molaro <lupus@ximian.com>

	* jit.c: handle wrapper_data in NEWOBJ/CALL.

2003-01-07  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): add check for NULL target in STFLD

2003-01-06  Martin Baulig  <martin@ximian.com>

	* debug.c (debugger_finished_mutex): Use a recursive mutex here.

	* debug.c: Correctly handle the `debugger_finished_mutex'; it is
	only unlocked by the pthread_cond_wait() in mono_debugger_wait().

2003-01-04 Jackson Harper <jackson@latitudegeo.com>

	* debug.c: Move must_send_finished var declaration out of #if win32
	block (this fixes the build on win32)

2003-01-05  Martin Baulig  <martin@ximian.com>

	* debug.c (mono_debugger_jit_exec): Custom version of mono_jit_exec();
	this is used when we're running inside the Mono Debugger 
	(mono_debugger_wait): Put the waiting code into a function of its own.

	* mono.c (main): Call mono_debugger_jit_exec() instead of
	mono_jit_exec() if we're running inside the Mono Debugger.
	
2003-01-05  Martin Baulig  <martin@ximian.com>

	* debug.h (MonoDebugFormat): Added
	`MONO_DEBUG_FORMAT_MONO_DEBUGGER'; this allows us to check whether
	we're running inside the Mono Debugger prior to the args parsing.

2003-01-04  Martin Baulig  <martin@ximian.com>

	* debug.c (release_symbol_file_table): Only call this if we're
	actually modifying the symbol tables.
	(mono_debug_open): Always set the `mono_debugger_class_init_func'
	for MONO_DEBUG_FORMAT_MONO; this stuff should also go into core dumps.

2003-01-03  Martin Baulig  <martin@ximian.com>

	* debug.c: Disable the mono debugger stuff on Windows.

2003-01-03  Martin Baulig  <martin@ximian.com>

	* debug.c (mono_debugger_trampoline_breakpoint_callback): New
	function.  This is called from the breakpoint trampoline to signal
	the debugger and wait until it has reload the symbol tables.

	* trampoline.c (get_breakpoint_trampoline): Call the new
	mono_debugger_trampoline_breakpoint_callback() in the breakpoint
	trampoline just before the breakpoint.

2002-12-31  Martin Baulig  <martin@ximian.com>

	* debug.c (MonoDebuggerSymbolFileTable): Added `global_symfile'
	field to point to the MonoGlobalSymbolTable.

2002-12-30  Martin Baulig  <martin@ximian.com>

	* debug.c (MonoDebuggerInfo): Put back `symbol_file_modified'.
	This variable now specifies that the symbol tables have been
	modified after the last notification has been send.  The debugger
	uses this flag to check whether it needs to reload the symbol
	tables or not.
	(debugger_compile_method): Just send a notification to the
	debugger, but don't set the modified flag.  It may or may not be
	set when the debugger gets the notification - depending on whether
	the JIT compilation added a new method to the symbol tables.

2002-12-30  Martin Baulig  <martin@ximian.com>

	* debug.c (debugger_compile_method): This is a wrapper around
	mono_compile_method() which always sends a notification to the
	debugger.

2002-12-30  Martin Baulig  <martin@ximian.com>

	* debug.c: Reload the symbol file table before sending the
	notification event to the debugger.
	(MonoDebuggerInfo): Removed `update_symbol_file_table'.

2002-12-31  Martin Baulig  <martin@ximian.com>

	* debug.c: Propertly lock everything and avoid race conditions.
	(MonoDebuggerInfo): Removed the `symbol_file_modified' again.

2002-12-31  Duncan Mak  <duncan@ximian.com>

	* debug.c (initialize_debugger_support): Fix build error by
	declaring ret at the top of the function.

2002-12-30  Martin Baulig  <martin@ximian.com>

	* debug.c: When running under the mono debugger, create a special
	debugger thread; always protect the symbol tables with a mutex.

2002-12-28  Martin Baulig  <martin@ximian.com>

	* debug.c (MonoDebuggerInfo): Added `symbol_file_modified'; it's
	incremented each time one of the symbol tables is modified.

Thu Dec 19 18:31:54 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: fix LDELEMA implementation here as well.

Wed Dec 18 11:42:58 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: handle CEE_CONV_OVF_U8_UN like CEE_CONV_OVF_I8_UN.

Wed Dec 18 11:36:04 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: query the thread abort signal from the runtime.

2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>

	* jit.c: If SIGRTMIN is not defined, fall back to SIGUSR1.

2002-12-11  Zoltan Varga  <vargaz@freemail.hu>

	* jit.c (mono_analyze_stack): call the utility function 
	mono_field_from_token to avoid code duplication.

2002-12-02  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): added some additinal checks to verify IL code

	* x86.brg (stmt): POP floating point stack correctly

2002-11-28  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_emit_prologue): don't save caller saved
	registers twice.

	* exception.c (x86_unwind_native_frame): support exceptions inside
	native code using gcc generated exception tables (-fexception).

2002-11-19  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c: include some code from Zoltan Varga, but modified
	it slightly.

2002-11-27  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c: massive code cleanups. The code is still
	architecture dependent, but it should be now possible to reuse the
	complex parts for other architecture.

2002-11-15  Dick Porter  <dick@ximian.com>

	* jit.c: Pass the attach callback to mono_runtime_init().

2002-11-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* jit.c: display the domain name in trace output.

2002-11-08  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (reg): fix bug #2721

	* jit.c (mono_runtime_install_handlers): impl.

2002-10-17  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_add_method): Make this actually work if we don't
	have any lifetime information.

2002-10-15  Martin Baulig  <martin@gnome.org>

	* jit.cs (PUSH_TREE): Always set t->cli_addr here.

	* debug.c (generate_line_number): Small fix to make this actually
	work for more complex things.

2002-10-11  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (freg): use fprem instead of fprem1

2002-10-03  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (ves_array_element_address): added check for out of range index
	(mono_analyze_stack): added fix for bug #31654

2002-10-01  Martin Baulig  <martin@gnome.org>

	* debug.c: Don't create an .il file for the dynamic symbol file.

2002-10-01  Martin Baulig  <martin@gnome.org>

	* debug.c (MonoDebuggerInfo): Added mono_runtime_invoke().

2002-09-27  Martin Baulig  <martin@gnome.org>

	* debug.c (debug_load_method_lines): Don't use sigaction() on win32.

2002-09-27  Dick Porter  <dick@ximian.com>

	* mono.c: Tell glib what the program name is, by passing it the
	name of the managed file we're executing

2002-09-26  Martin Baulig  <martin@gnome.org>

	* trampoline.c (x86_magic_trampoline): Don't insert the breakpoint
	trampoline into the vtable, also use it for non-virtual methods,
	remove the breakpoint when done.

2002-09-26  Martin Baulig  <martin@gnome.org>

	* debug.c (debug_load_method_lines): Block SIGCHLD while running
	monodis.

2002-09-26  Martin Baulig  <martin@gnome.org>

	* debug.c: Reworked the whole debugging stuff.  We have now one
	single `mono_debug_handle' which keeps a hashtable of
	`AssemblyDebugInfo's (which may have different debugging formats).
	The AssemblyDebugInfo is now created when the assembly is loaded,
	but never when adding a class/type.

	* mono.c: Initialize debugging stuff after corlib and the assembly
	have been loaded.

2002-09-25  Martin Baulig  <martin@gnome.org>

	* debug-private.h (DebugLineNumberInfo): Removed.  There's now a
	MonoDebugLineNumberEntry type in debug-mono-symfile.h which we're
	using instead of it.
	(DebugMethodInfo): Removed `line_numbers'.

	* debug.c: Reworked the line number generation; we're now using
	the MonoDebugLineNumberEntry try for all debugging formats.  This
	type also includes the line number and IL offset, this allows the
	JIT to produce better line number info: we only emit line number
	information for source lines which actually have code.

2002-09-25  Martin Baulig  <martin@gnome.org>

	* debug.h: Removed external declaration of all functions which
	should only be called from the Mono Debugger and also made them
	static.  Since the debugger gets their address from the
	`MONO_DEBUGGER__debugger_info' vtable, there's no need to export
	these functions.

2002-09-25  Martin Baulig  <martin@gnome.org>

	Improved breakpoint support, we can now dynamically insert and
	remove breakpoints at runtime and when called from withing the
	Mono Debugger, we're using a special breakpoint trampoline.

	* debug.h (mono_method_has_breakpoint): New method to check
	whether to insert a breakpoint for a method.
	(mono_insert_breakpoint): New method to insert a breakpoint.
	(mono_insert_breakpoint_full): New method to insert a breakpoint,
	takes a MonoMethodDesc.
	(mono_remove_breakpoint): New method to remove a breakpoint.

	* debug.c (mono_debugger_insert_breakpoint): New function for the
	debugger.  Should only be called from the debugger.
	(mono_debugger_remove_breakpoint): Likewise.

	* mono.c (main): Use mono_insert_breakpoint() to insert breakpoints.

	* trampoline.c (get_breakpoint_trampoline): New static function to
	create a special breakpoint trampoline for the debugger.
	(x86_magic_trampoline): If we're running inside the Mono Debugger
	and a breakpoint was requested for the method, generate a special
	breakpoint trampoline.

	* jit.c (mono_debug_methods): Removed, use mono_insert_breakpoint()
	to insert a breakpoint.
	(mono_debug_last_breakpoint_address): Removed.
	(match_debug_method): Removed, use mono_method_has_breakpoint().

Wed Sep 25 12:04:08 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: reorder mono_runtime_cleanup () call since it needs the
	engine still fully working.

2002-09-24  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_open): When we're invoked from inside the
	Mono Debugger, set mono_debugger_class_init_func (exported in
	metadata/class.c) to mono_add_type().
	(mono_add_type): Call mono_debug_symfile_add_type().

Tue Sep 24 11:34:02 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: avoid including cil-coff.h (again). Optimize typeof (type).
	Run finalize on domain cleanup.
	* mono.c: call setlocale ().
	* trampoline.c: clearer error message for invalid trampoline.

2002-09-21  Martin Baulig  <martin@gnome.org>

	* debug.c (MonoDebuggerSymbolFileTable): Use an actual typedef for this
	instead of writing a byte blob.
	(mono_debug_make_symbols): This doesn't touch the symbol tables anymore.
	(mono_debug_add_method): Incrementally add the new method to the symbol
	table.

	* exception.c (arch_handle_exception): If we have debugging support,
	call mono_debugger_update_symbol_file_table () as well.

2002-09-20  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_add_method): The `MonoDebugVarInfo' now includes
	the size of the variable.

2002-09-18  Dietmar Maurer  <dietmar@ximian.com>

	* linear-scan.c (mono_analyze_liveness): we can save 30% of needed
	iterations if we visit blocks in reverse order.

2002-09-12  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): cleaup of the array code

	* exception.c: added patch from Julio Merno to fix bug #30048

	* jit.c (mono_analyze_stack): code cleanup, fix bug #29365

2002-09-09  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (LDELEMA): use x86_lea 

2002-09-06  Martin Baulig  <martin@gnome.org>

	* debug.c (debug_update_il_offsets): Fixed a memory corruption bug.
	If you were getting random crashes when using the JIT with debugging
	turned on, this fixes it.

2002-09-06  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_emit_epilogue): use pop instead of mov

2002-09-05  Martin Baulig  <martin@gnome.org>

	* debug.c (MONO_DEBUGGER__debugger_info): New global data symbol
	which is read by the debugger.

Wed Sep 4 14:06:09 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* Makefile.am: link libmono directly into mono. Use a ld script
	to reduce exported symbols.

2002-09-03  Martin Baulig  <martin@gnome.org>

	* debug.c (free_method_info): Make this actually work.

2002-09-03  Martin Baulig  <martin@gnome.org>

	* debug.h (MonoDebugFormat): Killed MONO_DEBUG_FORMAT_DWARF2_PLUS.
	* debug-dwarf2-plus.c: Removed.

	* debug-private.h (DebugMethodInfo): Removed the `method_info' field.
	(AssemblyDebugInfo): Removed the old `symfile' field and renamed
	`mono_symfile' to `symfile'.

	* debug.c (mono_debug_open): Replaced the assembly argument with a
	file name argument; you can now call this before loading the assembly.
	(debug_generate_method_lines): The MonoDebugILOffsetInfo struct is gone,
	we now use MonoSymbolFileLineNumberEntry's and a separate address array
	instead; splitted out all MonoSymbolFileLineNumberEntry code into
	debug_generate_il_offsets() and debug_update_il_offsets().
	(mono_debug_add_method): Don't create the MonoDebugMethodInfo here; it's
	created when reading the symbol file or from debug_load_method_lines().
	(debug_load_method_lines): Create the MonoDebugMethodInfo for all methods.

	* exception.c (arch_handle_exception): Call mono_debug_make_symbols() before
	looking up an address.

	* debug.c: Don't create the .il files for MONO_DEBUG_FORMAT_MONO.

	* mono.c (main): Initialize debugging before loading the first assembly.
	
2002-08-28  Dick Porter  <dick@ximian.com>

	* mono.c: mono_set_rootdir() doesnt take any args now

	* Makefile.am: Export HOST_CC for w32 builds

2002-08-28  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_store_tree): only allocate vars if really necessary

2002-08-27  Martin Baulig  <martin@gnome.org>

	* debug.c: The mono symbol file is installed together with the assembly
	it belongs to and it's used on a per-image basis.

Tue Aug 27 19:44:32 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* mono.c: don't use the cil-coff header outside of the loader.

2002-08-27  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debugger_internal_get_symbol_files): Removed, we need
	to use global variables for this since they're stored in a core file.
	(mono_debugger_symbol_file_table_generation): New global variable.
	(mono_debugger_symbol_file_table): New global variable.
	(mono_debugger_update_symbol_file_table): New global function to update
	the symbol file table.

2002-08-27  Martin Baulig  <martin@gnome.org>

	* trampoline.c (mono_generic_trampoline_code): New global variable.
	(arch_create_jit_trampoline): Use the new global variable to store the
	generic trampoline code instead of using a static one.  This allows the
	debugger to access this variable to check whether a method is a trampoline.

	* debug.h (mono_generic_trampoline_code): Added external declaration.

2002-08-27  Martin Baulig  <martin@gnome.org>

	* debug.c (MonoDebugHandle): Moved the method hash into the
	AssemblyDebugInfo struct since we need to use a separate hash for each
	MonoImage.

	* debug.c: Added special undocumented command line argument to create a
	symbol file for IL files on-the-fly.  In this case, we also need to create
	the IL files and parse them.
	(mono_debugger_internal_get_symbol_files): Return something more reasonable.

2002-08-26  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debugger_internal_free_symbol_files): New function.
	(mono_debugger_internal_symbol_files_changed): New global variable.

2002-08-24  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debugger_internal_get_symbol_files): New function.

2002-08-24  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_write_symbols): Added support for the new
	debugging format.

	* mono.c (main): The `--debug' argument now knows about a new
	debugging format `mono' which will be used to display source lines
	in backtraces.

	* debug.h (MonoDebugFormat): Added a new MONO_DEBUG_FORMAT_MONO
	which will be used when displaying backtraces.  It reads a new
	binary symbol file.

2002-08-23  Martin Baulig  <martin@gnome.org>

	* jit.c (match_debug_method): Don't include runtime invoke methods
	in the search.

	* mono.c (main): Accept `Main' as argument to --break to insert a
	breakpoint on the application's main method.

2002-08-23  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c (dwarf2_write_class_field): Don't include any static fields.
	
2002-08-21  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (arch_handle_exception): don't set stack_trace to
	null (so that it contains the full trace even when we rethrow the
	exception).

2002-08-19  Nick Drochak <ndrochak@gol.com>

	* x86.brg (mono_llmult_ovf): Simplified the code greatly by refactoring
	the algebraic form we are using.  This also eliminated a silly overflow
	of the intermediate result that was causing troubles.

2002-08-16  Nick Drochak <ndrochak@gol.com>

	* x86.brg (mono_llmult_ovf): Flip ALL the bits, dummy. Now negative numbers
	work.

2002-08-15  Nick Drochak <ndrochak@gol.com>

	* x86.brg (mono_llmult_ovf): Fix so it throws an overflow when result
	will not fit in 64 bits.  Fixes bug #27375.

Wed Aug 14 17:31:37 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* exception.c: updates for API changes in metadata/.

2002-08-13  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_jit_init): use  ((gpointer)-1) as end_of_stack
	address for the main thread.

2002-08-12  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): added support for Thread::Abort ()

2002-08-08  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (arch_handle_exception): simply return and let the
	libpthread/kernel restore the context. This should work on recent
	versions of linuxthreads.

	* jit.c (mono_runtime_install_handlers): switch back to use
	sigaction from libpthreads. As long as this does not make problems
	we should use this instead of syscall.

2002-08-07  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c: removed the createdelegate icall
	(mono_analyze_stack): special case Array::Address()

2002-08-06  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_emit_prologue): make the call to
	mono_get_lmf_addr relocatable.
	(arch_jit_compile_cfg): do not waste memory
	(arch_jit_compile_cfg): use a mempool to store native code. This
	improves locality of code.

2002-08-01  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): impl. CEE_MONO_RETOBJ

2002-07-30  Sergey Chaban <serge@wildwestsoftware.com>

	* x86.brg (LOCALLOC): under Windows, if allocation size is bigger
	than one page, it's necessary to allocate memory incrementally,
	in page-size steps, performing stack-touch every time.
	Also added LOCALLOC(CONST_I4) implementation.

2002-07-27  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_get_runtime_method): code cleanup

	* x86.brg: we do not need to save EAX/ECX/EDX in stmt:

2002-07-24  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): added CEE_TAIL (but it is ignored)

Wed Jul 24 13:02:50 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c, jit.h, exception.c: implemented stack walking function.

2002-07-24  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (ARG_OBJ): removed zero sized object warning 

2002-07-23  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_allocate_excvar): mark excvar as volatile

	* emit-x86.c (enter_method): use arch_get_argument_info to get
	stack layout.

	* jit.c (mono_analyze_stack): use arch_get_argument_info to get
	stack layout.
	(mono_analyze_stack): removed unused code

	* emit-x86.c (arch_allocate_arg): impl.

2002-07-22  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_allocate_var): fix alignment bug

	* x86.brg (X86_CALL_BEGIN): add argument padding before emitting a call

	* jit.c (mono_analyze_stack): s/k/k + 1/

	* x86.brg (LOCALLOC): align to MONO_FRAME_ALIGNMENT

	* emit-x86.c (arch_get_argument_info): impl.

2002-07-21  Miguel de Icaza  <miguel@ximian.com>

	* exception.c (arch_handle_exception): Memory leak fix.

2002-07-19  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): avoid recursive inlining

Fri Jul 19 18:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* emit-x86.c: temporary workaround for gcc bug.
	* jit.h, jit.c, mono.c: move mono_jit_image to jit.c.
	Don't include config.h in headers.

2002-07-19  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: correctly align valuetype arguments on the stack

	* jit.c (mono_analyze_stack): do not compute frame size here.

	* x86.brg: use macros to avoid code duplication for CALL opcodes,
	compute frame size in x86.brg

2002-07-18  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (ARG_OBJ): allow zero sized ARG_OBJ

	* exception.c (arch_handle_exception): removed duplicated code,
	added support for exception filters

	* jit.c (mono_jit_compile_method): support exception filters

2002-07-17  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack CEE_DIV): added fix from Zoltan Varga
	(bug #27423)
	* jit.c: s/ISSTRUCT/MONO_TYPE_ISSTRUCT/ 

	* helpers.c (mono_map_ldind_type): added suggested changes from
	Zoltan Varga (support MONO_TYPE_U), variou 64bit fixes

	* jit.c (mono_analyze_stack): remove the vtype pointer from the
	stack (fix bug #27420)

2002-07-16  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (CALL_VOID): fix bug #27751
	(CONV_R_UN) use reg2 instead of reg1 for the negative check /fix bug 27849.

	* jit.c (mono_analyze_stack): adjust valuetype size for pinvoke calls

i2002-07-11  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (freg): new rule freg: CALL_R8 (this, reg)

2002-07-10  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_emit_prologue): added code to save LMF

2002-07-04  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (LOCALLOC): added fix from Zoltan Varga (for bug #27396) 

2002-07-05  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_add_method): Fix a bug in the `begin_scope' and
	`end_scope' calculations when linear scan register allocation is disabled.

2002-07-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* mono.c: removed the "RESULT: X" message.

2002-07-01  Dietmar Maurer <dietmar@ximian.com>

	* exception.c (arch_get_call_finally): restore caller saved
	register used by global reg. allocation when calling finally
	handlers (fixes bug #24943).

2002-07-01  Dick Porter  <dick@ximian.com>

	* jit.c (mono_jit_exec): Removed unneeded argument to
	mono_runtime_run_main()

2002-06-28  Martin Baulig  <martin@gnome.org>

	* debug.c (debug_generate_method_lines, mono_debug_add_method): Make methods
	start on the nop instruction to make single-stepping into an already-JITed
	method work.

2002-06-26  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_source_location_from_address): Added
	`guint32 *line_number' argument.  If it's not NULL, store the line number
	there and return the file name without the line number.

	* exception.c (ves_icall_get_trace): Fill in `sf->filename' and `sf->line'.
	(ves_icall_get_frame_info): Likewise.

2002-06-25  Dick Porter  <dick@ximian.com>

	* jit.c (mono_jit_exec): Pass the assembly to mono_runtime_run_main

2002-06-22  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_source_location_from_address): Small fix, an
	unsigned number can never be smaller than zero, make that check
	actually work.

2002-06-19  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (ves_icall_get_trace): new method to get the stack
	trace from a Exception.

2002-06-18  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (check_inlining): do not inline functions containing 
	calls to stack query functions

	* exception.c (ves_icall_get_frame_info): impl.

Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* invoke.c: marshal simple arrays correctly.

2002-06-17  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt

	* jit.c (mono_analyze_stack): impl. STARG
	(mono_analyze_stack): impl. LDARGA

	* exception.c (arch_handle_exception): correctly restore register
	values when unwinding the stack (fixes bug 25698)

2002-06-09  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
	the `%s-debug.s' file is in the same directory than its assembly.

Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* message.c, emit-x86.c: kill warnings.

2002-05-31  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: buf fix in REMOTE_STIND_OBJ
	(mono_ldvirtftn): impl.
	(mono_ldintftn): impl.
	(mono_ldftn): impl.

Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* mono.c: added --config command line option.

Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c, jit.h: collect statistics about the number of basic blocks.

2002-05-31  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_address_from_il_offset): New public function.
	(mono_debug_add_method): Improved local variable info: correctly handle
	variables in registers and their start/end scopes.

2002-05-30  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
	not "%p" which seems to be broken on Windows/mingw32.

2002-05-30  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (reg): bug fix in LOCALLOC

	* mono.c (main): new switch --nointrinsic to disable memcpy opt.

	* x86.brg: added block copy/init optimizations from 
	Serge (serge@wildwestsoftware.com)
 
Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* invoke.cs: lookup P/Invoke method address only when needed.

2002-05-29  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: bug fix in REMOTE_STIND_OBJ

	* invoke.c (arch_create_native_wrapper): handle pointers to value types

	* helpers.h: use mono_ prefix for all functions

	* jit.c (mono_analyze_stack): fixed SIZEOF

	* x86.brg: impl. LOCALLOC, INITBLK

2002-05-28  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. CKFINITE 

	* jit.c (mono_analyze_stack): impl. CEE_CALLI

	* x86.brg (JMP): impl. JMP opcode

2002-05-27  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_cfg_new): reserve additional space to store ESP when
	calling finally handlers.

	* exception.c (arch_get_call_finally): save ESP before calling
	finally handler.

	* helpers.c (map_arg_type): move some generic helper function into
	this file.

	* mono.c (usage): new option --breakonex 

	* exception.c (arch_exc_is_caught): only return FALSE if really
	unhandled.

	* jit.c (mono_thread_abort): free jit_tls

2002-05-24  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (stmt): use memmove to cope with overlapping
	blocks. This is not required by the specs, so we can remove it
	later if it turns out to be too slow (and use memcpy).

	* jit.c (mono_analyze_stack): moved const. folding from x86.brg

	* x86.brg: CPBLK impl.

	* emit-x86.c (tree_emit): modified to support 3 nonterminals per
	rule (used for CPBLK).

Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* mono.c: remove generated code from hash when benchmarking/testing
	method compilation.
	* invoke.cs: special case string ctors.

2002-05-23  Dietmar Maurer  <dietmar@ximian.com>

	* *.c: code cleanups - tried to separate architecture dependent things. 

2002-05-23  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_open): Don't call mono_debug_add_image().
	(mono_debug_write_symbols): Only recreate the symbol file if
	necessary.

	* debug-private.h (MonoDebugHandle): Added `dirty' flag.

	* mono.c (main): Call mono_debug_add_image() here.

	* jit.c (mono_thread_abort): If we have debugging support, call
	mono_debug_make_symbols() and G_BREAKPOINT().

	* exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
	an unhandled exception.

2002-05-23  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c: move the thread pool to metadata/threadpool.c, code
	cleanup.

2002-05-22  Dietmar Maurer  <dietmar@ximian.com>

	* exception.c (arch_exc_is_catched): impl. MS like exception
	handling (added a check for unhandled exceptions)

2002-05-22  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
	the assembler if necessary, ie. the assembler file is newer than the
	symbol file or the symbol file does not exist.

	* debug.c: Added "update_on_exit" argument to recreate the symbol file
	when the JIT exists.

	* debug-dwarf2.c: Produce assembler code which is free of comments and
	extra whitespaces so that it's suitable for `as -f'.

2002-05-22  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c (dwarf2_write_section_end): Removed.  This is not needed
	and not supported by all assemblers.
	(dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
	GNU extension.

	* mono.c (--debug): Small fix in the argument parsing.

2002-05-22  Martin Baulig  <martin@gnome.org>

	* debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.

	* mono.c: Applied patch from Miguel:
	(--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
	to dwarf-plus.

2002-05-21  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_source_location_from_address): Added support for the
	dwarf2-plus format.

2002-05-21  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_source_location_from_address): New function.
	(mono_debug_il_offset_from_address): New function.

	* exception.c (arch_handle_exception): If we have debugging support, include
	information about the source location and IL offset in the stack trace.

2002-05-21  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
	#25058)  

	* x86.brg (stmt): removed unnecessary assertion

	* jit.c (check_inlining):  we cant inline throw instructions
	(because it breaks some basic block requirements)

2002-05-21  Martin Baulig  <martin@gnome.org>

	* debug-private.h (MonoDebugFlags): New enum typedef.

	* debug.c (mono_debug_open): Added a few useful arguments.  See the manpage
	for details.

2002-05-21  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
	a `MonoAssembly *' argument instead of a `char *filename' one.  Also added
	`const char **args' argument.

	* mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
	`int verbose' argument and made it public.
	(mono_jit_compile_class): New public function,  moved the code to compile
	all methods in a class here from main().
	(--compile): The argument can now also be an image (in `@imagename' format).
	Updated documentation for this command line argument.
	(--precompile): New command line argument to precompile an image/class/method
	before executing the main app.  This argument can be given multiple times.
	(--break): Renamed the "--debug" command line argument to "--break".
	(--debug): New command line argument to specify the debugging format.
	(--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
	(--debug-args): New command line argument.  This is a comma-separated list of
	additional arguments for the symbol writer.
	(usage): Beautified the help text a bit.

	* debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
	public mono_jit_compile_image() function rather than duplication this
	functionality here.

2002-05-21  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2-plus.c: This is now working again :-)

	* debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
	we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
	one for the fallback MONO_DEBUG_FORMAT_DWARF2.

2002-05-21  Martin Baulig  <martin@gnome.org>

	* jit.c (mono_debug_handle): Removed this global variable.

	* debug.c (mono_debug_close): Removed.
	(mono_debug_cleanup): New global function.
	(mono_debug_add_image): New global function.
	(mono_debug_handle_from_class): New global function.
	(mono_debug_write_symbols): New global function.
	(mono_debug_add_type): Removed `MonoDebugHandle *' argument.
	(mono_debug_add_method): Likewise.

2002-05-21  Martin Baulig  <martin@gnome.org>

	Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
	file for all assemblies.  Currently, the JIT doesn't put all methods
	from a single assembly into a continuous region of memory.  We were
	previously creating valid DWARF 2 files for this, but unfortunately
	GDB's symbol tables get messed up when it reads more than one such file.

	* debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
	`next_idx', `methods', `type_hash', `source_files' and `format'
	into the MonoDebugHandle.

	* debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
	not on the AssemblyDebugInfo.
	(mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().

	* debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
	mono_debug_write_dwarf2().
	(mono_debug_open_assembly_dwarf2): Removed.
	(mono_debug_close_assembly_dwarf2): Removed.

	* debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
	mono_debug_write_stabs().
	(mono_debug_open_assembly_stabs): Removed.
	(mono_debug_close_assembly_stabs).

	* debug-dwarf2-plus.c: This is currently broken. :-(

2002-05-20  Martin Baulig  <martin@gnome.org>

	* debug.h (mono_debug_format): New global variable.
	(MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.

	* debug-private.h (MonoDebugHandle): Added `objfiles' field which is
	a whitespace separated list of symbol files.
	(AssemblyDebugInfo): Added `objfile' filed which is the name of the
	symbol file.

	* mono.c (main): Pass the assembly file name to mono_debug_open_file().

	* debug.c (mono_debug_make_symbols): Link all symbol files into a big
	`<assemblyname>.o' symbol file.

2002-05-20  Martin Baulig  <martin@gnome.org>

	* debug.c (debug_load_method_lines): Check whether the assembly file
	is newer than the IL file and recreate the IL file if necessary.

2002-05-20  Miguel de Icaza  <miguel@ximian.com>

	* mono.c Updated copyright years. 

2002-05-18  Miguel de Icaza  <miguel@ximian.com>

	* mono.c (usage): Relayout command line options.

2002-05-17  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (reg): fixed array bound check

	* emit-x86.c (enter_method): print method signature

	* exception.c (arch_handle_exception): set trace info before we
	call handlers.

2002-05-16  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_find_final_block): make it work with mcs

	* x86.brg: buf fix. if exception variable is allocated to a register. 

	* jit.c (mono_find_final_block): bug fix.

2002-05-15  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c (arch_end_invoke): fix bug #24653, simplified the
	code using new runtime_invoke feature.

	* jit.c (mono_analyze_flow): try blocks are followed by handler
	blocks, so we need to add all handler blocks as succesors.
	(mono_thread_start_cb): set end_of_stack

	* exception.c (arch_handle_exception): correctly save/restore caller
	saved regs.

	* emit-x86.c (arch_emit_prologue): correctly save/restore caller
	saved regs.

	* jit.c (mono_cfg_new): allocate space for caller saved registers.

2002-05-14  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c: only use one TLS slot to store jit data

	* exception.c (arch_handle_exception): print function signature,
	use thread relative end_of_stack

2002-05-13  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
	store them as 32 bit integers.
	(mono_analyze_stack): we need to generate a temporary var for
	SHL/SHR because the tree allocator can fail otherwise 

	* exception.c (arch_handle_exception): EIP now points to the call
	instruction, not to the instruction after the call. This fixes the
	bug reported by Linus Upson (tests/exception8.cs)

2002-05-11  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_flow): always allocate the forest array
	(mono_stack_duplicate_used_var): impl.
	(mono_copy_used_var): impl.

	* x86.brg: bug fix in SHR/SHL

	* emit-x86.c (arch_emit_prologue): check if live_in_set != NULL

2002-05-11  Sergey Chaban <serge@wildwestsoftware.com>

	* mono.c: new --fast-iconv command line option
	to enable fast FP-to-integer conversion code.
	* jit.c, jit.h: added global variable to store state
	for the above option. This optimization is disabled
	by default.
	* x86.brg: added code to emit fast FP-to-integer
	conversion sequences.

2002-05-10  Dan Lewis  <dihlewis@yahoo.co.uk>

	* emit-x86.c: simple definite assignment analysis optimization for
	uninitialized locals.

Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* x86.brg, emit-x86.c: patch the branch targets with x86_patch().

2002-05-10  Dietmar Maurer  <dietmar@ximian.com>

	* linear-scan.c (mono_update_gen_set): improvement/bug fix

	* x86.brg: added additional rules to handle global allocated registers

	* mono.c (usage): the option is called --nols, and it dissables
	linear scan.

	* x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8

2002-05-09  Dietmar Maurer  <dietmar@ximian.com>

	* linear-scan.c: linear scan reg. allocation and data flow analysis
	use Paolo's great bitset implementation.

	* jit.c (arch_allocate_var): add live range info
	(mono_cfg_add_successor): create list of successors for basic
	blocks.

	* mono.c (main): new option --ls to enable linear scan

	* exception.c (arch_handle_exception): print instruction pointer
	relative to method start address.

	* jit.c (mono_print_ctree): print register number if locals are
	allocate in registers.

	* emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
	(arch_emit_epilogue): take care when restoring save registers,
	because the stack pointer may has changed.

	* x86.brg: s/VAROFFSET/VARINFO/
	modified to support global register allocation

Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.

2002-05-03  Sergey Chaban <serge@wildwestsoftware.com>

	* x86.brg: more coni4 optimizations
	MUL: generate optimized code for some consts other
	than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
	DIV_UN: multiply with reciprocal instead of dividing;

2002-05-03  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: use VAROFFSET macro

	* emit-x86.c (tree_emit): allocate space for spilled regs in
	activation frame instead of pushing them to the stack.

	* x86.brg: replace BXX with CBRANCH/COMPARE
	replaced CXX CSET/COMPARE

	* emit-x86.c (arch_allocate_regs): improved register allocation

2002-05-02  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c (mono_delegate_cleanup): signal semaphore in order to
	exit threads.

2002-04-30  Dick Porter  <dick@ximian.com>

	* mono.c (main): Tell glib to not abort when g_log() etc print
	recursively

2002-04-30  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: opt. LDELEMA impl.
	(MUL) use shift when possible.
	(DIV) use shift when possible.
	impl. various opt. with coni4

	* exception.c (arch_handle_exception): use ctx->SC_EBP in
	end_of_stack check as suggested by Linus Upson <linus@linus.com>

2002-04-29  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.  

	* exception.c: included the Freebsd patch from Sandro Tolaini
	<sandro@focuseek.com>

Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* mono.c, jit.c: use mono_runtime_run_main ().

2002-04-29  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): dont call methods on Object with
	METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.

	* x86.brg: added more CONV_U rules

	* jit.c (mono_analyze_stack): avoid recursive call of virtual
	methods: fixes Bug #23778 
	(mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547

	* exception.c (arch_handle_exception): only g_assert(cleanup) if
	we really need it.

2002-04-27	Patrik Torstensson <patrik.torstensson@intel.com>

	* x86.brg: fixed bug in CONV_I8 (invalid stack correction)

2002-04-27  Martin Baulig  <martin@gnome.org>

	* jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
	there's already `epilog' so we don't need `epilogue_begin'.

	* debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
	size of the method's code.

2002-04-25  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
	changes.

2002-04-25  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
	added CONV_OVF_I4 (fix bug #23808)

2002-04-23  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: code cleanup - use x86_patch ()

	* jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
	(mono_analyze_stack): don't store constants in temp. variables for CEE_DUP

	* x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
	because it slows down performance.

2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>

	* emit-x86.c: enter_method handles 8-byte aligned parameters.

2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>

	* jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
	non-shared code.

2002-04-20  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (check_inlining): added statistics about inlineing

	* mono.c (usage): new switch --noinline to disable inlining

	* jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
	inline methods (to keep semantics)

	* x86.brg: added constant folding for inegers 

	* emit-x86.c (tree_allocate_regs): handle the special case when
	chain rules need a register.

2002-04-19  Dietmar Maurer  <dietmar@ximian.com>

	* invoke.c (arch_create_native_wrapper): do not save LMF for Strings

	* jit.c (check_inlining): better inlining support

2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
	
	* x86.brg: LDLEN uses max_length instead of bounds[0]
	* jit.c: support for new szarray format

2002-04-18  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (check_inlining): added inlining support

2002-04-17  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: optimized version of castclass and isinst

Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* emit-x86.c, invoke.c: track time spent compiling.

Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* emit-x86.c, invoke.c: call profile callbacks if needed.
	* jit.c, jit.h, mono.c: add --profile command line option.

2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* jit.h: included mono/io-layer/io-layer.h to avoid breaking
	compilation under windows when upgrading mingw and w32api to 
	version	1.3 (thanks Dick!).

2002-04-15  Patrik Torstensson <patrik.torstensson@labs2.com>

	* jit.c: changed the array icalls to use full names

2002-04-15  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: check the this pointer before calling
	non-virtual functions

	* emit-x86.c (arch_emit_prologue): initialize local vars.

	* x86.brg: removed incredible clumsy code

2002-04-13  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
	the location of a variable.
	(dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
	instead of a stack offset and use dwarf2_write_variable_location() to write
	the location.

2002-04-13  Martin Baulig  <martin@gnome.org>

	* debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
	API changes.

2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* Makefile.am: use of the new '-s' option in monoburg.

2002-04-12  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
	lifetime.

2002-04-10  Sergey Chaban <serge@wildwestsoftware.com>
	* win32-exception: added Win32 SEH exception filter that translates
	CONTEXT to sigcontext;

	* jit.c: added Win32 SEH init/reset calls, compute sigcontext address
	in a platfrom-dependent way;

	* jit.h: use win32-exception instead of signal if PLATFORM_WIN32
	and avoid io-layer includes;

	* delegate.c: do not include io-layer stuff if PLATFORM_WIN32
	is defined;

2002-04-09  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c (arch_end_invoke): restore output arguments

Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: call mono_runtime_init ().

2002-04-08  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_jit_cleanup): added more statistics

	* invoke.c (arch_create_native_wrapper): special case EndInvoke -
	we need to pass the MonoMethod pointer as first argument.

	* delegate.c (mono_async_invoke): notify all listeners, not only a
	single one.
	(arch_end_invoke): we now pass a MonoMethod as first parameter and
	use arch_method_call_message_new() to access the stack.
	(arch_end_invoke): wait until we really finished processing
	(async_invoke_abort): notify all listeners, not only a
	single one.

2002-04-06  Dietmar Maurer  <dietmar@ximian.com>

	* message.c (arch_return_value): impl.
	(arch_method_return_message_restore): consider delegate BeginInvoke

	* jit.c: removed jit_exec_main()

	* delegate.c (arch_begin_invoke): use the message builder to make
	it architecture independent - still needs more cleanup.

2002-04-05  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c (mono_delegate_ctor): support for transparent proxy

	* x86.brg (freg): bug fix in CONV_R* opcodes

2002-04-04  Dietmar Maurer  <dietmar@ximian.com>

	* message.c: added documentation

2002-04-03  Dietmar Maurer  <dietmar@ximian.com>

	* mono.c (main): use --trace instead of --trace-calls

	* x86.brg: impl. REMOTE_STIND_XX

	* message.c (mono_store_remote_field): impl.

2002-03-30  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. REMOTE_FIELD (load fields of remote objects)

	* message.c (mono_load_remote_field): impl.

	* jit.c (mono_analyze_stack): only call marshalbyref methods
	through the vtable.
	(mono_analyze_stack): consider marshalbyref objects in LDFLD

Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>

	* x86.brg: kill pointer arithmetric.

2002-03-28  Martin Baulig  <martin@gnome.org>

	* jit.c (mono_debug_insert_breakpoint): New global variable.
	(mono_debug_last_breakpoint_address): New global variable.

	* emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
	non-zero, insert a breakpoint; if it's positive, decrement it when done.
	Set `mono_debug_last_breakpoint_address' to the address of the last inserted
	breakpoint.

	* debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
	`mono_debug_last_breakpoint_address', also documented them here.

2002-03-28  Martin Baulig  <martin@gnome.org>

	* debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
	(AssemblyDebugInfo): Added `format'.

	* debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
	this allows us choose the format on a per-assembly basis.
	(mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
	to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
	exists.
	(debug_generate_method_lines): Generate correct IL offsets.

2002-03-28  Martin Baulig  <martin@gnome.org>

	* jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.

	* emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.

	* debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
	`prologue_end_offset', added `epilogue_begin_offset' and `last_line'.

	* debug.c (debug_generate_method_lines): Don't return if we don't have line
	numbers, we still need to generate the IL offsets here. Emit line numbers
	for `prologue_end_offset' (the first line of actual code) and 
	`epilogue_begin_offset' (the line of the method's closing brace).
	Don't crash if cfg->bblocks [i].forest is NULL.
	(mono_debug_add_method): Don't crash if we don't have line numbers.
	Initialize the newly added fields.

	* debug-stabs.c: Record first and last line, emit filename info at the
	beginning of the stab file, gdb ignores the types otherwise.

	* debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
	emit line number info for the first and last line.

2002-03-28  Dietmar Maurer  <dietmar@ximian.com>

	* invoke.c (arch_create_delegate_trampoline): impl.

Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>

	* Makefile.am, mono.c, jit.h, jit.c: build the libmono library
	with the jit runtime to easy embedding. main() is moved to mono.c, now.
	* jit.c: use opcode names from libmetadata.
	* debug.h, debug.c: constify char* argument.

2002-03-28  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c: catching SIGSEGV again, added proxy support

2002-03-21  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c (mono_delegate_init): remove unused worker threads

2002-03-27  Mike Kestner <mkestner@speakeasy.net>

	* delegate.c (arch_get_delegate_invoke): malloc a bigger area

Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: remove glib mem vtable code.

2002-03-26  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
	lines if we don't have line number information.
	(write_method_dwarf2): Use `minfo->method_info.this_offset' instead
	of hardcoding 8.

	* debug-stabs.c (write_method_stabs): Don't generate method lines if
	we don't have line number information. Use `minfo->method_info.this_offset'
	instead of hardcoding 8.

	* debug.c (debug_generate_method_lines): Don't crash if we don't have
	line number information.
	(mono_debug_open_assembly): Don't generate line numbers for
	MONO_DEBUG_FORMAT_DWARF2_PLUS.
	(mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
	but it in the new `this_offset' field.
	
Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>

	* debug.c (debug_generate_method_lines): Use correct addresses for
	record_il_offset().

Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: do not set the glib mem vtable anymore.
	* Makefile.am: link to libmonoutils.

2002-03-25  Martin Baulig  <martin@gnome.org>

	* debug.h (mono_debug_make_symbols): Documented this function.

2002-03-24  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_add_method): Include the `this' offset in
	the `minfo->method_info.param_offsets' array.

2002-03-23  Martin Baulig  <martin@gnome.org>

	* x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
	to do it before the X86_CMP.
	(reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
	(reg: CLT (lreg, lreg)): Likewise.
	(reg: CLT_UN (lreg, lreg)): Likewise.
	(reg: CLT_UN (lreg, lreg)): Likewise.
	(reg: CGT (lreg, lreg)): Likewise.
	(reg: CGT (lreg, lreg)): Likewise.
	(reg: CGT_UN (lreg, lreg)): Likewise.
	(reg: CGT_UN (lreg, lreg)): Likewise.

2002-03-23  Martin Baulig  <martin@gnome.org>

	* debug-private.h (AssemblyDebugInfo): Added `_priv'.

	* debug-dwarf2-plus.c
	(mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
	(mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
	(mono_debug_write_assembly_dwarf2_plus): Only call
	mono_debug_update_symbol_file() here.

Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: inter strings before executing a method.
	Do not intern command line arguments anymore.

2002-03-21  Martin Baulig  <martin@gnome.org>

	* debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.

	* debug-dwarf2-plus.c: This debugging format reads a symbol file which has
	been created by MCS and fills in all machine dependent stuff.

	* debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
	removed everything which is already in MonoDebugMethodInfo.

	* debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
	(mono_debug_make_symbols): Don't open the file or call as, this is done in the
	backend code.

	* jit.c (main): Added "--dwarf-plus" command line option to use the new
	MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.

2002-03-21  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (usage): new option to specify maximum number of worker threads
	(mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN

	* delegate.c (async_invoke_abort): added support for asynchronous exceptions
	(arch_get_async_invoke): notify listeners before we call the
	asynchronous callback

2002-03-20  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c (async_invoke_thread): support for domains
	(async_invoke_thread): create workers only when needed

2002-03-19  Dietmar Maurer  <dietmar@ximian.com>

	* delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke

2002-03-18  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. lreg: XOR (lreg, lreg)
	impl. REM (freg, freg)

2002-03-17  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
	base types.

	* debug-dwarf2.c: Added support for strings and arrays.

2002-03-17  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_get_type): Recursively call this for all function members
	of a class type.
	(mono_debug_add_method): Don't mangle function names, this must be done by the
	debugger backend if the debugging format needs mangled names.

	* debug-dwarf2.c: Improved support for classes, added member functions.

2002-03-16  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_get_type): Recursively call this for all members and
	parent classes of a class type.

	* debug-dwarf2.c: Added basic support for classes. Set source language to C++
	since GDB doesn't like Java very much.

2002-03-16  Martin Baulig  <martin@gnome.org>

	* debug-dwarf2.c: Added support for enums.

2002-03-15  Martin Baulig  <martin@gnome.org>

	* debug.c (mono_debug_get_type): Recursively call this for all members
	of a struct type.

	* debug-dwarf2.c: Added support for structs.

2002-03-15  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
	to new MonoLMF layout

2002-03-14  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_create_native_wrapper): new code to generate
	wrappers for calling native functions.
	(arch_create_native_wrapper): free allocated strings
	(arch_handle_exception): made mono_jit_info_table domain dependent

2002-03-14  Martin Baulig  <martin@gnome.org>

	* debug.c (MonoDebugFormat): New public enums specifying which debugging
	format to use.
	(mono_debug_open_file): Added MonoDebugFormat argument.
	(mono_debug_make_symbols): Don't take an argument to make it easier to call
	this function from GDB. It's now safe to call this function multiple times;
	it'll always write a complete debugging file.

	* debug.c: Splitted this file into a general part which remains in this file
	and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
	All public functions now call a corresponding format specific function.

	* debug.c: The following changes are private to debug.c:
	(AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
	(record_line_number, debug_generate_method_lines): New private functions.
	(mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
	calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
	mono_debug_open_assembly_dwarf2).
	(mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
	now safe to call this function multiple times.
	(mono_debug_get_type): New public function. This takes a `MonoClass *' and
	returns an unique index for this type. It's used to ensure that we only write
	each class once to the debugging file.
	(mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
	data structure, but don't directly write to the debugging file. This is done
	later from mono_debug_write_assembly().

	* jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
	debugging output. Call mono_debug_close() on cleanup if necessary.

2002-03-14  Martin Baulig  <martin@gnome.org>

	* debug-private.h: New private header file.

	* debug-stabs.c: Added the stabs type generation stuff which was
	previously in debug.c.

	* debug-dwarf.c: Started to implement type support. We're currently
	only writing this most basic types to the dwarf file, but this will
	change soon.

2002-03-13  Martin Baulig  <martin@gnome.org>

	* debug-stabs.c, debug-dwarf2.c: New files containing my new
	debugging code. They're now in CVS, but not yet used anywhere.

2002-03-11  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
	macros, included new delegate code from Daniel Stodden. 
	
	
Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: verify that corlib and runtime are in sync.

Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>

	* emit-x86.c, jit.c: use the debug-helpers facilities to
	describe and match a method when debugging.

2002-03-10  Martin Baulig  <martin@gnome.org>

	* emit-x86.c (arch_compile_method): When emitting stabs debugging
	output, put a nop instruction at the start of all functions so that
	the adresses won't change when using --debug.

	* debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
	the bytecode area, stabs needs a line number in the .il file. Use the
	new info->moffsets to get the line number.
	(AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
	`moffsets' is an array of `total_lines' fields (total number of lines
	in the .il file); for each line in the .il field, this array contains
	the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
	of a method and 0 otherwise.
	(debug_load_method_lines): Read the whole .il file and initialize the
	info->moffsets field.

2002-03-09  Martin Baulig  <martin@gnome.org>

	* x86.brg (DIV_UN): Clear EDX before performing the division and remove
	the unnecessary CDQ instruction.

2002-03-07  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): only load addresses of value types
	on the runtime stack.

2002-03-07  Duncan Mak  <duncan@ximian.com>

	* Makefile.am: A small patch fixing errors in vpath-based builds
	(make clean failing to rerun monoburg due to BUILT_SOURCES usage),
	committed for Daniel Stodden <stodden@in.tum.de>. 

Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: Boehm-GC enable.

2002-03-07  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
	realloc that code sometimes!

	* emit-x86.c (mono_compute_branches): support several types of
	jump infos

2002-03-06  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. MUL_OVF_UN (reg, reg)

	* jit.c (mono_find_final_block): find correct finally handler.

	* emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
	caller saved registers.  

2002-03-05  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: use x86_widen_reg for CONV opcodes

2002-03-01  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions

	* emit-x86.c (arch_handle_exception): big fix - dont use
	uninitialized next_bp
	(arch_compile_method): make the jit thread save
	(x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
	to avoid need of recursive mutexes

	* x86.brg: use new mono_assert macros

2002-02-28  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
	calling into unmanaged code (arch_compile_method).

	* x86.brg: impl. CONV_I4 (freg) with correct rounding
	(lreg): impl CALL_I8(INTF_ADDR)
	impl. CONV_R_UN (reg)
	bug fix im REM_UN

2002-02-27  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.

2002-02-26  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: bug fix in CLT(lreg,lreg)
	(reg): bug fix in CONV_OVF_I4(lreg)
	(lreg): replaced x86_call_reg with x86_call_code

	* emit-x86.c (mono_add_jump_info): impl.
	(mono_compute_branches): patch real jump address (instead of
	emitting code twice)

Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>

	* x86.brg: optimize cmp reg,0 -> test reg.

Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.h, jit.c, emit-x86.c: Added a few statistics counters
	and the --stats command line option to print them.
	Fixed memory leak in arch_compile_method () when a method's code is
	found in the cache. Fix magic trampoline to deal with static calls.

2002-02-21  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN 

2002-02-19  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_compile_method): add shared code to mono_root_domain
	(arch_create_jit_trampoline): cache trampoline code

2002-02-18  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
	specific code.
	(mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check

	* x86.brg: do not encode exception objects into the instruction
	stream, because they are domain dependend. Use
	arch_get_throw_exception_by_name() instead;

Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: intern command line arguments.

2002-02-18  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): use the magic trampoline for all
	calls (since we cant store the address of compiled code in
	method->addr).
	(mono_analyze_stack): imp. LDSTR for shared code

	* emit-x86.c (x86_magic_trampoline): handle x86_call_code().
	(arch_compile_method): add a cache for compiled methods to avoid
	recompilation. dont use method->addr to store domain dependent
	code address.

2002-02-15  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. BLE,BGT for freg

Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>

	* emit-x86.c: handle unreachable code. Eliminate some unneeded
	malloc() calls.
	* jit.c: handle unreachable code. Move setting of mono_end_of_stack to
	main(). Add --compile classname and --ncompile num command line
	options to do performance evaluation of the jitter (and help
	debugging).

2002-02-15  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_compile_method): bug fix in static delegate
	Invoke code.

2002-02-14  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.

2002-02-13  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): impl. CEE_SIZEOF

2002-02-13  Miguel de Icaza  <miguel@ximian.com>

	* jit.c (arch_allocate_var): Only assert that the alignment is
	at least 32-bits aligned, not always 32-bits aligned (for I8 for example).

Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>

	* x86.brg: fix invalid cast check in unbox. Pack MBTree structure.

Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>

	* emit-x86.c: make x86_magic_trampoline() handle call instructions
	with an imm8 displacement. x86.brg not yet changed to take advantage
	of it.

Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: use opcode info from libmetadata to do flow analysis
	and simplify code.

2002-02-06  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking 

2002-02-05  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: use element_class for type check

2002-02-04  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (main): impl. __array_Address icall

	* mempool.c (mono_mempool_alloc): handle large block allocation

2002-02-01  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. SHL/SHR/CLT for 64 bit values

2002-01-31  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. CEQ(lreg,lreg)

	* jit.c (mono_analyze_stack): impl. LDVIRTFTN
	(mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD

	* x86.brg: removed some dead code.

2002-01-18  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (arch_allocate_var): fixed alignment bugs

2002-01-17  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF

2002-01-16  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (main): install the trampoline before we start to create
	objects.

	* x86.brg: impl. CLT_UN, CGT_UN

	* emit-x86.c (leave_method): added check for null object
	(enter_method): consider byref arguments

2002-01-14  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: bug fix in CONV_OVF_I1_UN
	impl. ADD_OVF, MUL_OVF
	impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
	(SUB (lreg, lreg)): bug fix - use SBB instead of SUB
	(EMIT_COND_EXCEPTION): added signed flag

Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>

	* jit.c: implement stloc, ldloc, ldloca.

2002-01-11  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): fixed calculation of last_instr

	* x86.brg (LDLEN): emit null_reference exception
	(BLE_UN): bug fix. 
	(RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog

2002-01-04  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: bug fix in CASTCLASS

2001-12-21  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): spill MUL to avoid problem with
	register allocation.

	* emit-x86.c (arch_compile_method): fixed static delegate bug

2001-12-16  Miguel de Icaza  <miguel@ximian.com>

	* x86.brg, jit.c: Split up the nodes that we used to share on
	CONV_OVF.  They were sharing the nodes because they are the same
	on 32-bit machines, but on 64-bit machines you need different
	code for them.

2001-12-17  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: removed prerequisite that (tree->left->reg1 <
	tree->right->reg1) to make register allocation easier.

2001-12-16  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_handle_exception): new code to handle
	exceptions inside unmanaged code.

	* x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
	address as first argument.

2001-12-15  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: pass exceptions on the stack

	* jit.h (ISSTRUCT): new macro to check for real value types
	(return false for enum types). 

2001-12-11  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: use position indepentent code if possible. 

	* x86.brg (EMIT_COND_EXCEPTION): new macro.

	* emit-x86.c (mono_emit_cfg): impl. variable code buffer size

2001-12-10  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
	blocks.
	(mono_analyze_flow): use g_malloc0 o allocate large bblocks array.

	* x86.brg (stmt): added opt. for STIND_R4/STIND_R8

2001-12-07  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_allocate_intvar): bug fix.

	* emit-x86.c (get_unbox_trampoline): impl.

	* jit.c (mono_analyze_stack): impl STOBJ, LEAVE

2001-12-06  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: raise exceptions.

2001-12-05  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
	the stack. 

2001-12-06  Miguel de Icaza  <miguel@ximian.com>

	* jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
	CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
	CONV.OVF.I2.UN, CONV.OVF.I8.UN

2001-12-04  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
	removed the locaddr nonterminal, reimplemented value types
	
	* jit.c: reimplemented value type support, better support for
	enumeration types. 

2001-12-03  Miguel de Icaza  <miguel@ximian.com>

	* x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
	conv.ovf.u8 

Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>

	* jit.c: call mono_init() after registering internal calls.

2001-11-30  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (tree_preallocate_regs): improved register allocation

	* x86.brg: impl. ISINST, CASTCLASS

Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>

	* x86.brg: rearrange fields to reduce struct size.
	* jit.c: use signature->param_count, not signature->params_size.
	* debug.c: off-by-one error fix.

2001-11-29  Radek Doulik  <rodo@ximian.com>

	* Makefile.am: build mono only for X86 architecture, compilation
	fails for ppc now because of accessing registers in sigcontext
	structure

2001-11-29  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): bug fix in DUP

Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>

	* debug.c: fix type handling. Position function position at start of
	IL code. Output more fine-grained stepping information.

2001-11-28  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_

	* jit.c (mono_analyze_stack): record the cli_address for later use
	with gdb.
	(sigsegv_signal_handler): translate sigsegv into "Internal error"
	exception.

Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>

	* debug.c, debug.h: added support for generating stabs.
	Stabs can be compiled with as and the resulting object file can be
	loaded in a gdb session with add-symbol-file object.o.
	* jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
	where locals and arguments are stored in the stack. Add support for
	passing command line arguments to CLR programs.
	* emit-x86.c: insert a breakpoint at method invocation if needed.

2001-11-27  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c: exception support

	* emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
	the right order.

2001-11-26  Dick Porter  <dick@ximian.com>

	* Makefile.am (mono_LDADD): Add io-layer library

2001-11-19  Dietmar Maurer  <dietmar@ximian.com>

	* jit.c (mono_analyze_stack): impl. LDFTN
	(MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
	make register allocation easier on x86

	* emit-x86.c (enter_method): more debugging output for Strings
	(arch_compile_method): added delegate support
	(arch_compile_method): align EBP to 8 byte boundary

Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>

	* jit.c: use mono_install_trampoline (), instead of exporting
	a function to a lower-level library.

2001-11-16  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (STRING_ARG): impl. a way to marshal strings. This
	will be extensible to handle all possible kinds of marshalling
	requirements. 

	* jit.c (map_call_type): added MB_TERM_CALL_VOID
	(mono_analyze_stack): impl. LDELEMA, reimplemented CALL
	instructions to handle this arguments more effectively.

2001-11-15  Dietmar Maurer  <dietmar@ximian.com>

	* Makefile.am (mono_SOURCES): renamed testjit to mono

	* x86.brg: added debugging support 

	* testjit.c: added support for value types, CFG improvements

	* emit-x86.c (enter_method): handle value types
	(tree_allocate_regs): impl. a better way to handle chain rules

2001-11-10  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (INITOBJ): bug fix: initialize data before use,
	simplified the code.

2001-11-09  Miguel de Icaza  <miguel@ximian.com>

	* testjit.c (mono_analyze_stack): Remove compiler warning by
	testing against NULL.

2001-11-09  Dick Porter  <dick@ximian.com>

	* Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more

2001-11-09  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c (mono_analyze_stack): new BOX impl.

	* x86.brg: implemented INITOBJ

	* testjit.c (mono_analyze_stack): finished array support
	(mono_analyze_stack): reimplemented DUP instruction

2001-11-08  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
	represents the address of the element. This way we can emit highly
	optimized x86 instructions to access elements (using base+index+offset
	adressing mode)

2001-11-07  Miguel de Icaza  <miguel@ximian.com>

	* mempool.c: Include string.h to kill warning.

	* testjit.c: Add typecast to kill warning.

	* x86.brg: Include string.h to eliminate warning.

	* emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
	kill warning.

2001-11-07  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (enter_method): print out all method arguments
	(x86_magic_trampoline): impl.
	(arch_create_simple_jit_trampoline): we use different trampolines
	for static methods (no need to write the address back into to
	vtable).

2001-11-06  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
	use less the 16 bytes.

	* x86.brg: code cleanup

2001-11-05  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c: bug fixes.

	* emit-x86.c (leave_method): print result values

2001-11-03  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (enter_method): new debugging code
	(leave_method): new debbuging code, this functions are called
	when you use the new option --trace-calls

2001-11-02  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c: impl. STELEM_XX, STELEM_XX

	* x86.brg: impl. LDLEN, LDELEMA
	

2001-10-15  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: added some experimental code for CALL
	instructions - still not found the optimal way to do it.

	* testjit.c (map_stind_type): add support for value types with
	a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
	CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
	(ctree_create_newobj): impl.
	

	* emit-x86.c (tree_allocate_regs): removed allocation code for
	addr nonterminal.
	(get_address): use a simple, but bug free search instead of the
	buggy binary search.

2001-10-12  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c: support virtual functions

	* x86.brg: support different addressing modes for calls

2001-10-11  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c: impl. STFLD

2001-10-10  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: impl. CEQ

2001-10-04  Dick Porter  <dick@ximian.com>

	* testjit.c:
	* emit-x86.c: include mono-endian.h not endian.h

2001-10-02  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c (ctree_create_dup): really duplicate the tree.
	attach the arguments to the CALL node. Added a new macro to
	make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).

2001-10-01  Dietmar Maurer  <dietmar@ximian.com>

	* interp.brg: the burm based interpreter: added the file as example.

2001-09-27  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: cleanup

	* testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
	data.
	(map_stind_type): support enum types
	(map_ldind_type): support enum types

	* emit-x86.c (tree_allocate_regs): added code to support
	register allocation for addressing modes trees.
	(tree_emit): bug fix: we have to emit all mono_burg_functins. The
	previous impl. did not work for chain rules.
	(compute_branches): support for SWITCH statements

	* x86.brg: added rules to model x86 addressing modes

2001-09-26  Dietmar Maurer  <dietmar@ximian.com>

	* emit-x86.c (compute_branches): implemented SWITCH

	* testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
	(map_ldind_type): add enumeration types.
	(map_stind_type): add enumeration types.

	* emit-x86.c (arch_compile_method): more documentation.

	* testjit.c: moved the architecture specific things to emit-x86.c
	and x86.brg. Added more documentation. code cleanup.

2001-09-25  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: we now have different types of addresses: ADDR_L for local
	values, ADDR_A for arguments and ADDR_G for global addresses. We
	also use LDIND_XX token to load values from a specific address
	instead of LDLOC/STLOC. 

	* testjit.c: use the new adressing scheme everywhere:
	LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)  

2001-09-24  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c (main): fix bug in parameter parsing

	* x86.brg: impl. more opcodes

2001-09-23  Dick Porter  <dick@ximian.com>

	* Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS

2001-09-23  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c: use the memory pool to avoid memory leaks

2001-09-22  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: increment the stack pointer after function calls

2001-09-21  Dick Porter  <dick@ximian.com>

	* Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line

2001-09-21  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: implemented long MUL/DIV
	(MB_OPT_LEVEL): define optimisation level macro

	* testjit.c (tree_allocate_regs): added a way to prevent EDX usage
	for operations like idiv. it is also possible to assign specific registers.

2001-09-20  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: added basic support for long

	* testjit.c (mono_compile_method): implemented POP

2001-09-19  Miguel de Icaza  <miguel@ximian.com>

	* testjit.c (usage): Added a couple of more usage options.

2001-09-19  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: added more floating point grammar 

	* testjit.c (mono_compile_method): make local offsets negative

	* x86.brg: added some floating point trees

	* testjit.c (mono_compile_method): arguments on the runtime 
	stack are at least 4 bytes

	* x86.brg: partly implemented 8,16 bit integers

	* testjit.c (get_address): mark basic blocks

2001-09-18  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: added some rules to optimize code

	* testjit.c (get_address): use a binary search to get the address
	(main): added an option to debug the jit (-d)

Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* testjit.c: better/faster align code. Handle ldloc.s and stloc.s.

2001-09-17  Miguel de Icaza  <miguel@ximian.com>

	* testjit.c (mono_compile_method): Provide better error reporting.

2001-09-17  Dietmar Maurer  <dietmar@ximian.com>

	* testjit.c (tree_get_address): impl. to fix address bug
	(tree_get_address): make sure that we can only jump to the first
	instruction of a tree.

	* x86.brg: emit real code for calls

	* testjit.c (create_jit_trampoline): creates a function to trigger jit
	compilation.
	(mono_compile_method): reversed argument order

2001-09-15  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg (stmt): don't emit unnecessary register moves

	* testjit.c (tree_allocate_regs): free registers earlier

2001-09-14  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: branch addresses are now resolved

	* testjit.c (compute_branches): compute address of branches

	* x86.brg: emit real x86 instructions

	* testjit.c: call objdump to disassemble the output

2001-09-13  Dietmar Maurer  <dietmar@ximian.com>

	* x86.brg: use the right offsets to access local variables
	and arguments.

	* emit-x86.c: only save/restore callee saved registers if they are
	really modified.

	* testjit.c (tree_allocate_regs): use the new MonoRegSet to
	allocate registers.
	(mono_compile_method): changed the tree for mothod calls

	* regset.h: impl.
	
	* regset.c: impl.
	

2001-09-10  Miguel de Icaza  <miguel@ximian.com>

	* x86.brg: Use Unix assembly syntax.

	* emit-x86.c: support code, should be moved

	* testjit.c: Use GPtrArrays instead of GLists, as those are very
	inefficient at appends.

	* Renamed `create_new_leave' to `create_new_leaf'

	

