Skip to main content

Module mode

Module mode 

Source
Expand description

Execution mode and tier state.

ExecutionMode is chosen once, when a runtime is built, and never changes: it selects which function-call path a runtime uses. Before the merge each mode was expressed by storing a different fn pointer in GlobalEnv; the pointers existed only to let cljrs-interp reach cljrs-eval without a dependency cycle. Now that both live in this package the mode is data and the dispatch is a direct call.

TierState is the current state of that mode, and it does change: a tiered runtime tree-walks its own bootstrap (nothing can be lowered before clojure.core exists) and is promoted to TierState::Ir or TierState::Jit once the bootstrap finishes. It replaces the old GlobalEnv::compiler_ready flag, which said only “not tree-walk” and could not distinguish the IR interpreter from native JIT dispatch.

Enums§

ExecutionMode
How a runtime executes Clojure function calls.
TierState
Which execution tiers are live right now.