exception handling and parseMethodTable() bugfixes

This commit is contained in:
Joel Dice 2007-07-24 19:56:05 -06:00
parent 97aaa419b4
commit 6b0792c881
5 changed files with 11 additions and 9 deletions

View File

@ -16,7 +16,7 @@ src = src
classpath = classpath
test = test
input = $(cls)/Hello.class
input = $(cls)/Threads.class
cxx = g++
cc = gcc

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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)) {

View File

@ -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);