Closed Bug 1563570 Opened 5 years ago Closed 5 years ago

Simplify SweepAction system and remove unnecessary templates

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(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 jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc90e3c311d0
Pass sweep action loop iteration values in GCRuntime state r=sfink
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0a5534db2e2
Remove SweepAction template parameters and replace with a fix Args struct r=sfink
https://hg.mozilla.org/integration/mozilla-inbound/rev/5a27a80a7a9e
Replace use of SweepActionRepeatFor with SweepActionForEach r=sfink
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: