mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-02 20:47:33 +09:00
parent
3b34f87a5b
commit
748c69d7fd
30 changed files with 750 additions and 81 deletions
|
|
@ -902,3 +902,21 @@ FunctionBox::trace(JSTracer* trc)
|
|||
if (enclosingScope_)
|
||||
TraceRoot(trc, &enclosingScope_, "funbox-enclosingScope");
|
||||
}
|
||||
|
||||
bool
|
||||
js::frontend::IsAnonymousFunctionDefinition(ParseNode* pn)
|
||||
{
|
||||
// ES 2017 draft
|
||||
// 12.15.2 (ArrowFunction, AsyncArrowFunction).
|
||||
// 14.1.12 (FunctionExpression).
|
||||
// 14.4.8 (GeneratorExpression).
|
||||
// 14.6.8 (AsyncFunctionExpression)
|
||||
if (pn->isKind(PNK_FUNCTION) && !pn->pn_funbox->function()->explicitName())
|
||||
return true;
|
||||
|
||||
// 14.5.8 (ClassExpression)
|
||||
if (pn->is<ClassNode>() && !pn->as<ClassNode>().names())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue