[PATCH 4/4] vm: constify more vm_object functions

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- include/vm/object.h |2 +- test/vm/object-stub.c |3 ++- vm/object.c |3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/vm/object.h b/include/vm/object.h index 2252270..a8fe9bf 100644 --- a/include/vm/object.h ++

[PATCH 2/4] vm: constify vm_class operations

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- include/vm/class.h |6 +++--- test/vm/class-stub.c |3 ++- vm/class.c |2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/vm/class.h b/include/vm/class.h index a0a2451..2da182a 100644 --- a/include/vm/class.h +++ b

[PATCH 3/4] vm: constify more vm_class functions

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- include/vm/class.h | 18 +- test/vm/class-stub.c |6 +++--- vm/class.c | 18 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/vm/class.h b/include/vm/class.h index 2da182a..67b7477 1006

[PATCH 1/4] vm: constify field setters/getters and string_to_cstr

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- include/vm/object.h | 10 +- vm/object.c |2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/vm/object.h b/include/vm/object.h index c78b82c..2252270 100644 --- a/include/vm/object.h +++ b/include/vm/object.h @@ -45,

[PATCH 4/5] build: depend on building the runtime classes for compiling jato

2009-06-27 Thread Vegard Nossum
We'll want to make sure that the runtime classes have been built (if they changed) before jato is built. Previously we only depended on these classes from the unit tests, which was wrong. Signed-off-by: Vegard Nossum --- Makefile | 14 +++--- 1 files changed, 7 insertions(+), 7 deletio

[PATCH 3/5] build: put runtime classes in the right directory

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- Makefile| 12 regression/run-suite.sh |2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ec0a231..9c5b0c1 100644 --- a/Makefile +++ b/Makefile @@ -199,10 +199,6 @@ test: monoburg

[PATCH 5/5] regression: re-enable ObjectCreationAndManipulationTest

2009-06-27 Thread Vegard Nossum
This works now, so let's reenable it. Signed-off-by: Vegard Nossum --- .../jvm/ObjectCreationAndManipulationTest.java |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/regression/jvm/ObjectCreationAndManipulationTest.java b/regression/jvm/ObjectCreationAndManipulatio

[PATCH 2/5] classloader: don't run s inside the compiler

2009-06-27 Thread Vegard Nossum
This fixes a bug where a method may require other classes to load, thereby compiling and executing _their_ methods, which may (compile and) call the same method we were trying to execute in the first place. Signed-off-by: Vegard Nossum --- include/vm/classloader.h |3 +- jit/trampoline.c

[PATCH 1/5] vm: fix classloader deadlock on recursive dependencies

2009-06-27 Thread Vegard Nossum
Loading a class will finish by trying to execute that class' (static initializer) method. However, this method may require other classes to load as well. Prior to this patch, it would be possible that a class would (indirectly) try to load itself, which would deadlock. This patch introduces a new

[PATCH] Add myself to AUTHORS

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- AUTHORS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/AUTHORS b/AUTHORS index b6e18e7..729a92f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,3 +7,9 @@ E: penb...@cs.helsinki.fi W: http://www.cs.helsinki.fi/u/penberg/ D: Author and main

[PATCH] insn-selector: use the correct offset for ARRAY_STORE

2009-06-27 Thread Vegard Nossum
>From ca383dea4d707411d1623f655ae9c1470ae8e06a Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Sat, 27 Jun 2009 20:37:21 +0200 Subject: [PATCH] insn-selector: use the correct offset for ARRAY_STORE Arrays start immediately after the end of struct vm_object. Signed-off-by: Vegard Nossum ---

[PATCH 1/2] vm: fix bug in convert_checkcast()

2009-06-27 Thread Tomek Grabiec
The expression that was popped from mimic-stack was used as an argument of STMT_CHECKCAST and it was pushed back onto mimic-stack. This led to double-evaluation of the expression. Solution for that is to save the expression's result to a temporary and use this temporary in both places. Signed-off-

[PATCH 2/2] regression: test for expression double-evaluation in checkcast

2009-06-27 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- .../jvm/ObjectCreationAndManipulationTest.java | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/regression/jvm/ObjectCreationAndManipulationTest.java b/regression/jvm/ObjectCreationAndManipulationTest.java index e87c326..

[PATCH 2/2] regression: enable fixed exception tests

2009-06-27 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- regression/jvm/ExceptionsTest.java |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/regression/jvm/ExceptionsTest.java b/regression/jvm/ExceptionsTest.java index 71c4d2f..292fb05 100644 --- a/regression/jvm/ExceptionsTest.java +++ b/regr

[PATCH] vm: print exception message in vm_print_exception()

2009-06-27 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- include/vm/java_lang.h |2 ++ vm/jato.c | 10 +++--- vm/stack-trace.c | 13 - 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/include/vm/java_lang.h b/include/vm/java_lang.h index 663d0ea..e3e2a25 100644

[PATCH] runtime: provide VMSystem.arraycopy()

2009-06-27 Thread Vegard Nossum
>From 666b76d3a90163787f7065902604c784a1fef6b3 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Sat, 27 Jun 2009 14:41:59 +0200 Subject: [PATCH] runtime: provide VMSystem.arraycopy() We need this in order to actually find the method and notice that it's a native method. Signed-off-by: Vegard N

Re: [RFC][PATCH] build: put runtime classes in the right directory

2009-06-27 Thread Vegard Nossum
2009/6/27 Vegard Nossum : > From 51124c6533895ef28f39c2c61aca91c8432fb498 Mon Sep 17 00:00:00 2001 > From: Vegard Nossum > Date: Sat, 27 Jun 2009 14:32:19 +0200 > Subject: [PATCH] build: put runtime classes in the right directory > > Signed-off-by: Vegard Nossum > --- >  Makefile                |

[PATCH 1/2] jit: fix find_handler()

2009-06-27 Thread Tomek Grabiec
The order of parameters passed to vm_class_is_assignable_from() should be the other way around. Signed-off-by: Tomek Grabiec --- jit/exception.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/jit/exception.c b/jit/exception.c index ad0ed72..07fdc82 100644 --- a/jit/exc

[PATCH] build: depend on building the runtime classes for compiling jato

2009-06-27 Thread Vegard Nossum
>From 922152d7faf82f2d68fd23a526bab613a4339501 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Sat, 27 Jun 2009 14:39:15 +0200 Subject: [PATCH] build: depend on building the runtime classes for compiling jato We'll want to make sure that the runtime classes have been built (if they changed) b

[RFC][PATCH] build: put runtime classes in the right directory

2009-06-27 Thread Vegard Nossum
>From 51124c6533895ef28f39c2c61aca91c8432fb498 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Sat, 27 Jun 2009 14:32:19 +0200 Subject: [PATCH] build: put runtime classes in the right directory Signed-off-by: Vegard Nossum --- Makefile| 12 regression/run-suite

[PATCH 2/2] vm: let native_vmruntime_println() use vm_string_to_cstr()

2009-06-27 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- vm/jato.c | 20 +--- 1 files changed, 1 insertions(+), 19 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 085009b..4b5c9f7 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -76,25 +76,7 @@ static void __vm_native native_vmruntime_exit(int status)

[PATCH 1/2] vm: introduce vm_string_to_cstr() which creates a C string from java.lang.String object

2009-06-27 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- include/vm/object.h |1 + vm/object.c | 44 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/include/vm/object.h b/include/vm/object.h index 375b6ba..26d5e31 100644 --- a/include/vm/object.

Re: [PATCH] regression: add BranchTest to suite

2009-06-27 Thread Pekka Enberg
Applied, thanks! -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

[PATCH] regression: add BranchTest to suite

2009-06-27 Thread Vegard Nossum
>From d15485f6e586e0f5cc7823b976ae4bd83f99b527 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Sat, 27 Jun 2009 12:19:29 +0200 Subject: [PATCH] regression: add BranchTest to suite This tests whether the code flow resulting from the use of || and && seems plausible. Signed-off-by: Vegard Nossu

Re: [PATCH 1/6] insn-selector: add dummy rules for floating-point

2009-06-27 Thread Pekka Enberg
Series applied, thanks! -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH 2/6] insn-selector: don't use fixed var for EXPR_ARRAYLENGTH

2009-06-27 Thread Vegard Nossum
2009/6/27 Vegard Nossum : > From: Tomek Grabiec > When compiling the expression (x % array.length), the "array.length" would put the result in %eax. The "idiv" instruction (used by the % operator) takes a fixed input in %eax and one additional operand; the result is that we were outputting "idiv

[PATCH 6/6] jit: move compilation unit locking after the trace print-out

2009-06-27 Thread Vegard Nossum
This helps debugging by letting us see the method which deadlocked (in case of a deadlock). Signed-off-by: Vegard Nossum --- jit/trampoline.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jit/trampoline.c b/jit/trampoline.c index 05f5cc6..af3dae5 100644 --- a/jit/tr

[PATCH 3/6] vm: add gnu.classpath.VMSystemProperties

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- Makefile |6 +- .../gnu/classpath/VMSystemProperties.java | 10 ++ vm/jato.c |7 +++ 3 files changed, 22 insertions(+), 1 deletions(-) create mod

[PATCH 4/6] vm: add java.lang.VMSystem

2009-06-27 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- Makefile |3 ++- runtime/classpath/java/lang/VMSystem.java |5 + vm/jato.c |9 + 3 files changed, 16 insertions(+), 1 deletions(-) create mode 100644 runtime/classpath/java/l

[PATCH 5/6] vm: add gnu.classpath.VMStackWalker dummy

2009-06-27 Thread Vegard Nossum
This is just to prevent UnsatisfiedLinkException. Signed-off-by: Vegard Nossum --- Makefile |1 + runtime/classpath/gnu/classpath/VMStackWalker.java |5 + vm/jato.c | 13 + 3 files change

[PATCH 1/6] insn-selector: add dummy rules for floating-point

2009-06-27 Thread Vegard Nossum
Thanks a LOT to Arhur Huillet for adding these dummy rules. This prevents jato from crashing when we try to jit-compile floating-point bytecodes. PS: You might want to put these rules in different locations. I don't know the proper monoburg style. Signed-off-by: Vegard Nossum --- arch/x86/insn-

[PATCH 2/6] insn-selector: don't use fixed var for EXPR_ARRAYLENGTH

2009-06-27 Thread Vegard Nossum
From: Tomek Grabiec Signed-off-by: Vegard Nossum --- arch/x86/insn-selector_32.brg |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/insn-selector_32.brg b/arch/x86/insn-selector_32.brg index 94d7783..ba4d8b6 100644 --- a/arch/x86/insn-selector_32.brg +++ b/arch

Re: [PATCH 9/11] x86: add OP_XXX(reg, reg) monoburg rules

2009-06-27 Thread Arthur Huillet
Hi, On Sat, 27 Jun 2009 03:30:52 +0200 Tomek Grabiec wrote: > They will be needed when EXPR_LOCAL will be replaced with EXPR_TEMPORARY Strange justification. They are needed already on certain programs. Have you tested the new rules by removing the EXPR_LOCAL variants and running {Integer,Lon