Files
rose-ash/shared/static/wasm/sx/harness-web.sxbc
giles 59ac51a8ba
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 46s
kernel+bundle: fix nil-bytecode .sxbc (compile-blob serializer dropped Integer)
Every .sxbc shipped with `:bytecode (nil nil ...)` and `:arity nil`, so the WASM
kernel's vm.sx hit "VM: unknown opcode 0" on every module and fell back to .sx
source (slower, noisy console). Root cause: `raw_serialize` in the `compile-blob`
command (sx_server.ml) handles `Number` but not `Integer`, and bytecode opcodes +
arity/upvalue-count are `Integer`s — so they fell through to the `_ -> "nil"`
catch-all and serialized as nil. Same class of bug as the value_to_js Integer gap
(689dae7d). It went unnoticed because source-fallback masks it. Add the Integer
case and regenerate: the web stack now loads entirely from bytecode (0 unknown-
opcode warnings, 0 source fallbacks), boost + SPA unchanged. compiler.sx in the
bundle was also stale — re-synced to the canonical lib/compiler.sx.

Verified: native host conformance 271/271; chromium boots with 0 unknown-opcode
warnings + 0 source-fallback loads; spa-check still passes (boost 6/6, fragment
swap). Prereq for content-addressing the assets (caching real bytecode, not nil).
2026-06-29 13:17:20 +00:00

4 lines
9.4 KiB
Plaintext

(sxbc 1 "d44c2ab4fd3c6651"
(code
:constants ("mock-element" {:upvalue-count 0 :arity 3 :constants ("children" "list" "listeners" "event-log" "tag" "text" "" "attrs" "class" "id" "merge") :bytecode (1 0 0 52 1 0 0 1 2 0 65 0 0 1 3 0 52 1 0 0 1 4 0 16 0 1 5 0 1 6 0 1 7 0 65 0 0 16 1 33 11 0 1 8 0 16 1 65 1 0 32 3 0 65 0 0 16 2 33 11 0 1 9 0 16 2 65 1 0 32 3 0 65 0 0 52 10 0 3 65 6 0 50)} "mock-set-text!" {:upvalue-count 0 :arity 2 :constants ("text" "dict-set!") :bytecode (16 0 1 0 0 16 1 52 1 0 3 50)} "mock-append-child!" {:upvalue-count 0 :arity 2 :constants ("children" "get" "append!") :bytecode (16 0 1 0 0 52 1 0 2 16 1 52 2 0 2 50)} "mock-set-attr!" {:upvalue-count 0 :arity 3 :constants ("attrs" "get" "dict-set!") :bytecode (16 0 1 0 0 52 1 0 2 16 1 16 2 52 2 0 3 50)} "mock-get-attr" {:upvalue-count 0 :arity 2 :constants ("attrs" "get") :bytecode (16 0 1 0 0 52 1 0 2 16 1 52 1 0 2 50)} "mock-add-listener!" {:upvalue-count 0 :arity 3 :constants ("listeners" "get" "has-key?" "list" "dict-set!" "append!") :bytecode (16 0 1 0 0 52 1 0 2 17 3 16 3 16 1 52 2 0 2 167 33 15 0 16 3 16 1 52 3 0 0 52 4 0 3 32 1 0 2 5 16 3 16 1 52 1 0 2 16 2 52 5 0 2 50)} "simulate-click" {:upvalue-count 0 :arity 1 :constants ("listeners" "get" "click" {:upvalue-count 1 :arity 1 :constants ("target" "type" "click" "list" "cek-call") :bytecode (16 0 1 0 0 18 0 1 1 0 1 2 0 65 2 0 52 3 0 1 52 4 0 2 50)} "for-each" "event-log" "type" "append!") :bytecode (16 0 1 0 0 52 1 0 2 1 2 0 52 1 0 2 17 1 16 1 33 14 0 51 3 0 1 0 16 1 52 4 0 2 32 1 0 2 5 16 0 1 5 0 52 1 0 2 1 6 0 1 2 0 65 1 0 52 7 0 2 50)} "simulate-input" {:upvalue-count 0 :arity 2 :constants ("mock-set-attr!" "value" "listeners" "get" "input" {:upvalue-count 1 :arity 1 :constants ("target" "type" "input" "list" "cek-call") :bytecode (16 0 1 0 0 18 0 1 1 0 1 2 0 65 2 0 52 3 0 1 52 4 0 2 50)} "for-each" "event-log" "type" "append!") :bytecode (20 0 0 16 0 1 1 0 16 1 48 3 5 16 0 1 2 0 52 3 0 2 1 4 0 52 3 0 2 17 2 16 2 33 14 0 51 5 0 1 0 16 2 52 6 0 2 32 1 0 2 5 16 0 1 7 0 52 3 0 2 1 1 0 16 1 1 8 0 1 4 0 65 2 0 52 9 0 2 50)} "simulate-event" {:upvalue-count 0 :arity 3 :constants ("listeners" "get" {:upvalue-count 3 :arity 1 :constants ("target" "detail" "type" "list" "cek-call") :bytecode (16 0 1 0 0 18 0 1 1 0 18 1 1 2 0 18 2 65 3 0 52 3 0 1 52 4 0 2 50)} "for-each" "event-log" "detail" "type" "append!") :bytecode (16 0 1 0 0 52 1 0 2 16 1 52 1 0 2 17 3 16 3 33 18 0 51 2 0 1 0 1 2 1 1 16 3 52 3 0 2 32 1 0 2 5 16 0 1 4 0 52 1 0 2 1 5 0 16 2 1 6 0 16 1 65 2 0 52 7 0 2 50)} "assert-text" {:upvalue-count 0 :arity 2 :constants ("text" "get" "assert=" "Expected text \"" "\", got \"" "\"" "str") :bytecode (16 0 1 0 0 52 1 0 2 17 2 20 2 0 16 2 16 1 1 3 0 16 1 1 4 0 16 2 1 5 0 52 6 0 5 49 3 50)} "assert-attr" {:upvalue-count 0 :arity 3 :constants ("mock-get-attr" "assert=" "Expected attr " "=\"" "\", got \"" "\"" "str") :bytecode (20 0 0 16 0 16 1 48 2 17 3 20 1 0 16 3 16 2 1 2 0 16 1 1 3 0 16 2 1 4 0 16 3 1 5 0 52 6 0 7 49 3 50)} "assert-class" {:upvalue-count 0 :arity 2 :constants ("mock-get-attr" "class" "" "assert" " " "split" "contains?" "Expected class \"" "\" in \"" "\"" "str") :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 4 0 5 1 2 0 17 2 20 3 0 16 2 1 4 0 52 5 0 2 16 1 52 6 0 2 1 7 0 16 1 1 8 0 16 2 1 9 0 52 10 0 5 49 2 50)} "assert-no-class" {:upvalue-count 0 :arity 2 :constants ("mock-get-attr" "class" "" "assert" " " "split" "contains?" "Expected no class \"" "\" but found in \"" "\"" "str") :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 4 0 5 1 2 0 17 2 20 3 0 16 2 1 4 0 52 5 0 2 16 1 52 6 0 2 167 1 7 0 16 1 1 8 0 16 2 1 9 0 52 10 0 5 49 2 50)} "assert-child-count" {:upvalue-count 0 :arity 2 :constants ("children" "get" "assert=" "Expected " " children, got " "str") :bytecode (16 0 1 0 0 52 1 0 2 168 17 2 20 2 0 16 2 16 1 1 3 0 16 1 1 4 0 16 2 52 5 0 4 49 3 50)} "assert-event-fired" {:upvalue-count 0 :arity 2 :constants ("assert" {:upvalue-count 1 :arity 1 :constants ("type" "get") :bytecode (16 0 1 0 0 52 1 0 2 18 0 164 50)} "event-log" "get" "some" "Expected event \"" "\" to have been fired" "str") :bytecode (20 0 0 51 1 0 1 1 16 0 1 2 0 52 3 0 2 52 4 0 2 1 5 0 16 1 1 6 0 52 7 0 3 49 2 50)} "assert-no-event" {:upvalue-count 0 :arity 2 :constants ("assert" {:upvalue-count 1 :arity 1 :constants ("type" "get") :bytecode (16 0 1 0 0 52 1 0 2 18 0 164 50)} "event-log" "get" "some" "Expected event \"" "\" to NOT have been fired" "str") :bytecode (20 0 0 51 1 0 1 1 16 0 1 2 0 52 3 0 2 52 4 0 2 167 1 5 0 16 1 1 6 0 52 7 0 3 49 2 50)} "event-fire-count" {:upvalue-count 0 :arity 2 :constants ({:upvalue-count 1 :arity 1 :constants ("type" "get") :bytecode (16 0 1 0 0 52 1 0 2 18 0 164 50)} "event-log" "get" "filter") :bytecode (51 0 0 1 1 16 0 1 1 0 52 2 0 2 52 3 0 2 168 50)} "make-web-harness" {:upvalue-count 0 :arity 1 :constants ("make-harness" "platform" "harness-set!" "dom" "elements" "root" "mock-element" "div" "id") :bytecode (20 0 0 1 1 0 16 0 48 2 17 1 20 2 0 16 1 1 3 0 1 4 0 65 0 0 1 5 0 20 6 0 1 7 0 1 8 0 1 5 0 48 3 65 2 0 48 3 5 16 1 50)} "is-renderable?" {:upvalue-count 0 :arity 1 :constants ("nil?" "string?" "number?" "boolean?" "dict?" "list?" "empty?" "type-of" "symbol") :bytecode (16 0 52 0 0 1 33 4 0 3 32 106 0 16 0 52 1 0 1 33 4 0 3 32 93 0 16 0 52 2 0 1 33 4 0 3 32 80 0 16 0 52 3 0 1 33 4 0 3 32 67 0 16 0 52 4 0 1 33 4 0 4 32 54 0 16 0 52 5 0 1 167 33 4 0 4 32 40 0 16 0 52 6 0 1 33 4 0 3 32 27 0 16 0 169 17 1 16 1 52 7 0 1 1 8 0 164 6 33 8 0 5 16 1 52 4 0 1 167 50)} "is-render-leak?" {:upvalue-count 0 :arity 1 :constants ("nil?" "is-renderable?") :bytecode (16 0 52 0 0 1 167 6 33 9 0 5 20 1 0 16 0 48 1 167 50)} "assert-renderable" {:upvalue-count 0 :arity 2 :constants ("assert" "is-renderable?" "Render leak in " ": " "type-of" "dict?" " — dict would appear as {:key val} text in output" "list?" "empty?" " — list of dicts would appear as raw data in output" " — non-renderable value would appear as text" "str") :bytecode (20 0 0 20 1 0 16 0 48 1 1 2 0 16 1 1 3 0 16 0 52 4 0 1 16 0 52 5 0 1 33 6 0 1 6 0 32 42 0 16 0 52 7 0 1 6 33 20 0 5 16 0 52 8 0 1 167 6 33 8 0 5 16 0 169 52 5 0 1 33 6 0 1 9 0 32 3 0 1 10 0 52 11 0 5 49 2 50)} "render-body-audit" {:upvalue-count 0 :arity 1 :constants ("list" {:upvalue-count 1 :arity 1 :constants ("is-render-leak?" "leak-kind" "dict?" "dict" "list?" "empty?" "list-of-dicts" "other" "value-type" "type-of" "append!") :bytecode (20 0 0 16 0 48 1 33 81 0 18 0 1 1 0 16 0 52 2 0 1 33 6 0 1 3 0 32 42 0 16 0 52 4 0 1 6 33 20 0 5 16 0 52 5 0 1 167 6 33 8 0 5 16 0 169 52 2 0 1 33 6 0 1 6 0 32 3 0 1 7 0 1 8 0 16 0 52 9 0 1 65 2 0 52 10 0 2 32 1 0 2 50)} "for-each") :bytecode (52 0 0 0 17 1 51 1 0 1 1 16 0 52 2 0 2 5 16 1 50)} "assert-render-body-clean" {:upvalue-count 0 :arity 2 :constants ("render-body-audit" "assert" "empty?" "Render body has " " leak(s) in " ". " "render-to-html/render-to-dom render ALL body expressions — " "put side effects in let bindings, not body expressions." "str") :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 16 2 52 2 0 1 1 3 0 16 2 168 1 4 0 16 1 1 5 0 1 6 0 1 7 0 52 8 0 7 49 2 50)} "mock-render" {:upvalue-count 0 :arity 1 :constants ("nil?" "string?" "mock-element" "TEXT" "mock-set-text!" "number?" "str" "list?" "empty?" "type-of" "symbol" "symbol-name" {:upvalue-count 2 :arity 1 :constants ("empty?" "type-of" "keyword" "mock-set-attr!" "keyword-name" 1 "nth" "mock-render" "mock-append-child!") :bytecode (16 0 52 0 0 1 167 33 105 0 16 0 169 17 1 16 1 52 1 0 1 1 2 0 164 33 49 0 16 0 170 52 0 0 1 167 33 34 0 20 3 0 18 0 16 1 52 4 0 1 16 0 1 5 0 52 6 0 2 48 3 5 18 1 16 0 170 170 49 1 32 1 0 2 32 35 0 20 7 0 16 1 48 1 17 2 16 2 33 12 0 20 8 0 18 0 16 2 48 2 32 1 0 2 5 18 1 16 0 170 49 1 32 1 0 2 50)}) :bytecode (16 0 52 0 0 1 33 4 0 2 32 157 0 16 0 52 1 0 1 33 25 0 20 2 0 1 3 0 48 1 17 1 20 4 0 16 1 16 0 48 2 5 16 1 32 123 0 16 0 52 5 0 1 33 29 0 20 2 0 1 3 0 48 1 17 1 20 4 0 16 1 16 0 52 6 0 1 48 2 5 16 1 32 85 0 16 0 52 7 0 1 167 33 4 0 2 32 71 0 16 0 52 8 0 1 33 4 0 2 32 58 0 16 0 169 17 1 16 1 52 9 0 1 1 10 0 164 167 33 4 0 2 32 35 0 20 2 0 16 1 52 11 0 1 48 1 17 2 2 17 3 51 12 0 1 2 1 3 17 3 16 3 16 0 170 48 1 5 16 2 50)} "mock-render-fragment" {:upvalue-count 0 :arity 1 :constants ({:upvalue-count 0 :arity 1 :constants ("nil?") :bytecode (16 0 52 0 0 1 167 50)} "mock-render" "map" "filter") :bytecode (51 0 0 20 1 0 16 0 52 2 0 2 52 3 0 2 50)} "assert-single-render-root" {:upvalue-count 0 :arity 2 :constants ("mock-render-fragment" "assert" 1 "Expected single render root in " " but got " " element(s). " "Multi-body let/begin in render-to-html/render-to-dom renders " "ALL expressions — put side effects in let bindings." "str") :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 16 2 168 1 2 0 164 1 3 0 16 1 1 4 0 16 2 168 1 5 0 1 6 0 1 7 0 52 8 0 7 49 2 50)} "assert-tag" {:upvalue-count 0 :arity 2 :constants ("assert" "tag" "get" "Expected <" "> but got <" ">" "str") :bytecode (20 0 0 16 0 1 1 0 52 2 0 2 16 1 164 1 3 0 16 1 1 4 0 16 0 1 1 0 52 2 0 2 1 5 0 52 6 0 5 49 2 50)} {:library (sx harness-web) :op "import"}) :bytecode (51 1 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 51 39 0 128 38 0 5 51 41 0 128 40 0 5 51 43 0 128 42 0 5 51 45 0 128 44 0 5 51 47 0 128 46 0 5 51 49 0 128 48 0 5 51 51 0 128 50 0 5 51 53 0 128 52 0 5 1 54 0 112 50)))