[penberg/jato] a13869: Makefile: Build with -fstack-protector-all and -D_...

2009-08-16 Thread noreply
Branch: refs/heads/master Home: http://github.com/penberg/jato Commit: a13869ded4b3b01c764a0c595d0e8c1e7cde7e4b http://github.com/penberg/jato/commit/a13869ded4b3b01c764a0c595d0e8c1e7cde7e4b Author: Pekka Enberg Date: 2009-08-16 (Sun, 16 Aug 2009) Changed paths: M Makefile Log Messag

[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 --- include/jit/basic-block.h |1 + include/vm/stack.h|5 + jit/basic-block.c | 10 ++ jit/exception-bc.c|6 +-

[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 Date: 2009-08-16 (Sun, 16 Aug 2009) Changed paths: M include/jit/basic-b

[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 Date: 2009-08-16 (Sun, 16 Aug 2009) Changed paths: M Makefile Log Messag

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 w

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

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- 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 +32,21 @@ unsigned long

[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 --- vm/jato.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/v

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

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- 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 @@ static struct vm_object

[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 --- include/vm/classloader.h |4 ++- jit/object-bc.c |5 +--- vm/class.c

[PATCH 5/8] vm: use ClassLoader.getSystemClassLoader() to load application classes.

2009-08-16 Thread Tomek Grabiec
Application classes should not be loaded by bootstrap classloader, so that getClassLoader() returns not null for them. Signed-off-by: Tomek Grabiec --- include/vm/preload.h |2 ++ vm/jato.c| 25 +++-- vm/preload.c |7 +++ 3 files changed, 32

[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: T

[PATCH 6/8] vm: fix VMClassLoader.loadClass() native.

2009-08-16 Thread Tomek Grabiec
We should not initialize class on loading. Signed-off-by: Tomek Grabiec --- vm/jato.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index e9277b8..b485cff 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -800,7 +800,9 @@ native_vmclassloader_loadclass

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

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

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

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- 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 +++ b/include/lib/hash-

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

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- 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 +27,10 @@ int hash_

[PATCH 4/4] vm: make VMRuntime.nativeLoad() work with classloader != null.

2009-08-16 Thread Tomek Grabiec
We record the class loader reference in jni_object structure. It may be used in the future to load classes requested from JNI code originating from particular object. This fixes the following error for HelloWorldSwing: vm/jato.c:389: warning: native_vmruntime_native_load not implemented vm/jato.c:

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

2009-08-16 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- 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 866255d..4dd8b1c 1

[penberg/jato] 14e125: vm: declare vm_call_method_this_*() for calling vi...

2009-08-16 Thread noreply
Branch: refs/heads/master Home: http://github.com/penberg/jato Commit: 14e12539d8da7ad47195a3b84d08aa806f063862 http://github.com/penberg/jato/commit/14e12539d8da7ad47195a3b84d08aa806f063862 Author: Tomek Grabiec Date: 2009-08-16 (Sun, 16 Aug 2009) Changed paths: M include/vm/call.h