sx-http: log JIT fallbacks once per function, not silently or flooding
JIT runtime errors now log once per function name via _jit_warned hashtable, then stay quiet for that function. No more silent swallowing (which hid real errors) or per-call flooding (which spammed thousands of lines and blocked the server). VM-level fallbacks (inside JIT-compiled code calling other JIT code) are silent — dedup happens at the hook level. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -165,7 +165,8 @@ and vm_call vm f args =
|
||||
not the caller's globals. Closure vars were merged at compile time. *)
|
||||
(try push vm (call_closure cl args cl.vm_env_ref)
|
||||
with _e ->
|
||||
(* Silent fallback to CEK — error is data-dependent, not a JIT bug *)
|
||||
(* Fallback to CEK — data-dependent error, not a JIT bug.
|
||||
Dedup logging happens in register_jit_hook. *)
|
||||
push vm (Sx_ref.cek_call f (List args)))
|
||||
| Some _ ->
|
||||
(* Compile failed — CEK *)
|
||||
@@ -179,9 +180,7 @@ and vm_call vm f args =
|
||||
| Some cl ->
|
||||
l.l_compiled <- Some cl;
|
||||
(try push vm (call_closure cl args cl.vm_env_ref)
|
||||
with _e ->
|
||||
(* Don't mark failed — error may be data-dependent *)
|
||||
push vm (Sx_ref.cek_call f (List args)))
|
||||
with _e -> push vm (Sx_ref.cek_call f (List args)))
|
||||
| None ->
|
||||
push vm (Sx_ref.cek_call f (List args))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user