Bug 1528837 - Part 4: Rename ParserBase::traceListHead field to traceListHead_. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Sun, 24 Feb 2019 03:26:35 +0000
changeset 518651 3bcda710f6bd
parent 518650 404e9820bc40
child 518652 1703de7ce9a0
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 4: Rename ParserBase::traceListHead field to traceListHead_. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D20215
js/src/frontend/Parser.cpp
js/src/frontend/Parser.h
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -138,17 +138,17 @@ bool GeneralParser<ParseHandler, Unit>::
 ParserBase::ParserBase(JSContext* cx, LifoAlloc& alloc,
                        const ReadOnlyCompileOptions& options,
                        bool foldConstants, UsedNameTracker& usedNames,
                        ScriptSourceObject* sourceObject, ParseGoal parseGoal)
     : AutoGCRooter(cx, AutoGCRooter::Tag::Parser),
       cx_(cx),
       alloc_(alloc),
       anyChars(cx, options, thisForCtor()),
-      traceListHead(nullptr),
+      traceListHead_(nullptr),
       pc(nullptr),
       usedNames(usedNames),
       ss(nullptr),
       sourceObject(cx, sourceObject),
       keepAtoms(cx),
       foldConstants(foldConstants),
 #ifdef DEBUG
       checkOptionsCalled(false),
@@ -255,23 +255,23 @@ BoxT* ParserBase::newTraceListNode(ArgT*
   /*
    * We use JSContext.tempLifoAlloc to allocate parsed objects and place them
    * on a list in this Parser to ensure GC safety. Thus the tempLifoAlloc
    * arenas containing the entries must be alive until we are done with
    * scanning, parsing and code generation for the whole script or top-level
    * function.
    */
 
-  BoxT* box = alloc_.template new_<BoxT>(arg, traceListHead);
+  BoxT* box = alloc_.template new_<BoxT>(arg, traceListHead_);
   if (!box) {
     ReportOutOfMemory(cx_);
     return nullptr;
   }
 
-  traceListHead = box;
+  traceListHead_ = box;
 
   return box;
 }
 
 ObjectBox* ParserBase::newObjectBox(JSObject* obj) {
   return newTraceListNode<ObjectBox, JSObject>(obj);
 }
 
@@ -289,33 +289,33 @@ FunctionBox* PerHandlerParser<ParseHandl
   /*
    * We use JSContext.tempLifoAlloc to allocate parsed objects and place them
    * on a list in this Parser to ensure GC safety. Thus the tempLifoAlloc
    * arenas containing the entries must be alive until we are done with
    * scanning, parsing and code generation for the whole script or top-level
    * function.
    */
   FunctionBox* funbox = alloc_.new_<FunctionBox>(
-      cx_, traceListHead, fun, toStringStart, inheritedDirectives,
+      cx_, traceListHead_, fun, toStringStart, inheritedDirectives,
       options().extraWarningsOption, generatorKind, asyncKind);
   if (!funbox) {
     ReportOutOfMemory(cx_);
     return nullptr;
   }
 
-  traceListHead = funbox;
+  traceListHead_ = funbox;
   if (funNode) {
     handler.setFunctionBox(funNode, funbox);
   }
 
   return funbox;
 }
 
 void ParserBase::trace(JSTracer* trc) {
-  TraceListNode::TraceList(trc, traceListHead);
+  TraceListNode::TraceList(trc, traceListHead_);
 }
 
 void TraceParser(JSTracer* trc, AutoGCRooter* parser) {
   static_cast<ParserBase*>(parser)->trace(trc);
 }
 
 bool ParserBase::setSourceMapInfo() {
   // Not all clients initialize ss. Can't update info to an object that isn't
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -250,17 +250,17 @@ class MOZ_STACK_CLASS ParserBase : priva
   JSContext* const cx_;
 
   LifoAlloc& alloc_;
 
   TokenStreamAnyChars anyChars;
   LifoAlloc::Mark tempPoolMark_;
 
   /* list of parsed objects and BigInts for GC tracing */
-  TraceListNode* traceListHead;
+  TraceListNode* traceListHead_;
 
   /* innermost parse context (stack-allocated) */
   ParseContext* pc;
 
   // For tracking used names in this parsing session.
   UsedNameTracker& usedNames;
 
   ScriptSource* ss;
@@ -381,22 +381,22 @@ class MOZ_STACK_CLASS ParserBase : priva
   class Mark {
     friend class ParserBase;
     LifoAlloc::Mark mark;
     TraceListNode* traceListHead;
   };
   Mark mark() const {
     Mark m;
     m.mark = alloc_.mark();
-    m.traceListHead = traceListHead;
+    m.traceListHead = traceListHead_;
     return m;
   }
   void release(Mark m) {
     alloc_.release(m.mark);
-    traceListHead = m.traceListHead;
+    traceListHead_ = m.traceListHead;
   }
 
  private:
   template <typename BoxT, typename ArgT>
   BoxT* newTraceListNode(ArgT* arg);
 
  public:
   ObjectBox* newObjectBox(JSObject* obj);
@@ -737,17 +737,17 @@ class MOZ_STACK_CLASS GeneralParser : pu
   using Base::newFunctionBox;
   using Base::newName;
   using Base::null;
   using Base::options;
   using Base::pos;
   using Base::propagateFreeNamesAndMarkClosedOverBindings;
   using Base::setLocalStrictMode;
   using Base::stringLiteral;
-  using Base::traceListHead;
+  using Base::traceListHead_;
   using Base::yieldExpressionsSupported;
 
   using Base::abortIfSyntaxParser;
   using Base::clearAbortedSyntaxParse;
   using Base::disableSyntaxParser;
   using Base::hadAbortedSyntaxParse;
 
  public: