mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Reimplement static field initializer
* wrap initializer expr into virtual arrow function like instance field * users can access super property in eval Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
28fad835a2
commit
109d199302
10 changed files with 48 additions and 131 deletions
|
|
@ -89,7 +89,7 @@ InterpretedCodeBlock* ScriptParser::generateCodeBlockTreeFromASTWalker(Context*
|
|||
if (scopeCtx->m_hasSuperOrNewTarget) {
|
||||
InterpretedCodeBlock* c = codeBlock;
|
||||
while (c) {
|
||||
if (c->isKindOfFunction() && !c->isArrowFunctionExpression()) { // ThisEnvironment
|
||||
if (c->isKindOfFunction() && (!c->isArrowFunctionExpression() || c->isOneExpressionOnlyVirtualArrowFunctionExpression())) { // ThisEnvironment
|
||||
c->m_canAllocateEnvironmentOnStack = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue