JIT: skip recompilation for known-failed closure names
New closure instances of functions like parse-loop get l_compiled=None even though a previous instance already failed. Now check _jit_warned by name and immediately sentinel-mark new instances of known failures. The first failure is always logged. Subsequent instances are silently sentinel-marked — no recompilation, no log spam, no suppressed errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -728,6 +728,8 @@ let register_jit_hook env =
|
|||||||
| Some _ -> None (* compile failed or disabled — CEK handles *)
|
| Some _ -> None (* compile failed or disabled — CEK handles *)
|
||||||
| None ->
|
| None ->
|
||||||
if !_jit_compiling then None
|
if !_jit_compiling then None
|
||||||
|
else if Hashtbl.mem _jit_warned fn_name then
|
||||||
|
(l.l_compiled <- Some Sx_vm.jit_failed_sentinel; None)
|
||||||
else begin
|
else begin
|
||||||
_jit_compiling := true;
|
_jit_compiling := true;
|
||||||
let t0 = Unix.gettimeofday () in
|
let t0 = Unix.gettimeofday () in
|
||||||
|
|||||||
Reference in New Issue
Block a user