Files
rose-ash/shared/static/wasm/sx/text-layout.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
10 KiB
Plaintext

(sxbc 1 "715f229a1855c912"
(code
:constants ("sublist" {:upvalue-count 0 :arity 3 :constants ({:upvalue-count 3 :arity 3 :constants (">=" "reverse" "empty?" 1) :bytecode (16 0 18 0 52 0 0 2 33 9 0 16 2 52 1 0 1 32 66 0 16 1 52 2 0 1 33 9 0 16 2 52 1 0 1 32 48 0 16 0 18 1 52 0 0 2 33 22 0 18 2 16 0 1 3 0 160 16 1 170 16 1 169 16 2 172 49 3 32 15 0 18 2 16 0 1 3 0 160 16 1 170 16 2 49 3 50)} 0 "list") :bytecode (2 17 3 51 0 0 1 2 1 1 1 3 17 3 16 3 1 1 0 16 0 52 2 0 0 49 3 50)} "measure-text" {:upvalue-count 0 :arity 3 :constants (text-measure "list") :bytecode (1 0 0 16 0 16 1 16 2 52 1 0 4 112 50)} "line-badness" {:upvalue-count 0 :arity 2 :constants (0 100000 1000) :bytecode (16 1 16 0 161 17 2 16 2 1 0 0 165 33 6 0 1 1 0 32 19 0 16 2 16 1 163 17 3 16 3 16 3 162 16 3 1 2 0 162 162 50)} "compute-demerits" {:upvalue-count 0 :arity 2 :constants (1) :bytecode (1 0 0 16 0 160 17 2 16 2 16 2 162 16 1 16 1 162 160 50)} "sum-widths" {:upvalue-count 0 :arity 4 :constants ({:upvalue-count 5 :arity 2 :constants (">=" 0 1 "max" "nth") :bytecode (16 0 18 0 52 0 0 2 33 29 0 1 1 0 18 0 18 1 161 1 2 0 161 52 3 0 2 17 2 16 1 16 2 18 2 162 160 32 21 0 18 3 16 0 1 2 0 160 16 1 18 4 16 0 52 4 0 2 160 49 2 50)} 0) :bytecode (2 17 4 51 0 0 1 3 1 2 1 1 1 4 1 0 17 4 16 4 16 2 1 1 0 49 2 50)} "find-breaks" {:upvalue-count 0 :arity 3 :constants (0 "<=" "list" {:upvalue-count 0 :arity 1 :constants (0 -1 "list" 999999999) :bytecode (16 0 1 0 0 164 33 13 0 1 0 0 1 1 0 52 2 0 2 32 10 0 1 3 0 1 1 0 52 2 0 2 50)} 1 "range" "map" {:upvalue-count 5 :arity 1 :constants ("nth" {:upvalue-count 8 :arity 1 :constants ("sum-widths" 1 1.15 "<=" "line-badness" 0 "compute-demerits" "nth" {:upvalue-count 3 :arity 2 :constants (1 "list") :bytecode (16 0 18 0 1 0 0 160 164 33 11 0 18 1 18 2 52 1 0 2 32 2 0 16 1 50)} "map-indexed") :bytecode (16 0 18 0 165 33 126 0 20 0 0 18 1 18 2 18 3 16 0 1 1 0 160 48 4 17 1 16 1 18 4 1 2 0 162 52 3 0 2 33 88 0 20 4 0 16 1 18 4 48 2 17 2 1 5 0 17 3 18 5 20 6 0 16 2 16 3 48 2 160 17 4 18 6 16 0 1 1 0 160 52 7 0 2 17 5 16 4 16 5 169 165 33 20 0 51 8 0 1 0 1 4 0 3 18 6 52 9 0 2 19 6 32 1 0 2 5 18 7 16 0 1 1 0 160 49 1 32 1 0 2 32 1 0 2 50)}) :bytecode (18 0 16 0 52 0 0 2 169 17 1 2 17 2 51 1 0 0 1 0 2 0 3 1 0 0 4 1 1 0 0 1 2 17 2 16 2 16 0 49 1 50)} "for-each" {:upvalue-count 2 :arity 2 :constants ("nth" 1 0 "<=") :bytecode (18 0 16 0 52 0 0 2 1 1 0 52 0 0 2 17 2 16 2 1 2 0 52 3 0 2 33 5 0 16 1 32 11 0 18 1 16 2 16 2 16 1 172 49 2 50)}) :bytecode (16 0 168 17 3 16 3 1 0 0 52 1 0 2 33 7 0 52 2 0 0 32 65 0 51 3 0 16 3 1 4 0 160 52 5 0 1 52 6 0 2 17 4 51 7 0 1 4 1 3 1 0 1 1 1 2 16 3 52 5 0 1 52 8 0 2 5 2 17 5 51 9 0 1 4 1 5 17 5 16 5 16 3 52 2 0 0 49 2 50)} "break-lines" {:upvalue-count 0 :arity 3 :constants ("find-breaks" 0 "list" "append" {:upvalue-count 1 :arity 2 :constants ("nth" "list") :bytecode (16 1 18 0 16 0 52 0 0 2 52 1 0 2 50)} "map-indexed") :bytecode (20 0 0 16 0 16 1 16 2 48 3 17 3 16 0 168 17 4 16 4 1 1 0 164 33 7 0 52 2 0 0 32 34 0 1 1 0 16 3 172 17 5 16 5 170 16 4 52 2 0 1 52 3 0 2 17 6 51 4 0 1 6 16 5 52 5 0 2 50)} "break-lines-greedy" {:upvalue-count 0 :arity 3 :constants (0 "list" {:upvalue-count 6 :arity 1 :constants ("nth" "+" "list" "append") :bytecode (18 0 16 0 52 0 0 2 17 1 16 0 18 1 164 33 5 0 16 1 32 10 0 18 2 18 3 16 1 52 1 0 3 17 2 16 2 18 4 166 6 33 7 0 5 16 0 18 1 164 167 33 33 0 18 5 18 1 16 0 52 2 0 2 52 2 0 1 52 3 0 2 19 5 5 16 0 19 1 5 16 1 19 2 32 4 0 16 2 19 2 50)} "range" "for-each" "append") :bytecode (16 0 168 17 3 16 3 1 0 0 164 33 7 0 52 1 0 0 32 60 0 52 1 0 0 17 4 1 0 0 17 5 1 0 0 17 6 51 2 0 1 0 1 5 1 6 1 1 1 2 1 4 16 3 52 3 0 1 52 4 0 2 5 16 4 16 5 16 3 52 1 0 2 52 1 0 1 52 5 0 2 50)} "position-line" {:upvalue-count 0 :arity 5 :constants ({:upvalue-count 5 :arity 3 :constants (">=" "reverse" "nth" 1 "+" "width" "x" "y" "word") :bytecode (16 0 18 0 168 52 0 0 2 33 9 0 16 2 52 1 0 1 32 66 0 18 0 16 0 52 2 0 2 17 3 18 1 16 0 52 2 0 2 17 4 18 2 16 0 1 3 0 160 16 1 16 4 18 3 52 4 0 3 1 5 0 16 4 1 6 0 16 1 1 7 0 18 4 1 8 0 16 3 65 4 0 16 2 172 49 3 50)} 0 "list") :bytecode (2 17 5 51 0 0 1 0 1 1 1 5 1 2 1 4 17 5 16 5 1 1 0 16 3 52 2 0 0 49 3 50)} "position-lines" {:upvalue-count 0 :arity 7 :constants ({:upvalue-count 6 :arity 2 :constants (1 "nth" "sublist" "position-line") :bytecode (16 1 169 17 2 16 1 1 0 0 52 1 0 2 17 3 18 0 16 0 18 1 162 160 17 4 20 2 0 18 2 16 2 16 3 48 3 17 5 20 2 0 18 3 16 2 16 3 48 3 17 6 20 3 0 16 5 16 6 18 4 18 5 16 4 49 5 50)} "map-indexed") :bytecode (51 0 0 1 6 1 4 1 0 1 1 1 3 1 5 16 2 52 1 0 2 50)} "pretext-position-line" {:upvalue-count 0 :arity 3 :constants ({:upvalue-count 4 :arity 3 :constants (">=" 1 "nth" "+" "width" "x" "word" "list" "append") :bytecode (16 0 18 0 168 52 0 0 2 33 5 0 16 2 32 66 0 18 1 16 0 1 1 0 160 16 1 18 2 16 0 52 2 0 2 18 3 52 3 0 3 16 2 1 4 0 18 2 16 0 52 2 0 2 1 5 0 16 1 1 6 0 18 0 16 0 52 2 0 2 65 3 0 52 7 0 1 52 8 0 2 49 3 50)} 0 "list") :bytecode (2 17 3 51 0 0 1 0 1 3 1 1 1 2 17 3 16 3 1 1 0 1 1 0 52 2 0 0 49 3 50)} "pretext-layout-lines" {:upvalue-count 0 :arity 6 :constants ({:upvalue-count 7 :arity 1 :constants ("nth" 1 "sublist" {:upvalue-count 2 :arity 2 :constants (">=" 1 "nth") :bytecode (16 0 18 0 168 52 0 0 2 33 5 0 16 1 32 21 0 18 1 16 0 1 1 0 160 16 1 18 0 16 0 52 2 0 2 160 49 2 50)} 0 "max" "y" "words" "pretext-position-line") :bytecode (18 0 16 0 52 0 0 2 17 1 16 0 18 1 162 17 2 16 1 169 17 3 16 1 1 1 0 52 0 0 2 17 4 20 2 0 18 2 16 3 16 4 48 3 17 5 20 2 0 18 3 16 3 16 4 48 3 17 6 2 17 7 51 3 0 1 6 1 7 17 7 16 7 1 4 0 1 4 0 48 2 17 7 1 1 0 16 5 168 1 1 0 161 52 5 0 2 17 8 16 0 18 4 1 1 0 161 164 17 9 16 9 33 5 0 18 5 32 8 0 18 6 16 7 161 16 8 163 17 10 1 6 0 16 2 1 7 0 20 8 0 16 5 16 6 16 10 48 3 65 2 0 50)} "range" "map") :bytecode (16 2 168 17 6 51 0 0 1 2 1 5 1 0 1 1 1 6 1 3 1 4 16 6 52 1 0 1 52 2 0 2 50)} "make-hyphenation-trie" {:upvalue-count 0 :arity 1 :constants ("children" "levels" "list" {:upvalue-count 1 :arity 1 :constants ("list" 0 {:upvalue-count 3 :arity 1 :constants ("char-code" 48 ">=" 57 "<=" "parse-number" "list" "append" 0) :bytecode (16 0 52 0 0 1 1 1 0 52 2 0 2 6 33 14 0 5 16 0 52 0 0 1 1 3 0 52 4 0 2 33 11 0 16 0 52 5 0 1 19 0 32 35 0 18 1 16 0 52 6 0 1 52 7 0 2 19 1 5 18 2 18 0 52 6 0 1 52 7 0 2 19 2 5 1 8 0 19 0 50)} {:upvalue-count 1 :arity 1 :constants ("char-at") :bytecode (18 0 16 0 52 0 0 2 50)} "range" "map" "for-each" "append" {:upvalue-count 3 :arity 2 :constants (">=" "levels" "dict-set!" "nth" "children" "get" "has-key?" "list" 1) :bytecode (16 1 18 0 168 52 0 0 2 33 14 0 16 0 1 1 0 18 1 52 2 0 3 32 80 0 18 0 16 1 52 3 0 2 17 2 16 0 1 4 0 52 5 0 2 17 3 16 3 16 2 52 6 0 2 167 33 27 0 16 3 16 2 1 4 0 65 0 0 1 1 0 52 7 0 0 65 2 0 52 2 0 3 32 1 0 2 5 18 2 16 3 16 2 52 5 0 2 16 1 1 8 0 160 49 2 50)}) :bytecode (52 0 0 0 17 1 52 0 0 0 17 2 1 1 0 17 3 51 2 0 1 3 1 1 1 2 51 3 0 1 0 16 0 168 52 4 0 1 52 5 0 2 52 6 0 2 5 16 2 16 3 52 0 0 1 52 7 0 2 17 2 5 2 17 4 51 8 0 1 1 1 2 1 4 17 4 16 4 18 0 1 1 0 49 2 50)} "for-each") :bytecode (1 0 0 65 0 0 1 1 0 52 2 0 0 65 2 0 17 1 51 3 0 1 1 16 0 52 4 0 2 5 16 1 50)} "find-hyphenation-points" {:upvalue-count 0 :arity 2 :constants ("." "str" 2 {:upvalue-count 0 :arity 1 :constants (0) :bytecode (1 0 0 50)} 1 "range" "map" {:upvalue-count 5 :arity 1 :constants ({:upvalue-count 6 :arity 2 :constants ("char-at" "children" "get" "has-key?" "levels" "empty?" {:upvalue-count 4 :arity 1 :constants (1 "nth" {:upvalue-count 3 :arity 2 :constants () :bytecode (16 0 18 0 18 1 160 164 33 5 0 18 2 32 2 0 16 1 50)} "map-indexed") :bytecode (18 0 16 0 160 18 1 1 0 0 160 165 33 55 0 18 2 18 0 16 0 160 52 1 0 2 17 1 18 3 16 0 52 1 0 2 17 2 16 2 16 1 166 33 20 0 51 2 0 0 0 1 0 1 2 18 2 52 3 0 2 19 2 32 1 0 2 32 1 0 2 50)} "range" "for-each" 1) :bytecode (16 1 18 0 165 33 116 0 18 1 16 1 52 0 0 2 17 2 16 0 1 1 0 52 2 0 2 17 3 16 3 16 2 52 3 0 2 33 80 0 16 3 16 2 52 2 0 2 17 4 16 4 1 4 0 52 2 0 2 52 5 0 1 167 33 36 0 16 4 1 4 0 52 2 0 2 17 5 51 6 0 0 2 0 3 0 4 1 5 16 5 168 52 7 0 1 52 8 0 2 32 1 0 2 5 18 5 16 4 16 1 1 9 0 160 49 2 32 1 0 2 32 1 0 2 50)}) :bytecode (2 17 1 51 0 0 0 0 0 1 1 0 0 2 0 3 1 1 17 1 16 1 18 4 16 0 49 2 50)} "for-each" {:upvalue-count 2 :arity 1 :constants (1 "nth" 2 "mod") :bytecode (16 0 1 0 0 166 6 33 34 0 5 16 0 18 0 1 0 0 161 165 6 33 20 0 5 18 1 16 0 52 1 0 2 1 2 0 52 3 0 2 1 0 0 164 50)} "filter") :bytecode (16 1 168 17 2 1 0 0 16 1 1 0 0 52 1 0 3 17 3 16 2 1 2 0 160 17 4 51 3 0 16 2 1 4 0 160 52 5 0 1 52 6 0 2 17 5 51 7 0 1 4 1 3 1 2 1 5 1 0 16 4 52 5 0 1 52 8 0 2 5 51 9 0 1 2 1 5 16 2 1 4 0 160 52 5 0 1 52 10 0 2 50)} "hyphenate-word" {:upvalue-count 0 :arity 2 :constants ("find-hyphenation-points" "empty?" "list" 0 "append" {:upvalue-count 2 :arity 2 :constants ("nth" "slice") :bytecode (18 0 16 1 18 1 16 0 52 0 0 2 52 1 0 3 50)} "map-indexed") :bytecode (20 0 0 16 0 16 1 48 2 17 2 16 2 52 1 0 1 33 9 0 16 1 52 2 0 1 32 36 0 1 3 0 16 2 172 17 3 16 2 16 1 168 52 2 0 1 52 4 0 2 17 4 51 5 0 1 1 1 4 16 3 52 6 0 2 50)} "layout-paragraph" {:upvalue-count 0 :arity 5 :constants ({:upvalue-count 2 :arity 1 :constants ("measure-text") :bytecode (20 0 0 18 0 18 1 16 0 49 3 50)} "map" {:upvalue-count 0 :arity 1 :constants ("width" "get") :bytecode (16 0 1 0 0 52 1 0 2 50)} "empty?" "height" "get" 1.4 "measure-text" " " "width" "break-lines" "position-lines" 0 "lines" "line-height" "font-height" "line-ranges") :bytecode (51 0 0 1 1 1 2 16 0 52 1 0 2 17 5 51 2 0 16 5 52 1 0 2 17 6 16 5 52 3 0 1 33 5 0 16 2 32 10 0 16 5 169 1 4 0 52 5 0 2 17 7 16 7 16 4 6 34 4 0 5 1 6 0 162 17 8 20 7 0 16 1 16 2 1 8 0 48 3 17 9 16 9 1 9 0 52 5 0 2 17 10 20 10 0 16 6 16 10 16 3 48 3 17 11 20 11 0 16 0 16 6 20 10 0 16 6 16 10 16 3 48 3 16 10 16 8 1 12 0 1 12 0 48 7 17 12 1 13 0 16 12 1 9 0 16 3 1 14 0 16 8 1 15 0 16 7 1 16 0 16 11 1 4 0 16 11 168 16 8 162 65 6 0 50)} "typeset-plain" {:upvalue-count 0 :arity 4 :constants (" " "split" "layout-paragraph" 1.4) :bytecode (16 0 1 0 0 52 1 0 2 17 4 20 2 0 16 4 16 1 16 2 16 3 1 3 0 49 5 50)} "typeset" {:upvalue-count 0 :arity 5 :constants (" " "split" "serif" 16 600 1.4 "layout-paragraph") :bytecode (16 0 1 0 0 52 1 0 2 17 5 16 1 6 34 4 0 5 1 2 0 17 6 16 2 6 34 4 0 5 1 3 0 17 7 16 3 6 34 4 0 5 1 4 0 17 8 16 4 6 34 4 0 5 1 5 0 17 9 20 6 0 16 5 16 6 16 7 16 8 16 9 49 5 50)} {:library (sx text-layout) :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 1 36 0 112 50)))