Simplify SweepAction system and remove unnecessary templates
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
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.
Assignee | ||
Comment 1•5 years ago
|
||
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.
Assignee | ||
Comment 2•5 years ago
|
||
This gets rid of all the template parameter packs everywhere now they're all basically the same thing.
Depends on D37224
Assignee | ||
Comment 3•5 years ago
|
||
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
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dc90e3c311d0
https://hg.mozilla.org/mozilla-central/rev/f0a5534db2e2
https://hg.mozilla.org/mozilla-central/rev/5a27a80a7a9e
Updated•5 years ago
|
Description
•