Implement MetaProperty(new.target) (#397)

* add some missed public api functions

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
Patrick Kim 2019-08-29 20:26:20 +09:00 committed by Hyukwoo Park
commit b33e7df9a2
24 changed files with 241 additions and 115 deletions

View file

@ -71,11 +71,11 @@ InterpretedCodeBlock* ScriptParser::generateCodeBlockTreeFromASTWalker(Context*
}
}
if (scopeCtx->m_hasSuper) {
if (scopeCtx->m_hasSuperOrNewTarget) {
InterpretedCodeBlock* c = codeBlock;
while (c) {
c->m_canAllocateEnvironmentOnStack = false;
if (c->isClassConstructor() || c->isClassMethod() || c->isClassStaticMethod()) {
if (c->isKindOfFunction() && !c->isArrowFunctionExpression()) { // ThisEnvironment
c->m_canAllocateEnvironmentOnStack = false;
break;
}
c = c->parentCodeBlock();