Bug 1528837 - Part 10: Rename ParserBase::checkOptionsCalled field to checkOptionsCalled_. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Sun, 24 Feb 2019 03:30:36 +0000
changeset 518657 7c2a4feaec2c
parent 518656 d5cfad78de33
child 518658 e6f7bf4fc43d
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 10: Rename ParserBase::checkOptionsCalled field to checkOptionsCalled_. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D20222
js/src/frontend/Parser.cpp
js/src/frontend/Parser.h
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -146,36 +146,36 @@ ParserBase::ParserBase(JSContext* cx, Li
       traceListHead_(nullptr),
       pc_(nullptr),
       usedNames_(usedNames),
       ss(nullptr),
       sourceObject_(cx, sourceObject),
       keepAtoms_(cx),
       foldConstants_(foldConstants),
 #ifdef DEBUG
-      checkOptionsCalled(false),
+      checkOptionsCalled_(false),
 #endif
       isUnexpectedEOF_(false),
       awaitHandling_(AwaitIsName),
       inParametersOfAsyncFunction_(false),
       parseGoal_(uint8_t(parseGoal)) {
   cx->frontendCollectionPool().addActiveCompilation();
   tempPoolMark_ = alloc_.mark();
 }
 
 bool ParserBase::checkOptions() {
 #ifdef DEBUG
-  checkOptionsCalled = true;
+  checkOptionsCalled_ = true;
 #endif
 
   return anyChars.checkOptions();
 }
 
 ParserBase::~ParserBase() {
-  MOZ_ASSERT(checkOptionsCalled);
+  MOZ_ASSERT(checkOptionsCalled_);
 
   alloc_.release(tempPoolMark_);
 
   /*
    * The parser can allocate enormous amounts of memory for large functions.
    * Eagerly free the memory now (which otherwise won't be freed until the
    * next GC) to avoid unnecessary OOMs.
    */
@@ -358,17 +358,17 @@ bool ParserBase::setSourceMapInfo() {
   return true;
 }
 
 /*
  * Parse a top-level JS script.
  */
 template <class ParseHandler, typename Unit>
 typename ParseHandler::ListNodeType GeneralParser<ParseHandler, Unit>::parse() {
-  MOZ_ASSERT(checkOptionsCalled);
+  MOZ_ASSERT(checkOptionsCalled_);
 
   Directives directives(options().strictOption);
   GlobalSharedContext globalsc(cx_, ScopeKind::Global, directives,
                                options().extraWarningsOption);
   SourceParseContext globalpc(this, &globalsc, /* newDirectives = */ nullptr);
   if (!globalpc.init()) {
     return null();
   }
@@ -1455,17 +1455,17 @@ ListNode* Parser<FullParseHandler, Unit>
   globalsc->bindings = *bindings;
 
   return body;
 }
 
 template <typename Unit>
 ModuleNode* Parser<FullParseHandler, Unit>::moduleBody(
     ModuleSharedContext* modulesc) {
-  MOZ_ASSERT(checkOptionsCalled);
+  MOZ_ASSERT(checkOptionsCalled_);
 
   SourceParseContext modulepc(this, modulesc, nullptr);
   if (!modulepc.init()) {
     return null();
   }
 
   ParseContext::VarScope varScope(this);
   if (!varScope.init(pc_)) {
@@ -1773,17 +1773,17 @@ static AwaitHandling GetAwaitHandling(Fu
 }
 
 template <typename Unit>
 FunctionNode* Parser<FullParseHandler, Unit>::standaloneFunction(
     HandleFunction fun, HandleScope enclosingScope,
     const Maybe<uint32_t>& parameterListEnd, GeneratorKind generatorKind,
     FunctionAsyncKind asyncKind, Directives inheritedDirectives,
     Directives* newDirectives) {
-  MOZ_ASSERT(checkOptionsCalled);
+  MOZ_ASSERT(checkOptionsCalled_);
 
   // Skip prelude.
   TokenKind tt;
   if (!tokenStream.getToken(&tt, TokenStream::Operand)) {
     return null();
   }
   if (asyncKind == FunctionAsyncKind::AsyncFunction) {
     MOZ_ASSERT(tt == TokenKind::Async);
@@ -2945,17 +2945,17 @@ bool GeneralParser<ParseHandler, Unit>::
   handler.addToCallSiteObject(callSiteObj, rawNode, cookedNode);
   return true;
 }
 
 template <typename Unit>
 FunctionNode* Parser<FullParseHandler, Unit>::standaloneLazyFunction(
     HandleFunction fun, uint32_t toStringStart, bool strict,
     GeneratorKind generatorKind, FunctionAsyncKind asyncKind) {
-  MOZ_ASSERT(checkOptionsCalled);
+  MOZ_ASSERT(checkOptionsCalled_);
 
   FunctionSyntaxKind syntaxKind = FunctionSyntaxKind::Statement;
   if (fun->isClassConstructor()) {
     syntaxKind = FunctionSyntaxKind::ClassConstructor;
   } else if (fun->isMethod()) {
     syntaxKind = FunctionSyntaxKind::Method;
   } else if (fun->isGetter()) {
     syntaxKind = FunctionSyntaxKind::Getter;
@@ -7448,17 +7448,17 @@ GeneralParser<ParseHandler, Unit>::varia
     return null();
   }
   return vars;
 }
 
 template <class ParseHandler, typename Unit>
 typename ParseHandler::Node GeneralParser<ParseHandler, Unit>::statement(
     YieldHandling yieldHandling) {
-  MOZ_ASSERT(checkOptionsCalled);
+  MOZ_ASSERT(checkOptionsCalled_);
 
   if (!CheckRecursionLimit(cx_)) {
     return null();
   }
 
   TokenKind tt;
   if (!tokenStream.getToken(&tt, TokenStream::Operand)) {
     return null();
@@ -7681,17 +7681,17 @@ typename ParseHandler::Node GeneralParse
       // NOTE: default case handled in the ExpressionStatement section.
   }
 }
 
 template <class ParseHandler, typename Unit>
 typename ParseHandler::Node
 GeneralParser<ParseHandler, Unit>::statementListItem(
     YieldHandling yieldHandling, bool canHaveDirectives /* = false */) {
-  MOZ_ASSERT(checkOptionsCalled);
+  MOZ_ASSERT(checkOptionsCalled_);
 
   if (!CheckRecursionLimit(cx_)) {
     return null();
   }
 
   TokenKind tt;
   if (!tokenStream.getToken(&tt, TokenStream::Operand)) {
     return null();
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -271,17 +271,17 @@ class MOZ_STACK_CLASS ParserBase : priva
   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;
+  bool checkOptionsCalled_ : 1;
 #endif
 
   /* Unexpected end of input, i.e. Eof not at top-level. */
   bool isUnexpectedEOF_ : 1;
 
   /* AwaitHandling */ uint8_t awaitHandling_ : 2;
 
   bool inParametersOfAsyncFunction_ : 1;
@@ -717,17 +717,17 @@ class MOZ_STACK_CLASS GeneralParser : pu
   using Base::PredictInvoked;
   using Base::PredictUninvoked;
 
   using Base::alloc_;
   using Base::awaitIsKeyword;
   using Base::inParametersOfAsyncFunction;
   using Base::parseGoal;
 #if DEBUG
-  using Base::checkOptionsCalled;
+  using Base::checkOptionsCalled_;
 #endif
   using Base::finishFunctionScopes;
   using Base::finishLexicalScope;
   using Base::foldConstants_;
   using Base::getFilename;
   using Base::hasUsedFunctionSpecialName;
   using Base::hasValidSimpleStrictParameterNames;
   using Base::isUnexpectedEOF_;
@@ -1484,17 +1484,17 @@ class MOZ_STACK_CLASS Parser<SyntaxParse
   using Base::warningNoOffset;
   using Base::warningWithNotes;
   using Base::warningWithNotesAt;
   using Base::warningWithNotesNoOffset;
 
  private:
   using Base::alloc_;
 #if DEBUG
-  using Base::checkOptionsCalled;
+  using Base::checkOptionsCalled_;
 #endif
   using Base::finishFunctionScopes;
   using Base::functionFormalParametersAndBody;
   using Base::handler;
   using Base::innerFunction;
   using Base::keepAtoms_;
   using Base::matchOrInsertSemicolon;
   using Base::mustMatchToken;
@@ -1634,17 +1634,17 @@ class MOZ_STACK_CLASS Parser<FullParseHa
   using Base::warningWithNotes;
   using Base::warningWithNotesAt;
   using Base::warningWithNotesNoOffset;
 
  private:
   using Base::alloc_;
   using Base::checkLabelOrIdentifierReference;
 #if DEBUG
-  using Base::checkOptionsCalled;
+  using Base::checkOptionsCalled_;
 #endif
   using Base::cx_;
   using Base::finishFunctionScopes;
   using Base::finishLexicalScope;
   using Base::innerFunction;
   using Base::innerFunctionForFunctionBox;
   using Base::keepAtoms_;
   using Base::matchOrInsertSemicolon;