mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 08:07:30 +09:00
Bug 1343481 - Part 7: Add BytecodeEmitter::emitDotGenerator and make yield/await nodes unary.
Tag #1287
This commit is contained in:
parent
2bbebc6ebc
commit
c1bdfa62fc
11 changed files with 124 additions and 112 deletions
|
|
@ -501,24 +501,25 @@ class NameResolver
|
|||
return false;
|
||||
break;
|
||||
|
||||
case PNK_INITIALYIELD:
|
||||
MOZ_ASSERT(cur->pn_kid->isKind(PNK_ASSIGN) &&
|
||||
cur->pn_kid->pn_left->isKind(PNK_NAME) &&
|
||||
cur->pn_kid->pn_right->isKind(PNK_GENERATOR));
|
||||
break;
|
||||
|
||||
case PNK_YIELD_STAR:
|
||||
MOZ_ASSERT(cur->isArity(PN_BINARY));
|
||||
MOZ_ASSERT(cur->pn_right->isKind(PNK_NAME));
|
||||
if (!resolve(cur->pn_left, prefix))
|
||||
MOZ_ASSERT(cur->isArity(PN_UNARY));
|
||||
if (!resolve(cur->pn_kid, prefix))
|
||||
return false;
|
||||
break;
|
||||
|
||||
case PNK_YIELD:
|
||||
case PNK_AWAIT:
|
||||
MOZ_ASSERT(cur->isArity(PN_BINARY));
|
||||
if (cur->pn_left) {
|
||||
if (!resolve(cur->pn_left, prefix))
|
||||
MOZ_ASSERT(cur->isArity(PN_UNARY));
|
||||
if (cur->pn_kid) {
|
||||
if (!resolve(cur->pn_kid, prefix))
|
||||
return false;
|
||||
}
|
||||
MOZ_ASSERT(cur->pn_right->isKind(PNK_NAME) ||
|
||||
(cur->pn_right->isKind(PNK_ASSIGN) &&
|
||||
cur->pn_right->pn_left->isKind(PNK_NAME) &&
|
||||
cur->pn_right->pn_right->isKind(PNK_GENERATOR)));
|
||||
break;
|
||||
|
||||
case PNK_RETURN:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue