pub struct JITExecutor {
pub bytecode_executor: BytecodeExecutor,
}Expand description
JIT executor with selective per-function compilation.
JIT-compatible functions are compiled to native code; incompatible functions
(e.g. those using async, pattern matching, or unsupported builtins) are left
as Interpreted entries in the mixed function table for VM fallback.
§--mode jit semantics (W12-jit-mode-semantics-and-fallthrough, 2026-05-18)
--mode jit attempts to JIT-compile the toplevel script and every function
it reaches. If JIT compilation or JIT execution fails for any reason (a
preflight rejection at compile_program_selective, a Cranelift codegen
error, a panic in the JIT pipeline, a RETURN_TAG_NANBOXED kind-source
gap surface, etc.), the executor falls through to the bytecode interpreter
via BytecodeExecutor::execute_program instead of surfacing a hard error
to the CLI. A one-line [jit-fallback] diagnostic is emitted on stderr at
tracing::info level (default) so the fall-through is observable but does
not silently mask broken programs (the interpreter still re-runs the same
Program and surfaces any genuine runtime error from there).
Verbose JIT tracing remains under the --trace-jit=... CLI flag (replaces
the legacy SHAPE_JIT_DEBUG env-var per closure-wave-F migration). Tier-up
thresholds at T1@100 / T2@10k on hot functions are preserved by the
underlying compile_program_selective pipeline — fall-through only fires
when JIT can not handle the program at all.
Fields§
§bytecode_executor: BytecodeExecutorBytecode executor used for extension loading, module resolution, and other pre-compilation setup that the CLI wires through. Also the fall-through target when JIT compile/execute fails.
Implementations§
Source§impl JITExecutor
impl JITExecutor
Trait Implementations§
Source§impl ProgramExecutor for JITExecutor
impl ProgramExecutor for JITExecutor
fn execute_program( &mut self, engine: &mut ShapeEngine, program: &Program, ) -> Result<ProgramExecutorResult>
Auto Trait Implementations§
impl !RefUnwindSafe for JITExecutor
impl !UnwindSafe for JITExecutor
impl Freeze for JITExecutor
impl Send for JITExecutor
impl Sync for JITExecutor
impl Unpin for JITExecutor
impl UnsafeUnpin for JITExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more