Backed out 2 changesets (bug 1257982) for build bustage at build/src/js/src/frontend/ParseContext.h on a CLOSED TREE
authorCoroiu Cristina <ccoroiu@mozilla.com>
Tue, 19 Mar 2019 10:35:21 +0200
changeset 464949 eff691bb6cf8cd3d2c74eecaa56062eb1c2f1e47
parent 464948 b5327ef3a646a86bc060d74940b34fc288ebd018
child 464950 235447d3f451189998d88bfe2e72a4a61f3b3124
push id112486
push useropoprus@mozilla.com
push dateTue, 19 Mar 2019 16:41:04 +0000
treeherdermozilla-inbound@ee866fb50236 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1257982
milestone68.0a1
backs oute73fdb7ff05d85aa0a9fb6bba46f27d25ad66041
13425f1eca221fe81b2a7c98fa8d2fab9f254233
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
Backed out 2 changesets (bug 1257982) for build bustage at build/src/js/src/frontend/ParseContext.h on a CLOSED TREE Backed out changeset e73fdb7ff05d (bug 1257982) Backed out changeset 13425f1eca22 (bug 1257982)
js/src/frontend/ParseContext.h
js/src/vm/Debugger.cpp
js/src/vm/EnvironmentObject.cpp
mfbt/HashTable.h
--- a/js/src/frontend/ParseContext.h
+++ b/js/src/frontend/ParseContext.h
@@ -73,21 +73,16 @@ class UsedNameTracker {
 
     void resetToScope(uint32_t scriptId, uint32_t scopeId);
 
    public:
     explicit UsedNameInfo(JSContext* cx) : uses_(cx) {}
 
     UsedNameInfo(UsedNameInfo&& other) : uses_(std::move(other.uses_)) {}
 
-    UsedNameInfo& operator=(UsedNameInfo&& other) {
-      uses_ = std::move(other.uses_);
-      return *this;
-    }
-
     bool noteUsedInScope(uint32_t scriptId, uint32_t scopeId) {
       if (uses_.empty() || uses_.back().scopeId < scopeId) {
         return uses_.append(Use{scriptId, scopeId});
       }
       return true;
     }
 
     void noteBoundInScope(uint32_t scriptId, uint32_t scopeId,
@@ -105,33 +100,31 @@ class UsedNameTracker {
       }
     }
 
     bool isUsedInScript(uint32_t scriptId) const {
       return !uses_.empty() && uses_.back().scriptId >= scriptId;
     }
   };
 
-  using UsedNameMap = GCHashMap<JSAtom*, UsedNameInfo, DefaultHasher<JSAtom*>>;
+  using UsedNameMap = HashMap<JSAtom*, UsedNameInfo, DefaultHasher<JSAtom*>>;
 
  private:
-  // The map of names to chains of uses. UsedNameTracker is not used in LIFO
-  // order with Rooteds, so must use PersistentRooted (for the arbitrary
-  // ordering capability, not for persistence.)
-  PersistentRooted<UsedNameMap> map_;
+  // The map of names to chains of uses.
+  UsedNameMap map_;
 
   // Monotonically increasing id for all nested scripts.
   uint32_t scriptCounter_;
 
   // Monotonically increasing id for all nested scopes.
   uint32_t scopeCounter_;
 
  public:
   explicit UsedNameTracker(JSContext* cx)
-      : map_(cx, cx), scriptCounter_(0), scopeCounter_(0) {}
+      : map_(cx), scriptCounter_(0), scopeCounter_(0) {}
 
   uint32_t nextScriptId() {
     MOZ_ASSERT(scriptCounter_ != UINT32_MAX,
                "ParseContext::Scope::init should have prevented wraparound");
     return scriptCounter_++;
   }
 
   uint32_t nextScopeId() {
@@ -667,17 +660,9 @@ class ParseContext : public Nestable<Par
                            mozilla::Maybe<DeclarationKind>* redeclaredKind,
                            uint32_t* prevPos);
 };
 
 }  // namespace frontend
 
 }  // namespace js
 
-namespace JS {
-
-template <>
-struct GCPolicy<js::frontend::UsedNameTracker::UsedNameInfo>
-    : public IgnoreGCPolicy {};
-
-}  // namespace JS
-
 #endif  // frontend_ParseContext_h
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -4533,17 +4533,17 @@ class MOZ_STACK_CLASS Debugger::ScriptQu
       : QueryBase(cx, dbg),
         url(cx),
         displayURLString(cx),
         hasSource(false),
         source(cx, AsVariant(static_cast<ScriptSourceObject*>(nullptr))),
         hasLine(false),
         line(0),
         innermost(false),
-        innermostForRealm(cx, cx->zone()),
+        innermostForRealm(cx->zone()),
         scriptVector(cx, ScriptVector(cx)),
         lazyScriptVector(cx, LazyScriptVector(cx)),
         wasmInstanceVector(cx, WasmInstanceObjectVector(cx)) {}
 
   /*
    * Parse the query object |query|, and prepare to match only the scripts
    * it specifies.
    */
@@ -4801,24 +4801,24 @@ class MOZ_STACK_CLASS Debugger::ScriptQu
 
   /* The line matching scripts must cover. */
   unsigned int line;
 
   /* True if the query has an 'innermost' property whose value is true. */
   bool innermost;
 
   using RealmToScriptMap =
-      GCHashMap<Realm*, JSScript*, DefaultHasher<Realm*>, ZoneAllocPolicy>;
+      HashMap<Realm*, JSScript*, DefaultHasher<Realm*>, ZoneAllocPolicy>;
 
   /*
    * For 'innermost' queries, a map from realms to the innermost script
    * we've seen so far in that realm. (Template instantiation code size
    * explosion ho!)
    */
-  Rooted<RealmToScriptMap> innermostForRealm;
+  RealmToScriptMap innermostForRealm;
 
   /*
    * Accumulate the scripts in an Rooted<ScriptVector> and
    * Rooted<LazyScriptVector>, instead of creating the JS array as we go,
    * because we mustn't allocate JS objects or GC while we use the CellIter.
    */
   Rooted<ScriptVector> scriptVector;
   Rooted<LazyScriptVector> lazyScriptVector;
--- a/js/src/vm/EnvironmentObject.cpp
+++ b/js/src/vm/EnvironmentObject.cpp
@@ -3714,17 +3714,17 @@ bool js::GetFrameEnvironmentAndScope(JSC
   } else {
     scope.set(frame.script()->innermostScope(pc));
   }
   return true;
 }
 
 #ifdef DEBUG
 
-using PropertyNameSet = GCHashSet<PropertyName*>;
+typedef HashSet<PropertyName*> PropertyNameSet;
 
 static bool RemoveReferencedNames(JSContext* cx, HandleScript script,
                                   PropertyNameSet& remainingNames) {
   // Remove from remainingNames --- the closure variables in some outer
   // script --- any free variables in this script. This analysis isn't perfect:
   //
   // - It will not account for free variables in an inner script which are
   //   actually accessing some name in an intermediate script between the
@@ -3792,29 +3792,29 @@ static bool RemoveReferencedNames(JSCont
   }
 
   return true;
 }
 
 static bool AnalyzeEntrainedVariablesInScript(JSContext* cx,
                                               HandleScript script,
                                               HandleScript innerScript) {
-  Rooted<PropertyNameSet> remainingNames(cx, cx);
+  PropertyNameSet remainingNames(cx);
 
   for (BindingIter bi(script); bi; bi++) {
     if (bi.closedOver()) {
       PropertyName* name = bi.name()->asPropertyName();
       PropertyNameSet::AddPtr p = remainingNames.lookupForAdd(name);
       if (!p && !remainingNames.add(p, name)) {
         return false;
       }
     }
   }
 
-  if (!RemoveReferencedNames(cx, innerScript, remainingNames.get())) {
+  if (!RemoveReferencedNames(cx, innerScript, remainingNames)) {
     return false;
   }
 
   if (!remainingNames.empty()) {
     Sprinter buf(cx);
     if (!buf.init()) {
       return false;
     }
--- a/mfbt/HashTable.h
+++ b/mfbt/HashTable.h
@@ -403,17 +403,17 @@ class HashMap {
   using ModIterator = typename Impl::ModIterator;
   ModIterator modIter() { return mImpl.modIter(); }
 
   // These are similar to Iterator/ModIterator/iter(), but use different
   // terminology.
   using Range = typename Impl::Range;
   using Enum = typename Impl::Enum;
   Range all() const { return mImpl.all(); }
-} MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS;
+};
 
 //---------------------------------------------------------------------------
 // HashSet
 //---------------------------------------------------------------------------
 
 // HashSet is a fast hash-based set of values.
 //
 // Template parameter requirements:
@@ -694,17 +694,17 @@ class HashSet {
   using ModIterator = typename Impl::ModIterator;
   ModIterator modIter() { return mImpl.modIter(); }
 
   // These are similar to Iterator/ModIterator/iter(), but use different
   // terminology.
   using Range = typename Impl::Range;
   using Enum = typename Impl::Enum;
   Range all() const { return mImpl.all(); }
-} MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS;
+};
 
 //---------------------------------------------------------------------------
 // Hash Policy
 //---------------------------------------------------------------------------
 
 // A hash policy |HP| for a hash table with key-type |Key| must provide:
 //
 //  - a type |HP::Lookup| to use to lookup table entries;