LexicalEnvironment should be allocated in heap with deleteing ID expression

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-04-05 15:57:27 +09:00
commit 98850e4d34
4 changed files with 35 additions and 1 deletions

View file

@ -68,6 +68,15 @@ CodeBlock* ScriptParser::generateCodeBlockTreeFromASTWalker(Context* ctx, String
#endif
if (parentCodeBlock) {
if (scopeCtx->m_hasDeleteId) {
CodeBlock* c = codeBlock;
while (c) {
c->m_canAllocateEnvironmentOnStack = false;
c = c->parentCodeBlock();
}
}
if (codeBlock->hasEvalWithCatchYield() || codeBlock->isFunctionDeclarationWithSpecialBinding()) {
CodeBlock* c = codeBlock;
while (c) {