From cb7dc1aeef8b5aa1a0da6164c6eb3aef2687d5f4 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 11 Feb 2011 21:13:11 -0700 Subject: [PATCH] fix various regressions due to 0.5 work --- src/classpath-openjdk.cpp | 6 +++--- src/machine.cpp | 3 ++- src/machine.h | 12 ++++++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index b06d1406f4..56782758db 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -616,11 +616,11 @@ checkFileAccess return 0; } } else { - return booleanValue + return intValue (t, t->m->processor->invoke (t, nativeInterceptOriginal (t, methodRuntimeDataNative(t, getMethodRuntimeData(t, method))), - reinterpret_cast(arguments[0]), file, mask)); + reinterpret_cast(arguments[0]), file, mask)) != 0; } } @@ -3128,7 +3128,7 @@ jvmInvokeMethod(Thread* t, uintptr_t* arguments) } object result; - if (arguments) { + if (args) { result = t->m->processor->invokeArray (t, vmMethod, instance ? *instance : 0, *args); } else { diff --git a/src/machine.cpp b/src/machine.cpp index 31dad80726..92cca91a1b 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -3523,7 +3523,8 @@ postInitClass(Thread* t, object c) object exception = t->exception; t->exception = 0; - throwNew(t, Machine::ExceptionInInitializerErrorType, 0, 0, exception); + throwNew(t, Machine::ExceptionInInitializerErrorType, + static_cast(0), 0, exception); } else { classVmFlags(t, c) &= ~(NeedInitFlag | InitFlag); } diff --git a/src/machine.h b/src/machine.h index 23e1743a49..3c152223ab 100644 --- a/src/machine.h +++ b/src/machine.h @@ -1971,6 +1971,8 @@ addThread(Thread* t, Thread* p) p->peer = p->parent->child; p->parent->child = p; + + threadPeer(t, p->javaThread) = reinterpret_cast(p); } inline void @@ -1985,6 +1987,8 @@ removeThread(Thread* t, Thread* p) t->m->stateLock->notifyAll(t->systemThread); p->parent->child = p->peer; + + threadPeer(t, p->javaThread) = 0; } inline Thread* @@ -2592,6 +2596,8 @@ throw_(Thread* t, object e) t->exception = e; + // printTrace(t, e); + popResources(t); t->checkpoint->unwind(); @@ -2600,9 +2606,11 @@ throw_(Thread* t, object e) } inline void NO_RETURN -throwNew(Thread* t, Machine::Type type) +throwNew +(Thread* t, Machine::Type type, object message = 0, object trace = 0, + object cause = 0) { - throw_(t, makeThrowable(t, type)); + throw_(t, makeThrowable(t, type, message, trace, cause)); } inline void NO_RETURN