Closed Bug 1563510 Opened 4 months ago Closed 4 months ago

Optimize BaselineCodeGen::emitPrologue a bit

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(4 files)

We can easily eliminate some instructions from both the interpreter and compiler.

This eliminates some branches and simplifies the code.

Instead of initializing frame->environmentChain to nullptr first and then setting it to
fun->environment() later, we can store fun->environment immediately. This also means the
interpreter doesn't need to load and untag the callee token a second time.

Depends on D36903

We now have a Vector of offsets instead of a single offset.

Depends on D36904

This prevents slowdowns when we increase the Baseline JIT threshold and
is more predictable when we move BaselineCompiler off-thread.

Depends on D36905

Priority: -- → P1
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e13e7f4d5f05
part 1 - Fold emitPreInitEnvironmentChain into emitInitFrameFields. r=djvj
https://hg.mozilla.org/integration/autoland/rev/914ab31ebc59
part 2 - Store function environment directly in emitInitFrameFields instead of storing nullptr first. r=djvj
https://hg.mozilla.org/integration/autoland/rev/77bc29e90670
part 3 - Use toggled jumps for more debugger instrumentation. r=djvj
https://hg.mozilla.org/integration/autoland/rev/6a3e9d8abe2c
part 4 - Change JSFunction::hasJITCode to JSFunction::hasJitScript. r=iain
You need to log in before you can comment on or make changes to this bug.