Introducing the WebKit FTL JIT
Created on 2020-08-20T18:38:25.334658
- Tiers of JIT: hot zones are run through progressively stronger compile<->optimization cycles based on how much they are called.
- On Stack Replacement: a framework to transplant execution between runtimes; the javascript interpreter is able to rip out the values from an execution context and move them over to a different set of generated code.
- Bunch of hacks to get things working with LLVM; don't really care about these so much.
Tiers
- Interpreter: run things slowly through a byte code system.
- Baseline: generates code with no optimizations; primarily to remove bytecode interpreter overhead.
- Dataflow Graph: performs type inferrence, register allocation, etc, a nascent compiler that goes through all the steps for static compilation.
- Fourth to LLVM: takes the data from the dataflow graph and transpiles it to LLVM, where the [very] slow compilation process makes as highly optimized code as possible.