Files
rose-ash/shared/static/wasm/sx/hs-integration.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
4.7 KiB
Plaintext

(sxbc 1 "ba90ab33541c30a0"
(code
:constants ("hs-collect-vars" {:upvalue-count 0 :arity 4 :constants ("list" beingTold me it event you yourself {:upvalue-count 3 :arity 1 :constants ("list?" 1 set! "nth" "symbol?" {:upvalue-count 1 :arity 1 :constants () :bytecode (16 0 18 0 164 50)} "some" "for-each") :bytecode (16 0 52 0 0 1 33 110 0 16 0 168 1 1 0 166 6 33 26 0 5 16 0 169 1 2 0 164 6 33 14 0 5 16 0 1 1 0 52 3 0 2 52 4 0 1 33 57 0 16 0 1 1 0 52 3 0 2 17 1 51 5 0 1 1 18 0 52 6 0 2 167 6 33 13 0 5 51 5 0 1 1 18 1 52 6 0 2 167 33 10 0 16 1 18 0 172 19 0 32 1 0 2 32 1 0 2 5 18 2 16 0 52 7 0 2 32 1 0 2 50)}) :bytecode (52 0 0 0 17 1 5 1 1 0 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 52 0 0 6 17 2 5 51 7 0 1 1 1 2 1 3 17 3 5 16 3 16 0 48 1 5 16 1 50)} "hs-handler" {:upvalue-count 0 :arity 1 :constants ("hs-to-sx-from-source" "hs-collect-vars" {:upvalue-count 0 :arity 1 :constants ("eval-expr-cek" define "list") :bytecode (20 0 0 1 1 0 16 0 2 52 2 0 3 49 1 50)} "for-each" guard _e true if and list? "list" = first "hs-return" nth 1 raise "eval-expr-cek" fn me let beingTold it event) :bytecode (20 0 0 16 0 48 1 17 1 20 1 0 16 1 48 1 17 2 51 2 0 16 2 52 3 0 2 5 1 4 0 1 5 0 1 6 0 1 7 0 1 8 0 1 9 0 1 5 0 52 10 0 2 1 11 0 1 12 0 1 5 0 52 10 0 2 1 13 0 52 10 0 3 52 10 0 3 1 14 0 1 5 0 1 15 0 52 10 0 3 1 16 0 1 5 0 52 10 0 2 52 10 0 4 52 10 0 2 52 10 0 2 16 1 52 10 0 3 17 3 20 17 0 1 18 0 1 19 0 52 10 0 1 1 20 0 1 21 0 1 19 0 52 10 0 2 1 22 0 2 52 10 0 2 1 23 0 2 52 10 0 2 52 10 0 3 16 3 52 10 0 3 52 10 0 3 49 1 50)} "hs-register-scripts!" {:upvalue-count 0 :arity 0 :constants ({:upvalue-count 0 :arity 1 :constants ("dom-get-data" "hs-script-loaded" "innerHTML" "host-get" "eval-expr-cek" "hs-to-sx-from-source" "dom-body") :bytecode (20 0 0 16 0 1 1 0 48 2 167 33 48 0 16 0 1 2 0 52 3 0 2 17 1 35 27 0 20 4 0 20 5 0 16 1 48 1 48 1 17 1 16 1 20 6 0 48 0 48 1 36 32 4 0 17 0 5 2 32 1 0 2 50)} "hs-query-all" "script[type=text/hyperscript]" "for-each") :bytecode (51 0 0 20 1 0 1 2 0 48 1 52 3 0 2 50)} "hs-scripting-disabled?" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "disable-scripting" "hs-scripting-disabled?" "dom-parent") :bytecode (16 0 2 164 33 4 0 4 32 29 0 20 0 0 16 0 1 1 0 48 2 33 4 0 3 32 12 0 20 2 0 20 3 0 16 0 48 1 49 1 50)} "hs-activate!" {:upvalue-count 0 :arity 1 :constants ("hs-register-scripts!" "dom-get-attr" "_" "dom-get-data" "hs-script" "hs-scripting-disabled?" "dom-dispatch" "hyperscript:before:init" "hs-log-event!" "hyperscript:init" "dom-set-data" "hs-active" "dom-set-attr" "data-hyperscript-powered" "true" "window" "host-global" "__hs_current_me" "host-set!" "hs-handler" "type" "component" {:upvalue-count 1 :arity 1 :constants ("host-call-fn" "list") :bytecode (20 0 0 18 0 16 0 52 1 0 1 49 2 50)} "text/hyperscript-template" "hs-query-all" "" "for-each" "hyperscript:parse-error" "errors" "list" "hyperscript:after:init") :bytecode (20 0 0 48 0 5 20 1 0 16 0 1 2 0 48 2 17 1 20 3 0 16 0 1 4 0 48 2 17 2 16 1 6 33 20 0 5 16 1 16 2 164 167 6 33 9 0 5 20 5 0 16 0 48 1 167 33 227 0 20 6 0 16 0 1 7 0 2 48 3 33 209 0 20 8 0 1 9 0 48 1 5 20 10 0 16 0 1 4 0 16 1 48 3 5 20 10 0 16 0 1 11 0 3 48 3 5 20 12 0 16 0 1 13 0 1 14 0 48 3 5 1 15 0 52 16 0 1 1 17 0 16 0 52 18 0 3 5 35 83 0 20 19 0 16 1 48 1 17 1 20 1 0 16 0 1 20 0 48 2 17 2 20 1 0 16 0 1 21 0 48 2 17 3 51 22 0 1 1 17 4 16 2 1 23 0 164 33 24 0 16 4 20 24 0 16 3 6 34 4 0 5 1 25 0 48 1 52 26 0 2 32 6 0 16 4 16 0 48 1 36 32 27 0 17 0 5 20 6 0 16 0 1 27 0 1 28 0 16 0 52 29 0 1 65 1 0 48 3 5 2 5 1 15 0 52 16 0 1 1 17 0 2 52 18 0 3 5 20 6 0 16 0 1 30 0 2 49 3 32 1 0 2 32 1 0 2 50)} "hs-deactivate!" {:upvalue-count 0 :arity 1 :constants ("dom-get-data" "hs-unlisteners" "list" {:upvalue-count 0 :arity 1 :constants () :bytecode (16 0 33 7 0 16 0 49 0 32 1 0 2 50)} "for-each" "dom-set-data" "hs-active" "hs-script") :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 5 0 5 52 2 0 0 17 1 51 3 0 16 1 52 4 0 2 5 20 5 0 16 0 1 1 0 52 2 0 0 48 3 5 20 5 0 16 0 1 6 0 4 48 3 5 20 5 0 16 0 1 7 0 2 49 3 50)} "hs-boot!" {:upvalue-count 0 :arity 0 :constants ("dom-query-all" "document" "host-global" "body" "host-get" "[_]" {:upvalue-count 0 :arity 1 :constants ("hs-activate!") :bytecode (20 0 0 16 0 49 1 50)} "for-each") :bytecode (20 0 0 1 1 0 52 2 0 1 1 3 0 52 4 0 2 1 5 0 48 2 17 0 51 6 0 16 0 52 7 0 2 50)} "hs-boot-subtree!" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "[_]" {:upvalue-count 0 :arity 1 :constants ("hs-activate!") :bytecode (20 0 0 16 0 49 1 50)} "for-each" "dom-get-attr" "_" "hs-activate!") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 51 2 0 16 1 52 3 0 2 5 20 4 0 16 0 1 5 0 48 2 33 10 0 20 6 0 16 0 49 1 32 1 0 2 50)}) :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 50)))