Bug 1431434 - Merge SweepRegExps with SweepMisc; r?jonco draft
authorSumit Tiwari <sumi29@gmail.com>
Fri, 27 Apr 2018 18:29:16 -0400
changeset 789280 103c2d2cf902
parent 787539 6eeb97ca94f4
push id108242
push userbmo:sumi29@gmail.com
push dateFri, 27 Apr 2018 22:35:04 +0000
reviewersjonco
bugs1431434
milestone61.0a1
Bug 1431434 - Merge SweepRegExps with SweepMisc; r?jonco MozReview-Commit-ID: 7EHJ5LOOuLQ
js/src/gc/GC.cpp
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -5423,31 +5423,25 @@ SweepCCWrappers(JSRuntime* runtime)
 static void
 SweepObjectGroups(JSRuntime* runtime)
 {
     for (SweepGroupCompartmentsIter c(runtime); !c.done(); c.next())
         c->objectGroups.sweep();
 }
 
 static void
-SweepRegExps(JSRuntime* runtime)
-{
-    for (SweepGroupCompartmentsIter c(runtime); !c.done(); c.next())
-        c->sweepRegExps();
-}
-
-static void
 SweepMisc(JSRuntime* runtime)
 {
     for (SweepGroupCompartmentsIter c(runtime); !c.done(); c.next()) {
         c->sweepGlobalObject();
         c->sweepTemplateObjects();
         c->sweepSavedStacks();
         c->sweepSelfHostingScriptSource();
         c->sweepNativeIterators();
+        c->sweepRegExps();
     }
 }
 
 static void
 SweepCompressionTasks(JSRuntime* runtime)
 {
     AutoLockHelperThreadState lock;
 
@@ -5709,17 +5703,16 @@ GCRuntime::beginSweepingSweepGroup(FreeO
         Maybe<AutoRunParallelTask> updateAtomsBitmap;
         if (sweepingAtoms)
             updateAtomsBitmap.emplace(rt, UpdateAtomsBitmap, PhaseKind::UPDATE_ATOMS_BITMAP, lock);
 
         AutoPhase ap(stats(), PhaseKind::SWEEP_COMPARTMENTS);
 
         AutoRunParallelTask sweepCCWrappers(rt, SweepCCWrappers, PhaseKind::SWEEP_CC_WRAPPER, lock);
         AutoRunParallelTask sweepObjectGroups(rt, SweepObjectGroups, PhaseKind::SWEEP_TYPE_OBJECT, lock);
-        AutoRunParallelTask sweepRegExps(rt, SweepRegExps, PhaseKind::SWEEP_REGEXP, lock);
         AutoRunParallelTask sweepMisc(rt, SweepMisc, PhaseKind::SWEEP_MISC, lock);
         AutoRunParallelTask sweepCompTasks(rt, SweepCompressionTasks, PhaseKind::SWEEP_COMPRESSION, lock);
         AutoRunParallelTask sweepWeakMaps(rt, SweepWeakMaps, PhaseKind::SWEEP_WEAKMAPS, lock);
         AutoRunParallelTask sweepUniqueIds(rt, SweepUniqueIds, PhaseKind::SWEEP_UNIQUEIDS, lock);
 
         WeakCacheTaskVector sweepCacheTasks;
         if (!PrepareWeakCacheTasks(rt, &sweepCacheTasks))
             SweepWeakCachesOnMainThread(rt);