Fixed finally invocation.
This commit is contained in:
Родитель
0bab9cc714
Коммит
d30694af8b
|
@ -471,7 +471,6 @@ namespace MetaData {
|
|||
case eBracketDelete:
|
||||
return -1; // pop base and index, push boolean result
|
||||
|
||||
case eStop:
|
||||
case eReturnVoid:
|
||||
case eBranch:
|
||||
return 0;
|
||||
|
|
|
@ -111,7 +111,6 @@ enum JS2Op {
|
|||
eBracketWriteRef,
|
||||
eBracketDelete,
|
||||
|
||||
eStop,
|
||||
eReturn,
|
||||
eReturnVoid,
|
||||
ePushFrame, // <frame index:u16>
|
||||
|
@ -280,7 +279,7 @@ public:
|
|||
};
|
||||
|
||||
std::stack<HandlerData *> mTryStack;
|
||||
std::stack<uint8 *> mSubStack;
|
||||
std::stack<uint8 *> finallyStack;
|
||||
|
||||
void pushHandler(uint8 *pc);
|
||||
void popHandler();
|
||||
|
|
|
@ -143,18 +143,18 @@
|
|||
|
||||
case eCallFinally:
|
||||
{
|
||||
int32 finallyOffset = BytecodeContainer::getOffset(pc);
|
||||
uint8 *tgt = pc + finallyOffset;
|
||||
pc += sizeof(int32);
|
||||
finallyStack.push(pc);
|
||||
pc = tgt;
|
||||
}
|
||||
break;
|
||||
|
||||
case eReturnFinally:
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
||||
case eStop:
|
||||
{
|
||||
|
||||
return retval;
|
||||
pc = finallyStack.top();
|
||||
finallyStack.pop();
|
||||
}
|
||||
break;
|
||||
|
Загрузка…
Ссылка в новой задаче