mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +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
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue