Bug 1563489 - Part 0: Remove generator related code from BinAST. r=Yoric

Differential Revision: https://phabricator.services.mozilla.com/D36930
This commit is contained in:
Tooru Fujisawa
2019-07-11 19:19:49 +00:00
parent d1a693fd94
commit 2ea1669c11

View File

@@ -345,24 +345,6 @@ JS::Result<FunctionNode*> BinASTParserPerTokenizer<Tok>::buildFunction(
handler_.setFunctionFormalParametersAndBody(result, params);
if (funbox->needsDotGeneratorName()) {
BINJS_TRY(pc_->declareDotGeneratorName());
HandlePropertyName dotGenerator = cx_->names().dotGenerator;
BINJS_TRY(usedNames_.noteUse(cx_, dotGenerator, pc_->scriptId(),
pc_->innermostScope()->id()));
if (funbox->isGenerator()) {
BINJS_TRY_DECL(
dotGen, handler_.newName(dotGenerator,
tokenizer_->pos(tokenizer_->offset()), cx_));
ListNode* stmtList =
&body->as<LexicalScopeNode>().scopeBody()->as<ListNode>();
BINJS_TRY(handler_.prependInitialYield(stmtList, dotGen));
}
}
const bool canSkipLazyClosedOverBindings = false;
BINJS_TRY(pc_->declareFunctionArgumentsObject(usedNames_,
canSkipLazyClosedOverBindings));