[PATCH] jit: clear mimic stack after conversion of *return instructions

2009-08-16 Thread Tomek Grabiec
Quoting JVM spec for ireturn: Any other values on the operand stack of the current method are discarded. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/jit/basic-block.h |1 + include/vm/stack.h|5 + jit/basic-block.c | 10 ++ jit/exception-bc.c

[penberg/jato] 408f6a: jit: clear mimic stack after conversion of *return...

2009-08-16 Thread noreply
Branch: refs/heads/master Home: http://github.com/penberg/jato Commit: 408f6a074ca4e7973192d7edba3ef588fd82b96d http://github.com/penberg/jato/commit/408f6a074ca4e7973192d7edba3ef588fd82b96d Author: Tomek Grabiec tgrab...@gmail.com Date: 2009-08-16 (Sun, 16 Aug 2009) Changed paths: M

[penberg/jato] aa1c5b: Makefile: Build with some more extra warnings

2009-08-16 Thread noreply
Branch: refs/heads/master Home: http://github.com/penberg/jato Commit: aa1c5b223220af6cd63190421d49e600badad0c4 http://github.com/penberg/jato/commit/aa1c5b223220af6cd63190421d49e600badad0c4 Author: Pekka Enberg penb...@cs.helsinki.fi Date: 2009-08-16 (Sun, 16 Aug 2009) Changed paths:

More GCC warnings enabled

2009-08-16 Thread Pekka Enberg
Hi all, I've enabled some more GCC warnings now. There's still few more I'd like to enable at some point: -Wstack-protector -Wstrict-aliasing=3 -Wswitch-default -Wswitch-enum -Wpacked -Wshadow -Wbad-function-cast Unfortunately all of them make bugs in Jato code visible so

[PATCH 1/8] vm: declare vm_call_method_this_*() for calling virtual methods.

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/vm/call.h | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/include/vm/call.h b/include/vm/call.h index 872579b..eed2b0e 100644 --- a/include/vm/call.h +++ b/include/vm/call.h @@ -32,6

[PATCH 2/8] vm: implement VMStackWalker.getClassLoader().

2009-08-16 Thread Tomek Grabiec
We connect it to VMClass.getClassLoader(). Classpath's documentation says that we should do this, and the duplicate function was introduced to workaround access control problems. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c |1 + 1 files changed, 1 insertions(+), 0

[PATCH 3/8] vm: implement properly VMStackWalker.getClassContext()

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c | 50 +- 1 files changed, 41 insertions(+), 9 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 0f13dc6..4d959cd 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -100,24 +100,56 @@

[PATCH 4/8] vm: introduce support for different class loaders.

2009-08-16 Thread Tomek Grabiec
This adds support for delegating class loading to other class loaders. While resolving a class, we must use the class loader of the class from which resolving originates. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/vm/classloader.h |4 ++- jit/object-bc.c |5 +---

[PATCH 7/8] vm: fix deadlock in find_class()

2009-08-16 Thread Tomek Grabiec
find_class() can be called by on a class which is being loaded by the same thread which is loading the class. This happens when class loading is delegated to external class loaders. We should handle this by returning NULL so that external class loader will actually load the class. Signed-off-by:

[PATCH 8/8] regression: introduce jvm/ClassLoaderTest.java

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- Makefile|1 + regression/jvm/ClassLoaderTest.java | 43 +++ regression/run-suite.sh |1 + 3 files changed, 45 insertions(+), 0 deletions(-) create mode 100644

[PATCH 1/4] lib: implement hash_map_contains()

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/lib/hash-map.h |1 + lib/hash-map.c |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/lib/hash-map.h b/include/lib/hash-map.h index bb5d399..f4826b1 100644 --- a/include/lib/hash-map.h +++

[PATCH 2/4] lib: introduce hash_map_for_each_entry() iterator

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/lib/hash-map.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/lib/hash-map.h b/include/lib/hash-map.h index f4826b1..42c243f 100644 --- a/include/lib/hash-map.h +++ b/include/lib/hash-map.h @@ -27,6

[PATCH 3/4] vm: use hash map to hold loaded JNI objects

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/vm/jni.h |1 + vm/jni-interface.c |2 +- vm/jni.c | 72 ++- 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/include/vm/jni.h b/include/vm/jni.h index