Expand description
IR-accelerated evaluation for clojurust.
Wraps the tree-walking interpreter (cljrs-interp) with IR lowering and
interpretation. When a function has been lowered to IR (eagerly at
definition time or from a pre-built cache), calls are dispatched to the
tier-1 IR interpreter; otherwise they fall back to tree-walking.
Key components:
ir_interp— tier-1 IR interpreter (register-file execution ofIrFunction)ir_cache— thread-safe cache of lowered IR keyed by arity IDir_convert— converts Clojure Value data → RustIrFunctionlower— bridges the Clojure compiler front-end to produce IRapply— IR-aware function dispatch with tree-walk fallback
Modules§
- apply
- Extended apply routines, tries IR evaluation and falls back to tree-walking.
- ir_
cache - Thread-safe IR cache for compiled function arities.
- ir_
convert - Convert Clojure Value data (maps/vectors/keywords) → Rust IR types.
- ir_
interp - Tier 1 IR interpreter: executes
IrFunctionover a VarId→Value register file. - lower
- Clojure-based IR lowering orchestration.
Structs§
- Env
- The full execution environment: a stack of local frames plus the global env.
- Global
Env - The global mutable store of all namespaces.
Enums§
Functions§
- ensure_
compiler_ loaded - Load the Clojure compiler namespaces and mark the compiler as ready for IR lowering. Called lazily on first lowering attempt.
- eval
- Evaluate a
Formin the givenEnv. - invoke
- load_ns
- Find, load, and wire up the source file for
spec.ns. - load_
prebuilt_ ir - Load pre-built IR from a serialized bundle into the IR cache.
- register_
compiler_ sources - standard_
env - standard_
env_ minimal - standard_
env_ with_ paths