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