Fix CSSX colour rules: reset cssx-resolve JIT to force CEK
cssx-resolve has a complex cond with nested and conditions that the JIT compiler miscompiles — the colour branch is skipped even when all conditions are true. Reset to jit_failed_sentinel after loading so it runs on CEK (which evaluates correctly). Added vm-reset-fn kernel command for targeted JIT bypass. All CSSX colour tokens now generate rules: text-violet-699, text-stone-500, bg-stone-50, etc. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1008,6 +1008,18 @@ let rec dispatch env cmd =
|
||||
| Eval_error msg -> send_error msg
|
||||
| exn -> send_error (Printexc.to_string exn))
|
||||
|
||||
| List [Symbol "vm-reset-fn"; String name] ->
|
||||
(* Reset a function's JIT-compiled bytecode, forcing CEK interpretation.
|
||||
Used to work around JIT compilation bugs in specific functions. *)
|
||||
(match Hashtbl.find_opt env.bindings name with
|
||||
| Some (Lambda l) ->
|
||||
l.l_compiled <- Some Sx_vm.jit_failed_sentinel;
|
||||
Printf.eprintf "[jit] reset %s (forced CEK)\n%!" name;
|
||||
send_ok ()
|
||||
| _ ->
|
||||
Printf.eprintf "[jit] reset %s: not found or not lambda\n%!" name;
|
||||
send_ok ())
|
||||
|
||||
| List [Symbol "aser-blob"] ->
|
||||
(* Like aser but reads source as a binary blob. *)
|
||||
let src = read_blob () in
|
||||
|
||||
Reference in New Issue
Block a user