1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Compiler infrastructure for the Stator JIT.
//!
//! # Crate layout
//!
//! - [`baseline`] — Non-optimising baseline JIT compiler tier.
//! - [`baseline::masm_x64`] — x86-64 macro-assembler: emits raw machine code
//! into a byte buffer with label patching and RIP-relative addressing.
//! - [`maglev`] — Optimising Maglev compiler tier.
//! - [`maglev::ir`] — Typed IR node types ([`maglev::ir::ValueNode`],
//! [`maglev::ir::ControlNode`], [`maglev::ir::BasicBlock`],
//! [`maglev::ir::MaglevGraph`]).
//! - [`maglev::graph_builder`] — Bytecode-to-IR graph builder
//! ([`maglev::graph_builder::GraphBuilder`]).
//! - [`maglev::optimizer`] — Optimisation passes (constant folding, DCE,
//! redundant-CheckMaps removal).
//! - [`maglev::regalloc`] — Linear-scan register allocator.
//! - [`maglev::codegen`] — Code generator: walks a register-allocated
//! [`maglev::ir::MaglevGraph`] and emits x86-64 machine code.
//! - [`turbofan`] — Cranelift-backed optimising JIT backend.
//! - [`turbofan::compile`] — Entry-point: lower a [`maglev::ir::MaglevGraph`]
//! to Cranelift CLIF and produce executable native code via
//! [`cranelift-jit`].
//! - [`turbofan::compile_with_feedback`] — Like `compile`, but first applies
//! the pre-CLIF specialisation passes from [`turbofan::specialize`].
//! - [`turbofan::specialize`] — Pre-CLIF optimisation passes: type narrowing
//! from feedback, hot call-site specialisation, load/store elimination,
//! escape analysis / allocation sinking, global value numbering (GVN),
//! loop unrolling, register coalescing, and scalar replacement with
//! deopt materialization.
//! - [`turbofan::JsType`] — JS value-type → Cranelift type mapping.
//! - [`turbofan::TurbofanCompiledCode`] — Compiled function wrapper with
//! execute-and-deopt support.
//! - [`turbofan::DeoptPoint`] — Metadata for deoptimisation sites.
//! - [`turbofan::deopt::DeoptEntry`] — Rich deopt metadata with per-register
//! [`ValueRecovery`][`turbofan::deopt::ValueRecovery`] descriptors.
//! - [`turbofan::deopt::DeoptKind`] — Eager vs lazy deoptimisation trigger.
/// x86-64 ABI abstraction (System V AMD64 vs Microsoft x64).
/// Background compilation thread pool and priority job queue.
/// Non-optimising baseline JIT compiler.
/// Maglev optimising compiler tier.
/// On-Stack Replacement: mid-execution tier-up for hot loops.
/// Turbofan: Cranelift-backed optimising JIT backend.