preserve frame pointer in all JIT code
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Tracking
()
People
(Reporter: luke, Assigned: anba)
References
Details
Attachments
(7 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Reporter | ||
Comment 9•7 years ago
|
||
Assignee | ||
Comment 10•2 years ago
|
||
Handle the case when temp2_
couldn't be reserved.
CheckNotBackReferenceImpl()
:
- Use
backtrack_stack_pointer_
as an additional temp register by saving it
on the stack.
initFrameAndRegs()
:
- Use
backtrack_stack_pointer_
as an additional temp register. We don't have
to restore the register, becausebacktrack_stack_pointer_
hasn't yet been
initialised. - Use
temp0_
forinputStartMinusOneReg
.InputOutputData
is stored in
temp0_
, but we don't read from it after this point anymore.
successHandler()
:
- Use
backtrack_stack_pointer_
as an additional temp register. We don't have
to restore the register, becausebacktrack_stack_pointer_
won't be read
after running the success handler.
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
We can't reuse the trick we've been using for maybeTemp5
where we're reusing
lastIndex
as an additional temp register. (Also see bug 1480819.)
Instead just save regexp
and lastIndex
on the stack and then use these
register for temp4
resp. temp5
.
This change also means RegExpMatcherRaw
will now (again) always be called
with a valid lastIndex
argument.
Depends on D146704
Assignee | ||
Comment 12•2 years ago
|
||
Use AutoScratchRegisterMaybeOutputType
instead of AutoScratchRegister
, so
we need one less register.
Depends on D146705
Assignee | ||
Comment 13•2 years ago
|
||
LGetPropSuperCache
needs seven register, so it can't be used on x86.
Depends on D146706
Assignee | ||
Comment 14•2 years ago
|
||
Changes:
- Replace
regs.take(BaselineFrameReg)
withregs.takeUnchecked(...)
, because
BaselineFrameReg
is the frame pointer only on some platforms, which means it's
no longer in the register set returned fromGeneralRegisterSet::All()
. - Remove
TakeJitRegisters
because the frame pointer is now always preserved. - Update
GenerateDirectCallFromJit
as instructed in the code comments.
Drive-by change:
- Remove
RegisterID::S0
andRegisterID::S1
, because they are some old
JSC-specific definitions. Instead addRegisterID::fp
.
Depends on D146707
Assignee | ||
Comment 15•2 years ago
|
||
This code is no longer needed.
Depends on D146708
Assignee | ||
Comment 16•2 years ago
|
||
Tests are looking good: https://treeherder.mozilla.org/jobs?repo=try&revision=09d6e7f8d4835e73ecef374190c62a09ad9d3b50
Benchmarks don't seem to indicate any regressions:
- Base revision: https://treeherder.mozilla.org/jobs?repo=try&revision=531119cb1e0ecd159e245de28e683e096d2eed42
- Patch revision: https://treeherder.mozilla.org/jobs?repo=try&revision=e4fcbc91261e65de6f7ebd1eb2af677f4a88d4da
- JS benchmarks: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=531119cb1e0ecd159e245de28e683e096d2eed42&newProject=try&newRevision=e4fcbc91261e65de6f7ebd1eb2af677f4a88d4da&framework=11&page=1
- Speedometer: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=531119cb1e0ecd159e245de28e683e096d2eed42&newProject=try&newRevision=e4fcbc91261e65de6f7ebd1eb2af677f4a88d4da&framework=13&page=1
Updated•2 years ago
|
Updated•2 years ago
|
Comment 17•2 years ago
|
||
Comment 18•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3a85ea2898b3
https://hg.mozilla.org/mozilla-central/rev/bbf75553a6dc
https://hg.mozilla.org/mozilla-central/rev/3a054262db65
https://hg.mozilla.org/mozilla-central/rev/42a0409c631b
https://hg.mozilla.org/mozilla-central/rev/d1b71b47f02a
https://hg.mozilla.org/mozilla-central/rev/f7930df19aac
Updated•2 years ago
|
Description
•