Fix WASM reactive signals: unify context/scope, fix flush-subscribers

Three root causes for reactive attribute updates not propagating in WASM:

1. `context` CEK special form only searched kont provide frames, missing
   `scope-push!` entries in the native scope_stacks hashtable. Unified by
   adding scope_stacks fallback to step_sf_context.

2. `flush-subscribers` used bare `(sub)` call which failed to invoke
   complex closures in for-each HO callbacks. Changed to `(cek-call sub nil)`.

3. Test eagerly evaluated `(deref s)` before render-to-dom saw it.
   Fixed tests to use quoted expressions matching real browser boot.

WASM native: 10/10, WASM shell: 26/26.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 15:12:25 +00:00
parent e1770499df
commit 521782d579
9 changed files with 563 additions and 10 deletions

View File

@@ -163,7 +163,7 @@
:effects (mutation)
(fn
((s :as dict))
(for-each (fn ((sub :as lambda)) (sub)) (signal-subscribers s))))
(for-each (fn (sub) (cek-call sub nil)) (signal-subscribers s))))
(define
dispose-computed