mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- reenabled the part of OP_THROW that throws a VMAbortException. This part is still needed for a runtime variable access check.
This commit is contained in:
parent
4c1e03ebff
commit
7a6e70e777
3 changed files with 6 additions and 2 deletions
|
@ -6534,7 +6534,7 @@ ExpEmit FxSelf::Emit(VMFunctionBuilder *build)
|
|||
{
|
||||
build->Emit(OP_EQA_R, 1, 0, 1);
|
||||
build->Emit(OP_JMP, 1);
|
||||
//build->Emit(OP_THROW, 2, X_BAD_SELF);
|
||||
build->Emit(OP_THROW, 2, X_BAD_SELF);
|
||||
}
|
||||
// self is always the first pointer passed to the function
|
||||
return ExpEmit(0, REGT_POINTER, false, true);
|
||||
|
|
|
@ -821,7 +821,9 @@ static int Exec(VMFrameStack *stack, const VMOP *pc, VMReturn *ret, int numret)
|
|||
assert(a <= try_depth);
|
||||
try_depth -= a;
|
||||
NEXTOP;
|
||||
#endif
|
||||
OP(THROW):
|
||||
#if 0
|
||||
if (a == 0)
|
||||
{
|
||||
ASSERTA(B);
|
||||
|
@ -834,10 +836,12 @@ static int Exec(VMFrameStack *stack, const VMOP *pc, VMReturn *ret, int numret)
|
|||
ThrowVMException((VMException *)konsta[B].o);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ThrowAbortException(EVMAbortException(BC), nullptr);
|
||||
}
|
||||
NEXTOP;
|
||||
#if 0
|
||||
OP(CATCH):
|
||||
// This instruction is handled by our own catch handler and should
|
||||
// not be executed by the normal VM code.
|
||||
|
|
|
@ -116,7 +116,7 @@ xx(NEW, new, RPRPI8, NOP, 0, 0),
|
|||
xx(NEW_K, new, RPKP, NOP, 0, 0),
|
||||
//xx(TRY, try, I24, NOP, 0, 0), // When an exception is thrown, start searching for a handler at pc + ABC
|
||||
//xx(UNTRY, untry, I8, NOP, 0, 0), // Pop A entries off the exception stack
|
||||
//xx(THROW, throw, THROW, NOP, 0, 0), // A == 0: Throw exception object pB
|
||||
xx(THROW, throw, THROW, NOP, 0, 0), // A == 0: Throw exception object pB
|
||||
// A == 1: Throw exception object pkB
|
||||
// A >= 2: Throw VM exception of type BC
|
||||
//xx(CATCH, catch, CATCH, NOP, 0, 0), // A == 0: continue search on next try
|
||||
|
|
Loading…
Reference in a new issue