Zero bootstrap patches: all 11 moved to spec or runtime

- make-raise-guard-frame: was never defined in spec — added it
- *last-error-kont*: set at error origination (host-error calls), not
  wrapped around every cek-run step. Zero overhead on normal path.
- JIT: jit-try-call runtime function called from spec. Platform
  registers hook via _jit_try_call_fn ref. No bootstrap patching.
- bootstrap.py compile_spec_to_ml() now returns transpiled output
  with zero post-processing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 15:17:13 +00:00
parent be47a5c1a5
commit bd8d62cd9a
5 changed files with 36 additions and 55 deletions

View File

@@ -799,7 +799,7 @@ let _jit_compiling = ref false (* re-entrancy guard *)
let _jit_warned : (string, bool) Hashtbl.t = Hashtbl.create 16
let register_jit_hook env =
Sx_ref.jit_call_hook := Some (fun f args ->
Sx_runtime._jit_try_call_fn := Some (fun f args ->
match f with
| Lambda l ->
(match l.l_compiled with