Bug 1064578 - Part 3: move the table sweeping sections into a separate block; r=jonco

--HG--
extra : rebase_source : d01822fc937cc2fe7230eae338aa15cda1ae2f73
This commit is contained in:
Terrence Cole 2014-09-22 11:16:09 -07:00
parent d1a9a441e2
commit 1e308472a9

View File

@ -4651,12 +4651,6 @@ GCRuntime::beginSweepingZoneGroup()
}
}
/* Collect watch points associated with unreachable objects. */
WatchpointMap::sweepAll(rt);
/* Detach unreachable debuggers and global objects from each other. */
Debugger::sweepAll(&fop);
{
gcstats::AutoPhase ap(stats, gcstats::PHASE_SWEEP_COMPARTMENTS);
gcstats::AutoPhase apdc(stats, gcstats::PHASE_SWEEP_DISCARD_CODE);
@ -4677,18 +4671,33 @@ GCRuntime::beginSweepingZoneGroup()
c->sweepBaseShapeTable();
c->sweepInitialShapeTable();
c->sweepTypeObjectTables();
c->sweepRegExps();
}
}
{
gcstats::AutoPhase ap(stats, gcstats::PHASE_SWEEP_COMPARTMENTS);
gcstats::AutoSCC scc(stats, zoneGroupIndex);
gcstats::AutoPhase apst(stats, gcstats::PHASE_SWEEP_TABLES);
for (GCCompartmentGroupIter c(rt); !c.done(); c.next()) {
c->sweepCallsiteClones();
c->sweepSavedStacks();
c->sweepGlobalObject(&fop);
c->sweepSelfHostingScriptSource();
c->sweepJitCompartment(&fop);
c->sweepRegExps();
c->sweepDebugScopes();
c->sweepWeakMaps();
c->sweepNativeIterators();
}
}
/* Collect watch points associated with unreachable objects. */
WatchpointMap::sweepAll(rt);
/* Detach unreachable debuggers and global objects from each other. */
Debugger::sweepAll(&fop);
{
gcstats::AutoPhase ap(stats, gcstats::PHASE_SWEEP_COMPARTMENTS);
gcstats::AutoSCC scc(stats, zoneGroupIndex);