mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Don't store argc, argv on FunctionEnvironmentRecord. (#358)
Save argc, argv on ExecutionState is enough. and if function call is end, argv member on env points wrong place. Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
864973236d
commit
3bc6cb5cca
13 changed files with 88 additions and 89 deletions
|
|
@ -176,10 +176,10 @@ Value Script::executeLocal(ExecutionState& state, Value thisValue, InterpretedCo
|
|||
}
|
||||
}
|
||||
|
||||
if (fnRecord->hasBinding(newState, arguments).m_index == SIZE_MAX && fnRecord->functionObject()->isScriptFunctionObject()) {
|
||||
if (fnRecord->hasBinding(newState, arguments).m_index == SIZE_MAX && state.callee()->isScriptFunctionObject()) {
|
||||
// FIXME check if formal parameters does not contain a rest parameter, any binding patterns, or any initializers.
|
||||
bool isMapped = !fnRecord->functionObject()->codeBlock()->hasArgumentInitializers() && !inStrict;
|
||||
fnRecord->functionObject()->asScriptFunctionObject()->generateArgumentsObject(newState, fnRecord, nullptr, isMapped);
|
||||
bool isMapped = !state.callee()->codeBlock()->hasArgumentInitializers() && !inStrict;
|
||||
state.callee()->asScriptFunctionObject()->generateArgumentsObject(newState, state.argc(), state.argv(), fnRecord, nullptr, isMapped);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue