[PATCH 02/13] vm: optimize vm_call_method_a() a bit.

2009-07-23 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/call.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/vm/call.c b/vm/call.c index 09ac7d1..073e043 100644 --- a/vm/call.c +++ b/vm/call.c @@ -43,23 +43,24 @@ vm_call_method_a(struct vm_method

[PATCH 03/13] vm: rename vm_enter_jni_interface() to enter_vm_from_jni()

2009-07-23 Thread Tomek Grabiec
This also renames -jni_interface_frame field of struct jni_stack_entry to -vm_frame VM can be entered from JNI not only through JNI interface function but also through JNI trampoline (jit_native_trampoline). Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/vm/stack-trace.h | 19

[PATCH 04/13] jit: signal_exception() should override already signalled exception

2009-07-23 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- jit/exception.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/jit/exception.c b/jit/exception.c index 251bd17..d8eeed5 100644 --- a/jit/exception.c +++ b/jit/exception.c @@ -84,9 +84,6 @@ void

[PATCH 05/13] vm: clear exceptions before calling method from VM.

2009-07-23 Thread Tomek Grabiec
Any pending exceptions must be cleared before calling method from VM and restored upon return. Otherwise exception will be caught by the first encountered exception test which is not a correct behavior. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/call.c | 23 ---

[PATCH 06/13] vm: fix call stack traversal when called from JNI trampoline

2009-07-23 Thread Tomek Grabiec
When JNI method linking fails an instance of java.lang.UnsatisfiedLinkError is thrown from JNI trampoline (jit_native_trampoline()). When stack trace is created for this exception, stack walker is trying to use the method-compilation_unit-native_ptr to get the JNI method's address, but this

[PATCH 07/13] vm: fix comment for alloc_offset_guard()

2009-07-23 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/guard-page.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/guard-page.c b/vm/guard-page.c index 420230a..f47c936 100644 --- a/vm/guard-page.c +++ b/vm/guard-page.c @@ -37,8 +37,8 @@ * alloc_offset_guard -

[PATCH 08/13] vm: put body of enter_vm_from_jni macro in do { } while(0)

2009-07-23 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/vm/stack-trace.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vm/stack-trace.h b/include/vm/stack-trace.h index f6db886..f326c41 100644 --- a/include/vm/stack-trace.h +++ b/include/vm/stack-trace.h

[PATCH 09/13] vm: test for null pointer in native_vmruntime_println()

2009-07-23 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index ef4b2e2..02f060d 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -213,6 +213,12 @@ native_vmruntime_native_load(struct vm_object

[PATCH 10/13] regression: introduce jvm/StackTraceTest.java

2009-07-23 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- Makefile |1 + regression/jvm/ExceptionsTest.java | 25 -- regression/jvm/StackTraceTest.java | 90 regression/jvm/TestCase.java | 18 +++

[PATCH 11/13] jit: rename jit_native_trampoline() to jit_jni_trampoline()

2009-07-23 Thread Tomek Grabiec
VM natives no longer have trampolines because they are linked when their method object is initialized. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- jit/trampoline.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jit/trampoline.c b/jit/trampoline.c index

[PATCH 3/5] test/jit: remove jamvm stubs

2009-07-23 Thread Vegard Nossum
Jam VM is no longer used. Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- test/jit/Makefile |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/test/jit/Makefile b/test/jit/Makefile index 80151f7..b5444d0 100644 --- a/test/jit/Makefile +++ b/test/jit/Makefile @@

[PATCH 2/2] vm: println(null) should print null\n instead of throwing NullPointerException

2009-07-23 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index b37ace4..636f6a9 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -214,8 +214,7 @@ native_vmruntime_native_load(struct vm_object *name,

[RFC PATCH 3/3] WIP bits for control flow resolution

2009-07-23 Thread Arthur HUILLET
From: Arthur Huillet arthur.huil...@free.fr DO NOT MERGE THIS !!! Signed-off-by: Arthur Huillet arthur.huil...@free.fr diff --git a/Makefile b/Makefile index 58ad9db..55de435 100644 --- a/Makefile +++ b/Makefile @@ -256,6 +256,7 @@ REGRESSION_TEST_SUITE_CLASSES = \

[PATCH 2/3] jit: add vreg_start_interval and interval_child_at

2009-07-23 Thread Arthur HUILLET
From: Arthur Huillet arthur.huil...@free.fr Those functions will be used by the register allocator when doing control flow resolution. Signed-off-by: Arthur Huillet arthur.huil...@free.fr --- include/jit/vars.h |4 +++- jit/interval.c | 33 + 2 files

[RFC PATCH 1/3] jit: add bb_first_insn and bb_last_insn

2009-07-23 Thread Arthur HUILLET
From: Arthur Huillet arthur.huil...@free.fr Those functions are to be used by the register allocator when resolving control flow. Signed-off-by: Arthur Huillet arthur.huil...@free.fr --- include/jit/basic-block.h |2 ++ jit/basic-block.c | 10 ++ 2 files changed, 12

Re: [RFC PATCH 3/3] WIP bits for control flow resolution

2009-07-23 Thread Arthur Huillet
Hi, if you apply this series, you can help me work on the bug. On Thu, 23 Jul 2009 23:24:50 +0200 Arthur HUILLET arthur.huil...@free.fr wrote: From: Arthur Huillet arthur.huil...@free.fr DO NOT MERGE THIS !!! Signed-off-by: Arthur Huillet arthur.huil...@free.fr diff --git a/Makefile