mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 22:57:31 +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 finishRoots();
|
||||||
void finish();
|
void finish();
|
||||||
|
|
||||||
inline bool hasZealMode(ZealMode mode);
|
|
||||||
inline void clearZealMode(ZealMode mode);
|
inline void clearZealMode(ZealMode mode);
|
||||||
inline bool upcomingZealousGC();
|
inline bool upcomingZealousGC();
|
||||||
inline bool needZealousGC();
|
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 void GCRuntime::clearZealMode(ZealMode mode) { }
|
||||||
inline bool GCRuntime::upcomingZealousGC() { return false; }
|
inline bool GCRuntime::upcomingZealousGC() { return false; }
|
||||||
inline bool GCRuntime::needZealousGC() { return false; }
|
inline bool GCRuntime::needZealousGC() { return false; }
|
||||||
|
|
|
||||||
|
|
@ -219,11 +219,8 @@ js::Nursery::isEmpty() const
|
||||||
MOZ_ASSERT(runtime_);
|
MOZ_ASSERT(runtime_);
|
||||||
if (!isEnabled())
|
if (!isEnabled())
|
||||||
return true;
|
return true;
|
||||||
|
MOZ_ASSERT(currentStartChunk_ == 0);
|
||||||
if (!runtime_->hasZealMode(ZealMode::GenerationalGC)) {
|
MOZ_ASSERT(currentStartPosition_ == chunk(0).start());
|
||||||
MOZ_ASSERT(currentStartChunk_ == 0);
|
|
||||||
MOZ_ASSERT(currentStartPosition_ == chunk(0).start());
|
|
||||||
}
|
|
||||||
return position() == currentStartPosition_;
|
return position() == currentStartPosition_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -253,11 +253,7 @@ struct Zone : public JS::shadow::Zone,
|
||||||
// possibly at other times too.
|
// possibly at other times too.
|
||||||
uint64_t gcNumber();
|
uint64_t gcNumber();
|
||||||
|
|
||||||
bool compileBarriers() const { return compileBarriers(needsIncrementalBarrier()); }
|
bool compileBarriers() const { return needsIncrementalBarrier(); }
|
||||||
bool compileBarriers(bool needsIncrementalBarrier) const {
|
|
||||||
return needsIncrementalBarrier ||
|
|
||||||
runtimeFromMainThread()->hasZealMode(js::gc::ZealMode::VerifierPre);
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ShouldUpdateJit { DontUpdateJit, UpdateJit };
|
enum ShouldUpdateJit { DontUpdateJit, UpdateJit };
|
||||||
void setNeedsIncrementalBarrier(bool needs, ShouldUpdateJit updateJit);
|
void setNeedsIncrementalBarrier(bool needs, ShouldUpdateJit updateJit);
|
||||||
|
|
|
||||||
|
|
@ -5359,21 +5359,9 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea
|
||||||
|
|
||||||
gc::State initialState = incrementalState;
|
gc::State initialState = incrementalState;
|
||||||
|
|
||||||
bool useZeal = false;
|
|
||||||
|
|
||||||
MOZ_ASSERT_IF(isIncrementalGCInProgress(), isIncremental);
|
MOZ_ASSERT_IF(isIncrementalGCInProgress(), isIncremental);
|
||||||
isIncremental = !budget.isUnlimited();
|
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) {
|
switch (incrementalState) {
|
||||||
case State::NotActive:
|
case State::NotActive:
|
||||||
initialReason = reason;
|
initialReason = reason;
|
||||||
|
|
@ -5396,9 +5384,6 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea
|
||||||
|
|
||||||
incrementalState = State::Mark;
|
incrementalState = State::Mark;
|
||||||
|
|
||||||
if (isIncremental && useZeal && hasZealMode(ZealMode::IncrementalRootsThenFinish))
|
|
||||||
break;
|
|
||||||
|
|
||||||
MOZ_FALLTHROUGH;
|
MOZ_FALLTHROUGH;
|
||||||
|
|
||||||
case State::Mark:
|
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 will need to mark anything new on the stack when we resume, so
|
||||||
* we stay in Mark state.
|
* we stay in Mark state.
|
||||||
*/
|
*/
|
||||||
if (!lastMarkSlice && isIncremental &&
|
if (!lastMarkSlice && isIncremental && initialState == State::Mark)
|
||||||
((initialState == State::Mark &&
|
|
||||||
!(useZeal && hasZealMode(ZealMode::IncrementalRootsThenFinish))) ||
|
|
||||||
(useZeal && hasZealMode(ZealMode::IncrementalMarkAllThenFinish))))
|
|
||||||
{
|
{
|
||||||
lastMarkSlice = true;
|
lastMarkSlice = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -5446,13 +5428,6 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea
|
||||||
if (budget.isOverBudget())
|
if (budget.isOverBudget())
|
||||||
break;
|
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;
|
MOZ_FALLTHROUGH;
|
||||||
|
|
||||||
case State::Sweep:
|
case State::Sweep:
|
||||||
|
|
|
||||||
|
|
@ -866,8 +866,6 @@ struct JSRuntime : public JS::shadow::Runtime,
|
||||||
/* Garbage collector state has been successfully initialized. */
|
/* Garbage collector state has been successfully initialized. */
|
||||||
bool gcInitialized;
|
bool gcInitialized;
|
||||||
|
|
||||||
bool hasZealMode(js::gc::ZealMode mode) { return gc.hasZealMode(mode); }
|
|
||||||
|
|
||||||
void lockGC() {
|
void lockGC() {
|
||||||
gc.lockGC();
|
gc.lockGC();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue