Closed
Bug 1134142
Opened 9 years ago
Closed 9 years ago
Replace Baseline ICStub New functions with a variadic template function
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(1 file)
166.95 KB,
patch
|
djvj
:
review+
|
Details | Diff | Splinter Review |
There's some boilerplate when creating Baseline IC stubs and we usually end up passing the same arguments to a number of different functions. This is especially annoying for stubs that have many fields, like the ones for getters/setters. This patch eliminates the static New* method on each stub and replaces it with a single variadic template function in the ICStub base class. Then instead of FooStub::New(...) we have ICStub::New<FooStub>(...), but otherwise it works exactly the same. This shrinks BaselineIC.h a lot: 2 files changed, 191 insertions(+), 1008 deletions(-) We use similar things elsewhere in the codebase so hopefully this will work with all our compilers, but I kicked off a Try run just to be sure.
Attachment #8565903 -
Flags: review?(kvijayan)
Assignee | ||
Comment 1•9 years ago
|
||
Yay, all compilers happily accept it.
Comment 2•9 years ago
|
||
Comment on attachment 8565903 [details] [diff] [review] Patch Review of attachment 8565903 [details] [diff] [review]: ----------------------------------------------------------------- Nice! Yay variadic templates and perfect forwarding!
Attachment #8565903 -
Flags: review?(kvijayan) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Thanks for the quick review! https://hg.mozilla.org/integration/mozilla-inbound/rev/cda91b1179bf
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cda91b1179bf
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•