3 ms·
Because the interpreter pipeline shares code and data structures [0]: a couple of examples from the link below: > The Baseline Interpreter uses the same frame
by stuartd 7y ago
Because the interpreter pipeline shares code and data structures [0]: a couple of examples from the link below:
> The Baseline Interpreter uses the same frame layout as the Baseline JIT, but we’ve added some interpreter-specific fields to the frame.
> Because the Baseline Interpreter and JIT are so similar, a lot of the code generation code can be shared too. To do this, we added a templated BaselineCodeGen base class with two derived classes:
- BaselineCompiler: used by the Baseline JIT to compile a script’s bytecode to machine code.
- BaselineInterpreterGenerator: used to generate the Baseline Interpreter code.
[0] https://hacks.mozilla.org/2019/08/the-baseline-interpreter-a-faster-js-interpreter-in-firefox-70/ https://hacks.mozilla.org/2019/08/the-baseline-interpreter-a...