mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
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:
parent
b656248ce4
commit
b33e7df9a2
24 changed files with 241 additions and 115 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue