Use fold expressions for MixPolicy, ArgSeq, CacheIRSpewer, and CacheIRArgLength
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(4 files)
I couldn't yet use fold expressions for bug 1405122, but now we can finally make this code a bit nicer. Also found some other places where fold expressions can be applied.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Renamed the variadic arguments function to CacheIRArgsLength
, so it matches
its semantics a bit better.
Drive-by change:
- Changed a triple namespace opening block to the short form.
Depends on D69947
Assignee | ||
Comment 3•5 years ago
|
||
Renamed the single argument function to CacheIRArg
, because thanks to fold
expressions we no longer have to use the same name for the single- and multi-
arguments functions.
Depends on D69951
Assignee | ||
Comment 4•5 years ago
|
||
Uses std::index_sequence
to be able to access the arguments from last to
first, so they can be pushed in the correct order. C++17 doesn't seem to
provide a more straight forward way to traverse tuple elements in reverse
order.
Depends on D69952
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b7210573d422
https://hg.mozilla.org/mozilla-central/rev/d77f091ff2cc
https://hg.mozilla.org/mozilla-central/rev/71e5e9ee4531
https://hg.mozilla.org/mozilla-central/rev/08860793b6ec
Updated•5 years ago
|
Description
•