Fix call-lambda signal mutation, rebuild browser JS, reformat reactive-islands
- sx_browser.ml: use cek_call instead of sx_call in call-lambda to avoid eval_expr deep-copying Dict values (breaks signal mutation) - sx-browser.js: rebuilt with latest transpiler changes - reactive-islands/index.sx: pretty-printed (no semantic changes) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -705,8 +705,10 @@ let () =
|
|||||||
bind "call-lambda" (fun args ->
|
bind "call-lambda" (fun args ->
|
||||||
match args with
|
match args with
|
||||||
| [f; a; _] | [f; a] when is_callable f ->
|
| [f; a; _] | [f; a] when is_callable f ->
|
||||||
let arg_list = match a with List l -> l | Nil -> [] | v -> [v] in
|
(* Use cek_call instead of sx_call to avoid eval_expr copying
|
||||||
Sx_ref.trampoline (Sx_runtime.sx_call f arg_list)
|
Dict values (signals). sx_call returns a Thunk resolved via
|
||||||
|
eval_expr which deep-copies dicts, breaking signal mutation. *)
|
||||||
|
Sx_ref.cek_call f a
|
||||||
| _ -> raise (Eval_error "call-lambda: expected (fn args env?)"));
|
| _ -> raise (Eval_error "call-lambda: expected (fn args env?)"));
|
||||||
bind "cek-call" (fun args ->
|
bind "cek-call" (fun args ->
|
||||||
match args with
|
match args with
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
||||||
var SX_VERSION = "2026-03-31T08:20:17Z";
|
var SX_VERSION = "2026-03-31T09:56:06Z";
|
||||||
|
|
||||||
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
||||||
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user