Closed Bug 1563570 Opened 3 months ago Closed 3 months ago

Simplify SweepAction system and remove unnecessary templates


(Core :: JavaScript: GC, task, P3)




Tracking Status
firefox69 --- wontfix
firefox70 --- fixed


(Reporter: jonco, Assigned: jonco)



(3 files)

The SweepAction system uses templates extensively to deduce method arguments so that we can say ForEachZoneInSweepGroup(...) and all uses of Call() inside it will automagically get passed a Zone* argument.

This nice but unnecessary. If we use external state (i.e. GCRuntime members) to pass the value of the loop iteration variable then we don't need to do all this templating and the code becomes a lot simpler.

This makes looping constucts take an out parameter to store the loop iteration value in. This gets rid of RemoveLastTemplateParameter which I enjoyed writing but always felt guitly about inflicting on the world.

This gets rid of all the template parameter packs everywhere now they're all basically the same thing.

Depends on D37224

If we make the output pointer optional we can use SweepActionForEach in place of SweepAtionRepeatFor and remove the latter.

Depends on D37225

Pushed by
Pass sweep action loop iteration values in GCRuntime state r=sfink
Remove SweepAction template parameters and replace with a fix Args struct r=sfink
Replace use of SweepActionRepeatFor with SweepActionForEach r=sfink
You need to log in before you can comment on or make changes to this bug.