diff options
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/gc/GCRuntime.h | 2 | ||||
-rw-r--r-- | js/src/gc/Nursery.cpp | 7 | ||||
-rw-r--r-- | js/src/gc/Zone.h | 6 | ||||
-rw-r--r-- | js/src/jsgc.cpp | 27 | ||||
-rw-r--r-- | js/src/vm/Runtime.h | 2 |
5 files changed, 4 insertions, 40 deletions
diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 5252903f3..a426d759b 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -600,7 +600,6 @@ class GCRuntime void finishRoots(); void finish(); - inline bool hasZealMode(ZealMode mode); inline void clearZealMode(ZealMode mode); inline bool upcomingZealousGC(); inline bool needZealousGC(); @@ -1355,7 +1354,6 @@ class MOZ_RAII AutoMaybeStartBackgroundAllocation } }; -inline bool GCRuntime::hasZealMode(ZealMode mode) { return false; } inline void GCRuntime::clearZealMode(ZealMode mode) { } inline bool GCRuntime::upcomingZealousGC() { return false; } inline bool GCRuntime::needZealousGC() { return false; } diff --git a/js/src/gc/Nursery.cpp b/js/src/gc/Nursery.cpp index 3a3860d6d..72530b31b 100644 --- a/js/src/gc/Nursery.cpp +++ b/js/src/gc/Nursery.cpp @@ -219,11 +219,8 @@ js::Nursery::isEmpty() const MOZ_ASSERT(runtime_); if (!isEnabled()) return true; - - if (!runtime_->hasZealMode(ZealMode::GenerationalGC)) { - MOZ_ASSERT(currentStartChunk_ == 0); - MOZ_ASSERT(currentStartPosition_ == chunk(0).start()); - } + MOZ_ASSERT(currentStartChunk_ == 0); + MOZ_ASSERT(currentStartPosition_ == chunk(0).start()); return position() == currentStartPosition_; } diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h index a3a6dc07f..84d6f03dd 100644 --- a/js/src/gc/Zone.h +++ b/js/src/gc/Zone.h @@ -253,11 +253,7 @@ struct Zone : public JS::shadow::Zone, // possibly at other times too. uint64_t gcNumber(); - bool compileBarriers() const { return compileBarriers(needsIncrementalBarrier()); } - bool compileBarriers(bool needsIncrementalBarrier) const { - return needsIncrementalBarrier || - runtimeFromMainThread()->hasZealMode(js::gc::ZealMode::VerifierPre); - } + bool compileBarriers() const { return needsIncrementalBarrier(); } enum ShouldUpdateJit { DontUpdateJit, UpdateJit }; void setNeedsIncrementalBarrier(bool needs, ShouldUpdateJit updateJit); diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 52a8c9f71..039d8f2b0 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -5359,21 +5359,9 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea gc::State initialState = incrementalState; - bool useZeal = false; - MOZ_ASSERT_IF(isIncrementalGCInProgress(), isIncremental); isIncremental = !budget.isUnlimited(); - if (useZeal && (hasZealMode(ZealMode::IncrementalRootsThenFinish) || - hasZealMode(ZealMode::IncrementalMarkAllThenFinish))) - { - /* - * Yields between slices occurs at predetermined points in these modes; - * the budget is not used. - */ - budget.makeUnlimited(); - } - switch (incrementalState) { case State::NotActive: initialReason = reason; @@ -5396,9 +5384,6 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea incrementalState = State::Mark; - if (isIncremental && useZeal && hasZealMode(ZealMode::IncrementalRootsThenFinish)) - break; - MOZ_FALLTHROUGH; case State::Mark: @@ -5427,10 +5412,7 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea * We will need to mark anything new on the stack when we resume, so * we stay in Mark state. */ - if (!lastMarkSlice && isIncremental && - ((initialState == State::Mark && - !(useZeal && hasZealMode(ZealMode::IncrementalRootsThenFinish))) || - (useZeal && hasZealMode(ZealMode::IncrementalMarkAllThenFinish)))) + if (!lastMarkSlice && isIncremental && initialState == State::Mark) { lastMarkSlice = true; break; @@ -5446,13 +5428,6 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea if (budget.isOverBudget()) break; - /* - * Always yield here when running in incremental multi-slice zeal - * mode, so RunDebugGC can reset the slice buget. - */ - if (isIncremental && useZeal && hasZealMode(ZealMode::IncrementalMultipleSlices)) - break; - MOZ_FALLTHROUGH; case State::Sweep: diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index 4f7755b9d..734543c4e 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -866,8 +866,6 @@ struct JSRuntime : public JS::shadow::Runtime, /* Garbage collector state has been successfully initialized. */ bool gcInitialized; - bool hasZealMode(js::gc::ZealMode mode) { return gc.hasZealMode(mode); } - void lockGC() { gc.lockGC(); } |