Bug 1251833 - Part 4: Remove some unneeded qualification from GCRuntime and friends. r=terrence
authorEmanuel Hoogeveen <emanuel.hoogeveen@gmail.com>
Mon, 29 Feb 2016 12:10:00 -0500
changeset 286149 90e6fc7313684e6f875500b6b6b9e4ec2fdda171
parent 286148 064b832e49db55a4c491c5a5b539abc09573bb61
child 286150 017122d17ff039ada9efdafc1582f530bbcfa0c4
push id72675
push userryanvm@gmail.com
push dateTue, 01 Mar 2016 05:39:40 +0000
treeherdermozilla-inbound@47edc016cd4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1251833
milestone47.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 1251833 - Part 4: Remove some unneeded qualification from GCRuntime and friends. r=terrence
js/src/gc/GCRuntime.h
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -562,20 +562,17 @@ class ChainedIter
         MOZ_ASSERT(!iter1_.done());
         return iter1_.get();
     }
 
     operator T() const { return get(); }
     T operator->() const { return get(); }
 };
 
-typedef js::HashMap<Value*,
-                    const char*,
-                    js::DefaultHasher<Value*>,
-                    js::SystemAllocPolicy> RootedValueMap;
+typedef HashMap<Value*, const char*, DefaultHasher<Value*>, SystemAllocPolicy> RootedValueMap;
 
 class GCRuntime
 {
   public:
     explicit GCRuntime(JSRuntime* rt);
     bool init(uint32_t maxbytes, uint32_t maxNurseryBytes);
     void finishRoots();
     void finish();
@@ -653,17 +650,17 @@ class GCRuntime
 
     uint64_t nextCellUniqueId() {
         MOZ_ASSERT(nextCellUniqueId_ > 0);
         return nextCellUniqueId_++;
     }
 
   public:
     // Internal public interface
-    js::gc::State state() const { return incrementalState; }
+    State state() const { return incrementalState; }
     bool isHeapCompacting() const { return state() == COMPACT; }
     bool isForegroundSweeping() const { return state() == SWEEP; }
     bool isBackgroundSweeping() { return helperState.isBackgroundSweeping(); }
     void waitBackgroundSweepEnd() { helperState.waitBackgroundSweepEnd(); }
     void waitBackgroundSweepOrAllocEnd() {
         helperState.waitBackgroundSweepEnd();
         allocTask.cancel(GCParallelTask::CancelAndWait);
     }
@@ -731,17 +728,17 @@ class GCRuntime
 #endif
 
     void setAlwaysPreserveCode() { alwaysPreserveCode = true; }
 
     bool isIncrementalGCAllowed() const { return incrementalAllowed; }
     void disallowIncrementalGC() { incrementalAllowed = false; }
 
     bool isIncrementalGCEnabled() const { return mode == JSGC_MODE_INCREMENTAL && incrementalAllowed; }
-    bool isIncrementalGCInProgress() const { return state() != gc::NO_INCREMENTAL; }
+    bool isIncrementalGCInProgress() const { return state() != NO_INCREMENTAL; }
 
     bool isGenerationalGCEnabled() const { return generationalDisabled == 0; }
     void disableGenerationalGC();
     void enableGenerationalGC();
 
     void disableCompactingGC();
     void enableCompactingGC();
     bool isCompactingGCEnabled() const;
@@ -986,24 +983,24 @@ class GCRuntime
 
   public:
     JSRuntime* rt;
 
     /* Embedders can use this zone however they wish. */
     JS::Zone* systemZone;
 
     /* List of compartments and zones (protected by the GC lock). */
-    js::gc::ZoneVector zones;
+    ZoneVector zones;
 
-    js::Nursery nursery;
-    js::gc::StoreBuffer storeBuffer;
+    Nursery nursery;
+    StoreBuffer storeBuffer;
 
-    js::gcstats::Statistics stats;
+    gcstats::Statistics stats;
 
-    js::GCMarker marker;
+    GCMarker marker;
 
     /* Track heap usage for this runtime. */
     HeapUsage usage;
 
     /* GC scheduling state and parameters. */
     GCSchedulingTunables tunables;
     GCSchedulingState schedulingState;
 
@@ -1126,17 +1123,17 @@ class GCRuntime
      * creation.
      */
     mozilla::DebugOnly<uintptr_t> disableStrictProxyCheckingCount;
 
     /*
      * The current incremental GC phase. This is also used internally in
      * non-incremental GC.
      */
-    js::gc::State incrementalState;
+    State incrementalState;
 
     /* Indicates that the last incremental slice exhausted the mark stack. */
     bool lastMarkSlice;
 
     /* Whether any sweeping will take place in the separate GC helper thread. */
     bool sweepOnBackgroundThread;
 
     /* Whether observed type information is being released in the current GC. */
@@ -1147,17 +1144,17 @@ class GCRuntime
 
     /* Singly linekd list of zones to be swept in the background. */
     ZoneList backgroundSweepZones;
 
     /*
      * Free LIFO blocks are transferred to this allocator before being freed on
      * the background GC thread.
      */
-    js::LifoAlloc freeLifoAlloc;
+    LifoAlloc freeLifoAlloc;
 
     /* Index of current zone group (for stats). */
     unsigned zoneGroupIndex;
 
     /*
      * Incremental sweep state.
      */
     JS::Zone* zoneGroups;
@@ -1172,41 +1169,41 @@ class GCRuntime
      * Concurrent sweep infrastructure.
      */
     void startTask(GCParallelTask& task, gcstats::Phase phase);
     void joinTask(GCParallelTask& task, gcstats::Phase phase);
 
     /*
      * List head of arenas allocated during the sweep phase.
      */
-    js::gc::Arena* arenasAllocatedDuringSweep;
+    Arena* arenasAllocatedDuringSweep;
 
     /*
      * Incremental compacting state.
      */
     bool startedCompacting;
-    js::gc::ZoneList zonesToMaybeCompact;
+    ZoneList zonesToMaybeCompact;
     Arena* relocatedArenasToRelease;
 
 #ifdef JS_GC_ZEAL
-    js::gc::MarkingValidator* markingValidator;
+    MarkingValidator* markingValidator;
 #endif
 
     /*
      * Indicates that a GC slice has taken place in the middle of an animation
      * frame, rather than at the beginning. In this case, the next slice will be
      * delayed so that we don't get back-to-back slices.
      */
     bool interFrameGC;
 
     /* Default budget for incremental GC slice. See js/SliceBudget.h. */
     int64_t defaultTimeBudget_;
 
     /*
-     * We disable incremental GC if we encounter a js::Class with a trace hook
+     * We disable incremental GC if we encounter a Class with a trace hook
      * that does not implement write barriers.
      */
     bool incrementalAllowed;
 
     /*
      * GGC can be enabled from the command line while testing.
      */
     unsigned generationalDisabled;
@@ -1269,17 +1266,17 @@ class GCRuntime
      */
 #ifdef JS_GC_ZEAL
     uint32_t zealModeBits;
     int zealFrequency;
     int nextScheduled;
     bool deterministicOnly;
     int incrementalLimit;
 
-    js::Vector<JSObject*, 0, js::SystemAllocPolicy> selectedForMarking;
+    Vector<JSObject*, 0, SystemAllocPolicy> selectedForMarking;
 #endif
 
     bool fullCompartmentChecks;
 
     Callback<JSGCCallback> gcCallback;
     Callback<JSObjectsTenuredCallback> tenuredCallback;
     CallbackVector<JSFinalizeCallback> finalizeCallbacks;
     CallbackVector<JSWeakPointerZoneGroupCallback> updateWeakPointerZoneGroupCallbacks;
@@ -1331,18 +1328,18 @@ class GCRuntime
 
     /*
      * During incremental sweeping, this field temporarily holds the arenas of
      * the current AllocKind being swept in order of increasing free space.
      */
     SortedArenaList incrementalSweepList;
 
     friend class js::GCHelperState;
-    friend class js::gc::MarkingValidator;
-    friend class js::gc::AutoTraceSession;
+    friend class MarkingValidator;
+    friend class AutoTraceSession;
     friend class AutoEnterIteration;
 };
 
 /* Prevent compartments and zones from being collected during iteration. */
 class MOZ_RAII AutoEnterIteration {
     GCRuntime* gc;
 
   public: