None of this is in ECMAScript; it's how engines trade compile time for run speed. The shape is shared: bytecode runs in an interpreter first, inline caches record the types and shapes each operation sees, and hot code is recompiled by progressively more expensive compilers. Optimized code speculates on that feedback, and when a guard fails it falls back to a lower tier.
| Role | V8 | SpiderMonkey | JavaScriptCore |
|---|---|---|---|
| Interpreter | Ignition | C++ interpreter, then Baseline Interpreter | LLInt |
| Non-optimizing compiler | Sparkplug | Baseline Compiler | Baseline JIT |
| Fast optimizer | Maglev | — | DFG |
| Top optimizer | TurboFan | WarpMonkey | FTL |
Differences:
- SpiderMonkey has two interpreters. The Baseline Interpreter (Firefox 70) runs the same bytecode as the C++ interpreter but uses the same inline caches and frame layout as the Baseline Compiler, so moving between them is cheap.
- SpiderMonkey has one optimizing tier. WarpMonkey (Firefox 83) replaced IonMonkey's front end: it builds Ion's MIR from a snapshot of CacheIR inline-cache data, off the main thread, and keeps Ion's back end. V8 and JavaScriptCore each have a fast optimizer below the top one: Maglev, and the DFG.
- JavaScriptCore's FTL reuses the DFG's pipeline, then lowers through B3 IR and Assembly IR (Air) for more optimizations.
- Fallback targets differ. V8 deoptimizes to bytecode; Warp bails out to the Baseline Interpreter; JavaScriptCore OSR-exits to Baseline, or to the LLInt if Baseline code was discarded.
Thresholds are tuning, not contracts. SpiderMonkey's in-tree docs give default warmup counts of 10, 100 and 1500 (function entries plus loop iterations). WebKit's 2020 post gave JavaScriptCore's static thresholds as 500, 1000 and 100000 points (a call scores 15, a loop iteration 1), adjusted dynamically.