Skip to main content

Module tier

Module tier 

Source
Expand description

Tiered compilation support for Shape VM.

Functions start in Tier 0 (interpreted) and are promoted to JIT compilation tiers based on call frequency:

  • Tier 0: Interpreted (all functions start here)
  • Tier 1: Baseline JIT (per-function, no cross-function optimization) — after 100 calls
  • Tier 2: Optimizing JIT (inlining, constant propagation) — after 10,000 calls

Structs§

CompilationRequest
Request to compile a function at a higher tier.
CompilationResult
Result of background compilation.
FunctionTierState
Per-function call counter and tier tracking.
TierManager
Manages tiered compilation state for all functions in a program.
TierStats
Summary statistics for the tiered compilation system.

Enums§

Tier
Execution tier for a function.

Traits§

CompilationBackend
Backend trait for pluggable JIT compilation.