Create rest parameter through bytecode interpretation (#348)

* CreateRestElement bytecode is newly added for generating a rest parameter
* RestElementNode is added to handle patterns in rest parameter later
* rest parameter is created at the first part of the function body execution

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
Hyukwoo Park 2019-08-06 13:38:25 +09:00 committed by Boram Bae
commit 49266b6c9f
15 changed files with 160 additions and 47 deletions

View file

@ -123,7 +123,7 @@ Value NativeFunctionObject::processNativeFunctionCall(ExecutionState& state, con
CallNativeFunctionData* code = m_codeBlock->nativeFunctionData();
// TODO don't make LexicalEnvironment if possiable
FunctionEnvironmentRecordSimple record(this);
FunctionEnvironmentRecordSimple record(this, 0, nullptr);
LexicalEnvironment env(&record, nullptr);
size_t len = m_codeBlock->parameterCount();