[PATCH 6/7] regression: add tests for wide instructions

2009-07-14 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- Makefile |3 +- regression/jvm/WideTest.j | 47 + regression/run-suite.sh |1 + 3 files changed, 50 insertions(+), 1 deletions(-) create mode 100644 regression/jvm/WideTest.j diff --git a/

[PATCH 7/7] regression: add tests for subroutine inlining

2009-07-14 Thread Tomek Grabiec
Test multiple levels of nesting and exception handler range splitting. Signed-off-by: Tomek Grabiec --- regression/jvm/SubroutineTest.j | 92 +++ 1 files changed, 92 insertions(+), 0 deletions(-) diff --git a/regression/jvm/SubroutineTest.j b/regression/jvm

[PATCH 4/7] jit: add support for WIDE instruction prefix

2009-07-14 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- Makefile |3 +- include/jit/bytecode-to-ir.h |1 + include/jit/compiler.h |2 + jit/arithmetic-bc.c | 14 --- jit/bytecode-to-ir.c | 39 --- jit/load-store-bc.c

[PATCH 2/7] jit: fix verify_correct_nesting() and add verify_no_recursion()

2009-07-14 Thread Tomek Grabiec
verify_no_recursion() checks whether all call sites of given subroutine all outside its body. It's a requirement for inlining to be possible. Signed-off-by: Tomek Grabiec --- jit/subroutine.c | 34 ++ 1 files changed, 30 insertions(+), 4 deletions(-) diff --git

[PATCH 3/7] vm: fix disassembly of wide instructions

2009-07-14 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- vm/bytecodes.c | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/vm/bytecodes.c b/vm/bytecodes.c index 8c6a5fa..4d78d38 100644 --- a/vm/bytecodes.c +++ b/vm/bytecodes.c @@ -207,20 +207,25 @@ void bytecode_disassemble(const

[PATCH 1/7] jit: fix subroutine scanning

2009-07-14 Thread Tomek Grabiec
We should stop scanning on every RET instruction Signed-off-by: Tomek Grabiec --- jit/subroutine.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/jit/subroutine.c b/jit/subroutine.c index bbfad16..e831d17 100644 --- a/jit/subroutine.c +++ b/jit/subroutine.c @@

[PATCH] vm: jar/manifest file parsing

2009-07-14 Thread Vegard Nossum
This provides a recursive-descent parser for the grammar of sections and manifest files as given at: http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html Signed-off-by: Vegard Nossum --- Makefile |1 + include/vm/jar.h | 47 vm/jar.c | 620 +++

[PATCH 3/3] regression: add test for subroutine with wide instructions inlining

2009-07-14 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- regression/jvm/SubroutineTest.j | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/regression/jvm/SubroutineTest.j b/regression/jvm/SubroutineTest.j index 2e7bd37..a44576f 100644 --- a/regression/jvm/SubroutineTest.j +++ b/regres

[PATCH 2/3] jit: properly handle wide instructions in subroutine inlining

2009-07-14 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- include/vm/bytecodes.h |7 +++-- jit/subroutine.c | 49 ++- vm/bytecodes.c | 29 ++- 3 files changed, 54 insertions(+), 31 deletions(-) diff --git a/include/vm/bytecodes.h b

[PATCH 1/3] vm: properly handle WIDE instruction size

2009-07-14 Thread Tomek Grabiec
Wide instruction changes the size of arguments of the following instruction from 8-bits to 16-bits. Signed-off-by: Tomek Grabiec --- include/vm/bytecode-def.h |2 +- test/vm/bytecodes-test.c | 24 vm/bytecodes.c| 62 +-

[PATCH] regression: add InterfaceInheritanceTest

2009-07-14 Thread Vegard Nossum
Original was provided by Tomek Grabiec, I just made it into a proper test-case/patch. Signed-off-by: Vegard Nossum --- Makefile |1 + regression/jvm/InterfaceInheritanceTest.java | 29 ++ regression/run-suite.sh

[PATCH] vm: fix interface method resolution error

2009-07-14 Thread Vegard Nossum
A "direct superclass of an interface" is defined as any of the interfaces listed in an interface's implemented interfaces, and _not_ in the "super" field of the class struct (which must always be java/lang/Object). In other words, when looking up interface methods, we shouldn't search ->super at a