mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Remove hasZealMode(mode) and callers
This commit is contained in:
parent
a2355a9bc6
commit
0c01eb7ec6
5 changed files with 4 additions and 40 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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_;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue