Bug 1563489 - Part 0: Remove generator related code from BinAST. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Thu, 11 Jul 2019 19:19:49 +0000
changeset 482450 0b12da4fd972de938c80cd40712ceaee9dfd81c4
parent 482449 16bc2f5a8e199244beca4c28b93c0084e333d323
child 482451 ff2f7f88eb4451607c01dc6e3a36f8f2565cac27
push id89781
push userarai_a@mac.com
push dateThu, 11 Jul 2019 20:53:31 +0000
treeherderautoland@ff2f7f88eb44 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1563489
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1563489 - Part 0: Remove generator related code from BinAST. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D36930
js/src/frontend/BinASTParserPerTokenizer.cpp
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -340,34 +340,16 @@ JS::Result<FunctionNode*> BinASTParserPe
 
   // ParseNode represents the body as concatenated after the params.
   params->appendWithoutOrderAssumption(body);
 
   BINJS_MOZ_TRY_DECL(result, makeEmptyFunctionNode(start, kind, funbox));
 
   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));
   BINJS_TRY(
       pc_->declareFunctionThis(usedNames_, canSkipLazyClosedOverBindings));
 
   // Check all our bindings after maybe adding function metavars.
   MOZ_TRY(checkFunctionClosedVars());