implement arguments object

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2016-12-23 16:10:06 +09:00
commit 12e538992b
13 changed files with 223 additions and 11 deletions

View file

@ -51,8 +51,15 @@ CodeBlock* ScriptParser::generateCodeBlockTreeFromASTWalker(Context* ctx, String
}
}
AtomicString arguments = ctx->staticStrings().arguments;
for (size_t i = 0; i < scopeCtx->m_usingNames.size(); i++) {
AtomicString uname = scopeCtx->m_usingNames[i];
if (uname == arguments) {
if (!codeBlock->hasName(arguments)) {
codeBlock->m_usesArgumentsObject = true;
continue;
}
}
if (!codeBlock->hasName(uname)) {
CodeBlock* c = codeBlock->parentCodeBlock();
while (c) {