Closed Bug 1564887 Opened 5 months ago Closed 5 months ago

Simplify stack checks in Baseline

Categories

(Core :: JavaScript Engine: JIT, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Baseline has a mechanism for early stack checks for scripts with many locals (and the interpreter always uses this), but I don't think we actually need most of the complexity here if we reorder the Baseline prologue steps, like this:

  1. Environment chain initialization
  2. Stack check
  3. Push locals

This is going to be great because it should speed up and simplify our prologue code quite a bit.

7 files changed, 78 insertions(+), 179 deletions(-)

We no longer need the early-check mechanism if we always do environment chain
initialization + stack check before initializing locals. A comment mentions that
environment initialization can only happen after pushing locals, but that
didn't match the code anyway: if the early stack check failed, we would end up
in initEnvironmentChain without having initialized locals.

Ion prologue bailouts now resume in the prologue after environment chain
initialization, so the bailout code needed some small changes to always
initialize the environment chain instead of relying on the Baseline
prologue doing that.

Overall this is much simpler and deletes about 100 lines of code.

Priority: -- → P1
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/735759bca231
Simplify stack checks in Baseline. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.