Inline inlinable natives through JSOp::FunApply
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(4 files)
Like bug 1738413 except for FunApplyArray
. This will allow to optimise bug 1674143 when apply
instead of spread arguments are used.
Assignee | ||
Comment 1•2 years ago
|
||
Add some extra assertions to make it more clear which argument
formats are possible in specific functions.
Assignee | ||
Comment 2•2 years ago
|
||
We're already emitting writer.guardArrayIsPacked()
, so we should also make
sure the array is packed before trying to attach the stub.
Depends on D154200
Assignee | ||
Comment 3•2 years ago
|
||
Just some preparation for the next part.
Depends on D154201
Assignee | ||
Comment 4•2 years ago
|
||
Use code similar to tryAttachFunCall()
to handle inlinable natives in
tryAttachFunApply()
. Except there was one major obstacle: Warp doesn't like it
when arguments are loaded another time, cf. WarpCacheIRTranspiler::setArgumentId()
which asserts when the argumentOperandIds_
is already valid. To workaround this
limitation we have to return the argObjId
from emitFunApplyGuard()
and then
use a combined emitNativeCalleeGuardAndLoadArgsArray()
method to guard the native
and return the argument array ObjOperandId
.
Test cases were copied from "cacheir/spread-minmax-N.js".
Depends on D154202
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6eac61e4eeca Part 1: Add some extra assertions. r=jandem https://hg.mozilla.org/integration/autoland/rev/1ca6cd186221 Part 2: Don't attach FunApply when the args-array is non-packed. r=jandem https://hg.mozilla.org/integration/autoland/rev/600ca9699c93 Part 3: Extract emitFunApplyGuard. r=jandem https://hg.mozilla.org/integration/autoland/rev/473325749985 Part 4: Support FunApplyArray in InlinableNativeIRGenerator. r=jandem
Comment 6•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6eac61e4eeca
https://hg.mozilla.org/mozilla-central/rev/1ca6cd186221
https://hg.mozilla.org/mozilla-central/rev/600ca9699c93
https://hg.mozilla.org/mozilla-central/rev/473325749985
Description
•