mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Remove c++ try-catch statement in interpreter function. (#387)
* separate ByteCodeGenerator::m_tryStatementCount into multiple items for implementing es6 generator Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
90240a18f8
commit
66bd235740
30 changed files with 1466 additions and 1376 deletions
|
|
@ -176,13 +176,15 @@ Value Script::executeLocal(ExecutionState& state, Value thisValue, InterpretedCo
|
|||
}
|
||||
}
|
||||
|
||||
if (fnRecord->hasBinding(newState, arguments).m_index == SIZE_MAX && state.callee()->isScriptFunctionObject()) {
|
||||
FunctionObject* callee = state.resolveCallee();
|
||||
if (fnRecord->hasBinding(newState, arguments).m_index == SIZE_MAX && callee->isScriptFunctionObject()) {
|
||||
// FIXME check if formal parameters does not contain a rest parameter, any binding patterns, or any initializers.
|
||||
bool isMapped = !state.callee()->codeBlock()->hasArgumentInitializers() && !inStrict;
|
||||
state.callee()->asScriptFunctionObject()->generateArgumentsObject(newState, state.argc(), state.argv(), fnRecord, nullptr, isMapped);
|
||||
bool isMapped = !callee->codeBlock()->hasArgumentInitializers() && !inStrict;
|
||||
callee->asScriptFunctionObject()->generateArgumentsObject(newState, state.argc(), state.argv(), fnRecord, nullptr, isMapped);
|
||||
}
|
||||
}
|
||||
|
||||
newState.ensureRareData()->m_codeBlock = m_topCodeBlock;
|
||||
Value resultValue = ByteCodeInterpreter::interpret(newState, m_topCodeBlock->byteCodeBlock(), 0, registerFile);
|
||||
clearStack<512>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue