mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
exception handling and parseMethodTable() bugfixes
This commit is contained in:
parent
97aaa419b4
commit
6b0792c881
2
makefile
2
makefile
@ -16,7 +16,7 @@ src = src
|
||||
classpath = classpath
|
||||
test = test
|
||||
|
||||
input = $(cls)/Hello.class
|
||||
input = $(cls)/Threads.class
|
||||
|
||||
cxx = g++
|
||||
cc = gcc
|
||||
|
@ -967,7 +967,7 @@ parseMethodTable(Thread* t, Stream& s, object class_, object pool)
|
||||
if (p) {
|
||||
set(t, tripleSecond(t, p), method);
|
||||
} else {
|
||||
hashMapInsert(t, virtualMap, method, 0, methodHash);
|
||||
hashMapInsert(t, nativeMap, method, 0, methodHash);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace vm {
|
||||
|
||||
const bool Verbose = false;
|
||||
const bool DebugRun = true;
|
||||
const bool DebugRun = false;
|
||||
const bool DebugStack = false;
|
||||
const bool DebugMonitors = false;
|
||||
|
||||
|
12
src/run.cpp
12
src/run.cpp
@ -2131,11 +2131,7 @@ run(Thread* t)
|
||||
}
|
||||
|
||||
pokeInt(t, t->frame + FrameIpOffset, t->ip);
|
||||
for (; frame >= 0; frame = frameNext(t, frame)) {
|
||||
if (frame < base) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (; frame >= base; popFrame(t)) {
|
||||
code = methodCode(t, frameMethod(t, frame));
|
||||
object eht = codeExceptionHandlerTable(t, code);
|
||||
if (eht) {
|
||||
@ -2152,9 +2148,15 @@ run(Thread* t)
|
||||
}
|
||||
|
||||
if (catchType) {
|
||||
object e = exception;
|
||||
exception = 0;
|
||||
PROTECT(t, e);
|
||||
|
||||
PROTECT(t, eht);
|
||||
catchType = resolveClass(t, catchType);
|
||||
eh = exceptionHandlerTableBody(t, eht, i);
|
||||
|
||||
exception = e;
|
||||
}
|
||||
|
||||
if (catchType == 0 or instanceOf(t, catchType, exception)) {
|
||||
|
@ -212,7 +212,7 @@ class MySystem: public System {
|
||||
}
|
||||
|
||||
virtual void dispose() {
|
||||
//assert(s, context == 0);
|
||||
assert(s, context == 0);
|
||||
pthread_mutex_destroy(&mutex);
|
||||
pthread_cond_destroy(&condition);
|
||||
s->free(this);
|
||||
|
Loading…
Reference in New Issue
Block a user