Refactor InitFromBailout
Categories
(Core :: JavaScript Engine: JIT, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox82 | --- | fixed |
People
(Reporter: iain, Assigned: iain)
Details
Attachments
(15 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 | |
|
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 | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
InitFromBailout is an 800+ line static function with at least three out-parameters. It is past time to break it up into something a little more structured.
| Assignee | ||
Comment 1•5 years ago
|
||
Deleting some dead code.
| Assignee | ||
Comment 2•5 years ago
|
||
My approach in this stack is to incrementally extract parts of InitFromBailout (and some parts of BailoutIonToBaseline into methods on BaselineStackBuilder. Some of the intermediate patches look a little strange, but I think it ends up in a reasonable place.
Depends on D89510
| Assignee | ||
Comment 3•5 years ago
|
||
Depends on D89511
| Assignee | ||
Comment 4•5 years ago
|
||
This will be expanded in a future patch to also update script_ and fun_.
Depends on D89512
| Assignee | ||
Comment 5•5 years ago
|
||
I would like to add a comment here explaining why we have to overwrite the arguments in the caller, but I'm not confident I understand myself.
Similarly, I tried rewriting the comment about not updating when the arguments object aliases the formals ("In such cases, the list of arguments reported by the snapshot are only aliases of argument object slots..."), but I wasn't sure I understood.
Depends on D89513
| Assignee | ||
Comment 6•5 years ago
|
||
Depends on D89514
| Assignee | ||
Comment 7•5 years ago
|
||
To simplify things, I changed FunCall so that the arguments are pushed during fixup, instead of using the main expression stack slot loop (https://searchfox.org/mozilla-central/rev/84922363f4014eae684aabc4f1d06380066494c5/js/src/jit/BaselineBailouts.cpp#981-1019). This is safe because the special cases in that loop only trigger on the final frame (!iter.hasMoreFrames()), and FunCall fixup only happens when we are not building the final frame.
Depends on D89515
| Assignee | ||
Comment 8•5 years ago
|
||
The invalidate argument to BailoutIonToBaseline and InitFromBailout was only used for a single assertion in the IonReturnOverride case, which could be more directly asserted in jit::Bailout.
Depends on D89516
| Assignee | ||
Comment 9•5 years ago
|
||
Depends on D89517
| Assignee | ||
Comment 10•5 years ago
|
||
Depends on D89518
| Assignee | ||
Comment 11•5 years ago
|
||
In preparation for the next patch, get rid of the out-parameters in InitFromBailout and clean a few things up.
Depends on D89519
| Assignee | ||
Comment 12•5 years ago
|
||
This patch hoists the stub frame / rectifier frame code into its own function. The next patch splits that function up.
Depends on D89520
| Assignee | ||
Comment 13•5 years ago
|
||
Depends on D89521
| Assignee | ||
Comment 14•5 years ago
|
||
Tying everything together.
Depends on D89522
| Assignee | ||
Comment 15•5 years ago
|
||
I was thinking about writing an [SMDOC] comment until I realized we already had one. I settled for a few updates to that comment and some annotations on the ASCII diagrams.
Depends on D89523
Updated•5 years ago
|
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/404660b9b7f6
https://hg.mozilla.org/mozilla-central/rev/79ce9d01a6a4
https://hg.mozilla.org/mozilla-central/rev/423aef1b78af
https://hg.mozilla.org/mozilla-central/rev/b1459d3497d9
https://hg.mozilla.org/mozilla-central/rev/6159158715b1
https://hg.mozilla.org/mozilla-central/rev/d227307717a9
https://hg.mozilla.org/mozilla-central/rev/469ebee4d1d8
https://hg.mozilla.org/mozilla-central/rev/3639b51e4d3d
https://hg.mozilla.org/mozilla-central/rev/da9017d4d6c4
https://hg.mozilla.org/mozilla-central/rev/f9e7c5a6553d
https://hg.mozilla.org/mozilla-central/rev/441a0c7d2ba0
https://hg.mozilla.org/mozilla-central/rev/3e03de3f89d8
https://hg.mozilla.org/mozilla-central/rev/7e5cced63786
https://hg.mozilla.org/mozilla-central/rev/b5c068fd6837
https://hg.mozilla.org/mozilla-central/rev/cc1abe9d41dd
Description
•