Fix some issues with JSOp::FunCall/FunApply ops
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(7 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
We currently only optimize these ops with ICs if we're calling the expected call/apply native function. This results in perf cliffs if we're calling a different function and also makes us more likely to run out of stack space (bug 1759412).
After Warp and the arguments analysis overhaul, it's now possible to remove JSOp::FunApply
and to optimize more at JSOp::FunCall
ops.
Assignee | ||
Comment 1•2 years ago
|
||
- Turn
JSOp::FunApply
check into an assertion because we don't inline there anymore. - Only call
GET_ARGC
forIsInvokeOp
ops. - Turn final else-if statement into a release assertion.
We now always set numActualArgs_
in this loop, so we can delete the assertion
(when we had inlining for apply-arguments, we reused the value from the caller frame).
Assignee | ||
Comment 2•2 years ago
|
||
The goal is to replace the JSOp-based check with something else so that we can remove
the JSOp.
Depends on D141614
Assignee | ||
Comment 3•2 years ago
|
||
Also support the other call optimizations for JSOp::FunApply
ops.
Depends on D141615
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D141616
Assignee | ||
Comment 5•2 years ago
|
||
If either the JSOp or CallFlags is FunCall, the other should match because that's
what Warp expects.
Depends on D141617
Assignee | ||
Comment 6•2 years ago
|
||
Allow other call optimizations at JSOp::FunCall
and allow optimizing fun_call
at other call ops.
Depends on D141618
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D141619
Updated•2 years ago
|
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d87a42f290e6 part 1 - Tidy up InlineFrameIterator::findNextFrame. r=iain https://hg.mozilla.org/integration/autoland/rev/0ad0428fad88 part 2 - Don't trial inline FunApply{ArgsObj,Array} calls. r=iain https://hg.mozilla.org/integration/autoland/rev/0e59b292fb48 part 3 - Optimize fun.apply for normal Call ops. r=iain https://hg.mozilla.org/integration/autoland/rev/e728ed5c9db2 part 4 - Remove JSOp::FunApply. r=iain https://hg.mozilla.org/integration/autoland/rev/ac9b8297416e part 5 - Ensure matching JSOp and CallFlags for FunCall. r=iain https://hg.mozilla.org/integration/autoland/rev/fb669efa4435 part 6 - Relax JSOp::FunCall optimization restrictions. r=iain https://hg.mozilla.org/integration/autoland/rev/f92971683f01 part 7 - Add tests. r=iain
Comment 9•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d87a42f290e6
https://hg.mozilla.org/mozilla-central/rev/0ad0428fad88
https://hg.mozilla.org/mozilla-central/rev/0e59b292fb48
https://hg.mozilla.org/mozilla-central/rev/e728ed5c9db2
https://hg.mozilla.org/mozilla-central/rev/ac9b8297416e
https://hg.mozilla.org/mozilla-central/rev/fb669efa4435
https://hg.mozilla.org/mozilla-central/rev/f92971683f01
Description
•