33The native JIT is an optional accelerator for trusted, in-process execution. It
44does not add an isolation boundary and never changes Provider authority.
55
6+ The supported ` native-jit ` feature is intentionally a bounded * feature surface* ,
7+ not yet an accelerator for bounded executions. Whole-function native entry
8+ currently declines when step, cancellation, deadline, allocation, live-memory,
9+ intrinsic-call, or Provider-call limits are armed. The interpreter then executes
10+ the request with the original limits. This fail-closed behavior keeps ordinary
11+ bounded execution correct; hosts only receive native acceleration from the
12+ explicit trusted/unbounded execution mode until accounting parity is implemented.
13+
614## Stable invariants
715
816- The interpreter is the semantic oracle. Unsupported operations and guarded
@@ -25,6 +33,11 @@ does not add an isolation boundary and never changes Provider authority.
2533 deoptimization, and OSR eligibility are classified by the exhaustive
2634 ` JitInstr::effects ` API. Validators and tiering must consume those facts rather
2735 than maintain independent opcode lists.
36+ - Structural compilation work is bounded by ` JitLimits ` before Cranelift code
37+ generation. Instruction, register, CFG-edge, operand, analysis-word, deopt,
38+ memo-scope, callee, and recursive-group counts have deterministic limits.
39+ ` max_compile_millis ` is a soft admission/telemetry limit, not a claim that an
40+ in-process Cranelift invocation can be interrupted at a wall-clock deadline.
2841
2942## Internal contracts
3043
@@ -41,6 +54,21 @@ Profile-guided closure PIC and branch-side-exit speculation are excluded from th
4154stable SDK path. They remain behind the VM-only ` jit-speculation ` research feature
4255until a canonical compiler workload demonstrates a repeatable end-to-end benefit.
4356
57+ Loop-invariant host-helper memoization is likewise excluded from the stable SDK
58+ path and compiled only by ` jit-memoization-experimental ` . Its CFG scope proof and
59+ runtime memo state must earn retention through the same canonical scorecard.
60+
61+ The Cranelift engine crate is not independently published. Its public root exposes
62+ only the VM-facing engine, validated IR, typed options/outcomes, host-helper
63+ contract, and prepared-call boundary. Raw call-frame layout, ABI offsets, helper
64+ function aliases, codegen internals, and module implementation types remain
65+ crate-private.
66+
67+ Native rewrites carry ` NativeInstructionOrigin { bytecode_ip, resume_ip } ` in one
68+ owned pipeline state. A pass may temporarily return a local new-to-previous map,
69+ but only the pipeline state composes it; source and deopt-resume identity may not
70+ travel in unrelated parallel vectors.
71+
4472## Native recursion
4573
4674Tail recursion may be lowered to a loop. Non-tail self or group recursion uses the
@@ -62,3 +90,10 @@ deoptimization and rollback cases, 64/128/256 KiB host-stack entries, guard-page
6290flat-buffer bounds tests, AddressSanitizer coverage for host wrappers, structured
6391IR fuzzing, and the workload scorecard. ASan does not instrument generated machine
6492code; guard pages and canary/boundary fixtures cover direct native memory accesses.
93+
94+ The stable retention set is baseline scalar/flat-data execution, native leaf-call
95+ chains, transactional helpers, precise deopt, and the Option/Result/Variant scalar
96+ replacement paths that enter on the canonical scorecard. Speculation, non-tail
97+ native recursion, and helper memoization are research features. A local scorecard
98+ run is diagnostic only; timings become a compatibility or release signal only
99+ after a controlled-hardware baseline is checked in with machine/toolchain metadata.
0 commit comments