Warp: Transpile Function.prototype.apply arguments optimization
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: iain, Assigned: iain)
References
Details
Attachments
(6 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
These patches implement FunApplyArgs. I'll do FunApplyArray in a separate bug.
Assignee | ||
Comment 1•4 years ago
|
||
- tryAttachFunApply was the last remaining use of GuardSpecificNativeFunction.
- The FunApplyArgs side of GuardFunApply can be reimplemented using existing CacheIR ops. We might be able to do a similar thing with GuardFunApplyArray, but it will require a bit of refactoring, so I'm leaving it as its own op for now.
- Like FunCall, FunApply now has a Specialized variant that guards on the specific target to make inlining easier.
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D86856
Assignee | ||
Comment 3•4 years ago
|
||
GuardFunctionIsConstructor isn't necessary for FunApplyArgs, but it seemed reasonable to implement it now anyway.
Depends on D86857
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D86858
Assignee | ||
Comment 5•4 years ago
|
||
We didn't have very good jit-test coverage of this code, so I'm also adding a simple testcase.
Assignee | ||
Comment 6•4 years ago
|
||
It appears that the existing limit of 16 args for CacheIR was established when we first added FunApplyArray support in bug 906781 and never revisited.
Depends on D87681
Pushed by iireland@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/85471158d0c5 Clean up tryAttachFunApply r=jandem https://hg.mozilla.org/integration/autoland/rev/9e22306cf2a2 Transpile GuardNotClassConstructor r=jandem https://hg.mozilla.org/integration/autoland/rev/f359af39ebfa Transpile function flag guards r=jandem https://hg.mozilla.org/integration/autoland/rev/a0457890d336 Transpile FunApplyArgs r=jandem https://hg.mozilla.org/integration/autoland/rev/0a552e8d736a Use the correct arguments when transpiling inside an inlined function r=jandem https://hg.mozilla.org/integration/autoland/rev/49ad63d4238d Unify funapply/spread args limits between CacheIR and MIR r=jandem
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/85471158d0c5
https://hg.mozilla.org/mozilla-central/rev/9e22306cf2a2
https://hg.mozilla.org/mozilla-central/rev/f359af39ebfa
https://hg.mozilla.org/mozilla-central/rev/a0457890d336
https://hg.mozilla.org/mozilla-central/rev/0a552e8d736a
https://hg.mozilla.org/mozilla-central/rev/49ad63d4238d
Description
•