Skip to main content

byteflow/jit/
mod.rs

1//! Trace JIT for Byteflow — Cranelift backend, isolated `unsafe`.
2//!
3//! Compiles int-specialized traces (`LoadImm`, `LoadConst`, `Move`, binops,
4//! `Neg`, `Branch`, `Jump`, `Call`, `Return`). Scheduler effects stop recording.
5
6mod compiler;
7mod dispatch;
8mod error;
9mod exit;
10mod frame;
11mod module_local;
12mod runtime;
13mod trace;
14
15pub use compiler::TraceCompiler;
16pub use dispatch::{
17    apply_exit_to_vm, force_compile, hot_threshold, run_compiled_trace, run_compiled_trace_ref,
18    run_vm_with_jit, run_vm_with_jit_runtime, sync_slots_from_vm, sync_slots_to_vm, try_run_hot,
19    try_run_hot_runtime, SyncSlotsResult,
20};
21pub use error::CompileError;
22pub use exit::{
23    ExitReason, JitReturn, JIT_BUDGET, JIT_CONTINUE, JIT_DEOPT, JIT_EFFECT, JIT_RETURN, JIT_TRAP,
24};
25pub use frame::{JitCallRecord, JitEntry, JitFrame, MAX_JIT_CALL_DEPTH};
26pub use runtime::JitRuntime;
27pub use trace::{
28    CompiledTrace, HotCounter, JitContext, TraceCache, TraceKey, TraceSpan, HOT_THRESHOLD,
29    MAX_TRACE_LENGTH,
30};