mirror of
https://github.com/corda/corda.git
synced 2024-12-28 16:58:55 +00:00
exception handler selection bugfixes
This commit is contained in:
parent
d2ef4dabc4
commit
56467e61d7
31
src/vm.cpp
31
src/vm.cpp
@ -4584,19 +4584,26 @@ run(Thread* t)
|
|||||||
if (eht) {
|
if (eht) {
|
||||||
for (unsigned i = 0; i < exceptionHandlerTableLength(t, eht); ++i) {
|
for (unsigned i = 0; i < exceptionHandlerTableLength(t, eht); ++i) {
|
||||||
ExceptionHandler* eh = exceptionHandlerTableBody(t, eht, i);
|
ExceptionHandler* eh = exceptionHandlerTableBody(t, eht, i);
|
||||||
object catchType =
|
if (frameIp(t, frame) >= exceptionHandlerStart(eh)
|
||||||
arrayBody(t, codePool(t, code), exceptionHandlerCatchType(eh) - 1);
|
and frameIp(t, frame) >= exceptionHandlerEnd(eh))
|
||||||
|
|
||||||
if (catchType == 0 or
|
|
||||||
(objectClass(t, catchType)
|
|
||||||
== arrayBody(t, t->vm->types, Machine::ClassType) and
|
|
||||||
instanceOf(t, catchType, exception)))
|
|
||||||
{
|
{
|
||||||
sp = frameStackBase(t, frame);
|
object catchType = 0;
|
||||||
ip = exceptionHandlerIp(eh);
|
if (exceptionHandlerCatchType(eh)) {
|
||||||
pushObject(t, exception);
|
catchType = arrayBody
|
||||||
exception = 0;
|
(t, codePool(t, code), exceptionHandlerCatchType(eh) - 1);
|
||||||
goto loop;
|
}
|
||||||
|
|
||||||
|
if (catchType == 0 or
|
||||||
|
(objectClass(t, catchType)
|
||||||
|
== arrayBody(t, t->vm->types, Machine::ClassType) and
|
||||||
|
instanceOf(t, catchType, exception)))
|
||||||
|
{
|
||||||
|
sp = frameStackBase(t, frame);
|
||||||
|
ip = exceptionHandlerIp(eh);
|
||||||
|
pushObject(t, exception);
|
||||||
|
exception = 0;
|
||||||
|
goto loop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user