code wiki / (root) / _loop_kat.nx

_loop_kat.nx source

↩ module page · 11 lines · 336 B

1// _loop_kat.nx -- minimal loop through the sovereign wat path: sum 0..4 = 10. If node hangs/wrong, the 2// sovereign wat emitter miscompiles while-loops (CFG/br_table) -- the gap blocking the renderer. 3func main() -> i64 { 4 var s: i64 = 0 5 var i: i64 = 0 6 while i < 5 { 7 s = s + i 8 i = i + 1 9 } 10 return s 11}