mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
tab to spaces js/src
This commit is contained in:
parent
45680f8610
commit
4489faedab
3 changed files with 46 additions and 46 deletions
|
|
@ -1527,7 +1527,7 @@ inline void
|
||||||
ArenaLists::prepareForIncrementalGC()
|
ArenaLists::prepareForIncrementalGC()
|
||||||
{
|
{
|
||||||
purge();
|
purge();
|
||||||
for (auto i : AllAllocKinds())
|
for (auto i : AllAllocKinds())
|
||||||
arenaLists[i].moveCursorToEnd();
|
arenaLists[i].moveCursorToEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3573,18 +3573,18 @@ RelazifyFunctions(Zone* zone, AllocKind kind)
|
||||||
static bool
|
static bool
|
||||||
ShouldCollectZone(Zone* zone, JS::gcreason::Reason reason)
|
ShouldCollectZone(Zone* zone, JS::gcreason::Reason reason)
|
||||||
{
|
{
|
||||||
// Normally we collect all scheduled zones.
|
// Normally we collect all scheduled zones.
|
||||||
if (reason != JS::gcreason::COMPARTMENT_REVIVED)
|
if (reason != JS::gcreason::COMPARTMENT_REVIVED)
|
||||||
return zone->isGCScheduled();
|
return zone->isGCScheduled();
|
||||||
|
|
||||||
// If we are repeating a GC becuase we noticed dead compartments haven't
|
// If we are repeating a GC becuase we noticed dead compartments haven't
|
||||||
// been collected, then only collect zones contianing those compartments.
|
// been collected, then only collect zones contianing those compartments.
|
||||||
for (CompartmentsInZoneIter comp(zone); !comp.done(); comp.next()) {
|
for (CompartmentsInZoneIter comp(zone); !comp.done(); comp.next()) {
|
||||||
if (comp->scheduledForDestruction)
|
if (comp->scheduledForDestruction)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -5527,12 +5527,12 @@ GCRuntime::budgetIncrementalGC(JS::gcreason::Reason reason, SliceBudget& budget,
|
||||||
AutoLockForExclusiveAccess& lock)
|
AutoLockForExclusiveAccess& lock)
|
||||||
{
|
{
|
||||||
AbortReason unsafeReason = IsIncrementalGCUnsafe(rt);
|
AbortReason unsafeReason = IsIncrementalGCUnsafe(rt);
|
||||||
if (unsafeReason == AbortReason::None) {
|
if (unsafeReason == AbortReason::None) {
|
||||||
if (reason == JS::gcreason::COMPARTMENT_REVIVED)
|
if (reason == JS::gcreason::COMPARTMENT_REVIVED)
|
||||||
unsafeReason = gc::AbortReason::CompartmentRevived;
|
unsafeReason = gc::AbortReason::CompartmentRevived;
|
||||||
else if (mode != JSGC_MODE_INCREMENTAL)
|
else if (mode != JSGC_MODE_INCREMENTAL)
|
||||||
unsafeReason = gc::AbortReason::ModeChange;
|
unsafeReason = gc::AbortReason::ModeChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unsafeReason != AbortReason::None) {
|
if (unsafeReason != AbortReason::None) {
|
||||||
resetIncrementalGC(unsafeReason, lock);
|
resetIncrementalGC(unsafeReason, lock);
|
||||||
|
|
@ -5799,17 +5799,17 @@ GCRuntime::checkIfGCAllowedInCurrentState(JS::gcreason::Reason reason)
|
||||||
bool
|
bool
|
||||||
GCRuntime::shouldRepeatForDeadZone(JS::gcreason::Reason reason)
|
GCRuntime::shouldRepeatForDeadZone(JS::gcreason::Reason reason)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT_IF(reason == JS::gcreason::COMPARTMENT_REVIVED, !isIncremental);
|
MOZ_ASSERT_IF(reason == JS::gcreason::COMPARTMENT_REVIVED, !isIncremental);
|
||||||
|
|
||||||
if (!isIncremental || isIncrementalGCInProgress())
|
if (!isIncremental || isIncrementalGCInProgress())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) {
|
for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) {
|
||||||
if (c->scheduledForDestruction)
|
if (c->scheduledForDestruction)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -5831,21 +5831,21 @@ GCRuntime::collect(bool nonincrementalByAPI, SliceBudget budget, JS::gcreason::R
|
||||||
poked = false;
|
poked = false;
|
||||||
bool wasReset = gcCycle(nonincrementalByAPI, budget, reason);
|
bool wasReset = gcCycle(nonincrementalByAPI, budget, reason);
|
||||||
|
|
||||||
bool repeatForDeadZone = false;
|
bool repeatForDeadZone = false;
|
||||||
if (poked && cleanUpEverything) {
|
if (poked && cleanUpEverything) {
|
||||||
/* Need to re-schedule all zones for GC. */
|
/* Need to re-schedule all zones for GC. */
|
||||||
JS::PrepareForFullGC(rt->contextFromMainThread());
|
JS::PrepareForFullGC(rt->contextFromMainThread());
|
||||||
|
|
||||||
|
|
||||||
} else if (shouldRepeatForDeadZone(reason) && !wasReset) {
|
} else if (shouldRepeatForDeadZone(reason) && !wasReset) {
|
||||||
/*
|
/*
|
||||||
* This code makes an extra effort to collect compartments that we
|
* This code makes an extra effort to collect compartments that we
|
||||||
* thought were dead at the start of the GC. See the large comment
|
* thought were dead at the start of the GC. See the large comment
|
||||||
* in beginMarkPhase.
|
* in beginMarkPhase.
|
||||||
*/
|
*/
|
||||||
repeatForDeadZone = true;
|
repeatForDeadZone = true;
|
||||||
reason = JS::gcreason::COMPARTMENT_REVIVED;
|
reason = JS::gcreason::COMPARTMENT_REVIVED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ enum class State {
|
||||||
D(MallocBytesTrigger) \
|
D(MallocBytesTrigger) \
|
||||||
D(GCBytesTrigger) \
|
D(GCBytesTrigger) \
|
||||||
D(ZoneChange) \
|
D(ZoneChange) \
|
||||||
D(CompartmentRevived)
|
D(CompartmentRevived)
|
||||||
enum class AbortReason {
|
enum class AbortReason {
|
||||||
#define MAKE_REASON(name) name,
|
#define MAKE_REASON(name) name,
|
||||||
GC_ABORT_REASONS(MAKE_REASON)
|
GC_ABORT_REASONS(MAKE_REASON)
|
||||||
|
|
@ -455,10 +455,10 @@ class ArenaList {
|
||||||
return !*cursorp_;
|
return !*cursorp_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void moveCursorToEnd() {
|
void moveCursorToEnd() {
|
||||||
while (!isCursorAtEnd())
|
while (!isCursorAtEnd())
|
||||||
cursorp_ = &(*cursorp_)->next;
|
cursorp_ = &(*cursorp_)->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This can return nullptr.
|
// This can return nullptr.
|
||||||
Arena* arenaAfterCursor() const {
|
Arena* arenaAfterCursor() const {
|
||||||
|
|
|
||||||
|
|
@ -187,8 +187,8 @@ WatchpointMap::markAll(JSTracer* trc)
|
||||||
Map::Entry& entry = e.front();
|
Map::Entry& entry = e.front();
|
||||||
JSObject* object = entry.key().object;
|
JSObject* object = entry.key().object;
|
||||||
jsid id = entry.key().id;
|
jsid id = entry.key().id;
|
||||||
JSObject* priorObject = object;
|
JSObject* priorObject = object;
|
||||||
jsid priorId = id;
|
jsid priorId = id;
|
||||||
MOZ_ASSERT(JSID_IS_STRING(priorId) || JSID_IS_INT(priorId) || JSID_IS_SYMBOL(priorId));
|
MOZ_ASSERT(JSID_IS_STRING(priorId) || JSID_IS_INT(priorId) || JSID_IS_SYMBOL(priorId));
|
||||||
|
|
||||||
TraceManuallyBarrieredEdge(trc, &object, "held Watchpoint object");
|
TraceManuallyBarrieredEdge(trc, &object, "held Watchpoint object");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue