Signed-off-by: Vegard Nossum <vegard.nos...@gmail.com> --- 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/lang/VMSystem.java
diff --git a/Makefile b/Makefile index c1caabf..09728b8 100644 --- a/Makefile +++ b/Makefile @@ -233,7 +233,8 @@ REGRESSION_TEST_SUITE_CLASSES = \ regression/jvm/PrintTest.class RUNTIME_CLASSES = \ - runtime/classpath/gnu/classpath/VMSystemProperties.class + runtime/classpath/gnu/classpath/VMSystemProperties.class \ + runtime/classpath/java/lang/VMSystem.class lib: $(CLASSPATH_CONFIG) make -C lib/ JAVAC=$(JAVAC) GLIBJ=$(GLIBJ) diff --git a/runtime/classpath/java/lang/VMSystem.java b/runtime/classpath/java/lang/VMSystem.java new file mode 100644 index 0000000..939eea4 --- /dev/null +++ b/runtime/classpath/java/lang/VMSystem.java @@ -0,0 +1,5 @@ +package java.lang; + +public class VMSystem { + static native int identityHashCode(Object o); +} diff --git a/vm/jato.c b/vm/jato.c index 53f0f36..ff4bdda 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -92,6 +92,12 @@ static void __vm_native native_vmsystem_arraycopy(struct vm_object *src, int src NOT_IMPLEMENTED; } +static int32_t __vm_native native_vmsystem_identityhashcode(struct vm_object *obj) +{ + NOT_IMPLEMENTED; + return 0; +} + /* * This stub is needed by java.lang.VMThrowable constructor to work. It should * return java.lang.VMState instance, or null in which case no stack trace will @@ -114,10 +120,13 @@ static void jit_init_natives(void) &native_vmruntime_exit); vm_register_native("jato/internal/VM", "println", &native_vmruntime_println); + vm_register_native("java/lang/VMRuntime", "exit", &native_vmruntime_exit); vm_register_native("java/lang/VMSystem", "arraycopy", &native_vmsystem_arraycopy); + vm_register_native("java/lang/VMSystem", "identityHashCode", + &native_vmsystem_identityhashcode); vm_register_native("java/lang/VMThrowable", "fillInStackTrace", &native_vmthrowable_fill_in_stack_trace); } -- 1.6.0.4 ------------------------------------------------------------------------------ _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel