Bug 1528837 - Part 8: Rename ParserBase::keepAtoms field to keepAtoms_. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Sun, 24 Feb 2019 03:29:05 +0000
changeset 518655 3dbd995ed01a0a8fa36d147cdcf8604c20dd8213
parent 518654 c46a2d2f9b6119cbddb070e0806acd422a6ca7ec
child 518656 d5cfad78de33e3b5858260507d5aeb06c446a00e
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1528837
milestone67.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 1528837 - Part 8: Rename ParserBase::keepAtoms field to keepAtoms_. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D20220
js/src/frontend/Parser.cpp
js/src/frontend/Parser.h
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -143,17 +143,17 @@ ParserBase::ParserBase(JSContext* cx, Li
       cx_(cx),
       alloc_(alloc),
       anyChars(cx, options, thisForCtor()),
       traceListHead_(nullptr),
       pc_(nullptr),
       usedNames_(usedNames),
       ss(nullptr),
       sourceObject_(cx, sourceObject),
-      keepAtoms(cx),
+      keepAtoms_(cx),
       foldConstants(foldConstants),
 #ifdef DEBUG
       checkOptionsCalled(false),
 #endif
       isUnexpectedEOF_(false),
       awaitHandling_(AwaitIsName),
       inParametersOfAsyncFunction_(false),
       parseGoal_(uint8_t(parseGoal)) {
@@ -2700,17 +2700,17 @@ GeneralParser<ParseHandler, Unit>::funct
 
   // Speculatively parse using the directives of the parent parsing context.
   // If a directive is encountered (e.g., "use strict") that changes how the
   // function should have been parsed, we backup and reparse with the new set
   // of directives.
   Directives directives(pc_);
   Directives newDirectives = directives;
 
-  Position start(keepAtoms, tokenStream);
+  Position start(keepAtoms_, tokenStream);
 
   // Parse the inner function. The following is a loop as we may attempt to
   // reparse a function due to failed syntax parsing and encountering new
   // "use foo" directives.
   while (true) {
     if (trySyntaxParseInnerFunction(
             &funNode, fun, toStringStart, inHandling, yieldHandling, kind,
             generatorKind, asyncKind, tryAnnexB, directives, &newDirectives)) {
@@ -2759,17 +2759,17 @@ bool Parser<FullParseHandler, Unit>::try
     SyntaxParser* syntaxParser = getSyntaxParser();
     if (!syntaxParser) {
       break;
     }
 
     UsedNameTracker::RewindToken token = usedNames_.getRewindToken();
 
     // Move the syntax parser to the current position in the stream.
-    Position currentPosition(keepAtoms, tokenStream);
+    Position currentPosition(keepAtoms_, tokenStream);
     if (!syntaxParser->tokenStream.seek(currentPosition, anyChars)) {
       return false;
     }
 
     // Make a FunctionBox before we enter the syntax parser, because |pn|
     // still expects a FunctionBox to be attached to it during BCE, and
     // the syntax parser cannot attach one to it.
     FunctionBox* funbox =
@@ -2794,17 +2794,17 @@ bool Parser<FullParseHandler, Unit>::try
         MOZ_ASSERT_IF(!syntaxParser->cx_->helperThread(),
                       !syntaxParser->cx_->isExceptionPending());
         break;
       }
       return false;
     }
 
     // Advance this parser over tokens processed by the syntax parser.
-    Position currentSyntaxPosition(keepAtoms, syntaxParser->tokenStream);
+    Position currentSyntaxPosition(keepAtoms_, syntaxParser->tokenStream);
     if (!tokenStream.seek(currentSyntaxPosition, syntaxParser->anyChars)) {
       return false;
     }
 
     // Update the end position of the parse node.
     (*funNode)->pn_pos.end = anyChars.currentToken().pos.end;
 
     // Append possible Annex B function box only upon successfully parsing.
@@ -8230,17 +8230,17 @@ typename ParseHandler::Node GeneralParse
       maybeAsyncArrow = true;
     }
   }
 
   anyChars.ungetToken();
 
   // Save the tokenizer state in case we find an arrow function and have to
   // rewind.
-  Position start(keepAtoms, tokenStream);
+  Position start(keepAtoms_, tokenStream);
 
   PossibleError possibleErrorInner(*this);
   Node lhs;
   TokenKind tokenAfterLHS;
   bool isArrow;
   if (maybeAsyncArrow) {
     tokenStream.consumeKnownToken(TokenKind::Async, TokenStream::Operand);
 
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -263,17 +263,17 @@ class MOZ_STACK_CLASS ParserBase : priva
   // For tracking used names in this parsing session.
   UsedNameTracker& usedNames_;
 
   ScriptSource* ss;
 
   RootedScriptSourceObject sourceObject_;
 
   /* Root atoms and objects allocated for the parsed tree. */
-  AutoKeepAtoms keepAtoms;
+  AutoKeepAtoms keepAtoms_;
 
   // Perform constant-folding; must be true when interfacing with the emitter.
   const bool foldConstants : 1;
 
  protected:
 #if DEBUG
   /* Our fallible 'checkOptions' member function has been called. */
   bool checkOptionsCalled : 1;
@@ -726,17 +726,17 @@ class MOZ_STACK_CLASS GeneralParser : pu
 #endif
   using Base::finishFunctionScopes;
   using Base::finishLexicalScope;
   using Base::foldConstants;
   using Base::getFilename;
   using Base::hasUsedFunctionSpecialName;
   using Base::hasValidSimpleStrictParameterNames;
   using Base::isUnexpectedEOF_;
-  using Base::keepAtoms;
+  using Base::keepAtoms_;
   using Base::nameIsArgumentsOrEval;
   using Base::newFunction;
   using Base::newFunctionBox;
   using Base::newName;
   using Base::null;
   using Base::options;
   using Base::pos;
   using Base::propagateFreeNamesAndMarkClosedOverBindings;
@@ -1490,17 +1490,17 @@ class MOZ_STACK_CLASS Parser<SyntaxParse
   using Base::alloc_;
 #if DEBUG
   using Base::checkOptionsCalled;
 #endif
   using Base::finishFunctionScopes;
   using Base::functionFormalParametersAndBody;
   using Base::handler;
   using Base::innerFunction;
-  using Base::keepAtoms;
+  using Base::keepAtoms_;
   using Base::matchOrInsertSemicolon;
   using Base::mustMatchToken;
   using Base::newFunctionBox;
   using Base::newLexicalScopeData;
   using Base::newModuleScopeData;
   using Base::newName;
   using Base::noteDeclaredName;
   using Base::null;
@@ -1641,17 +1641,17 @@ class MOZ_STACK_CLASS Parser<FullParseHa
 #if DEBUG
   using Base::checkOptionsCalled;
 #endif
   using Base::cx_;
   using Base::finishFunctionScopes;
   using Base::finishLexicalScope;
   using Base::innerFunction;
   using Base::innerFunctionForFunctionBox;
-  using Base::keepAtoms;
+  using Base::keepAtoms_;
   using Base::matchOrInsertSemicolon;
   using Base::mustMatchToken;
   using Base::newEvalScopeData;
   using Base::newFunctionScopeData;
   using Base::newGlobalScopeData;
   using Base::newLexicalScopeData;
   using Base::newModuleScopeData;
   using Base::newName;