← board

WebAssembly frontend — statically typed, IR-shaped; experimental

Why this one is actually compilable

Unlike JS ([[feature-js-frontend-parked]]), wasm is exactly the shape the shared IR eats: statically typed (i32/i64/f32/f64 map 1:1 onto existing TTypeKinds), a validated stack machine (the Whitespace probe already proved stack-discipline folds into AST expression trees at parse time), structured control flow (block/loop/if/br map onto AN_IF/AN_WHILE/ AN_BREAK-family — no irreducible CFGs by construction), linear memory (one big byte array + load/store = the raw-pointer math the C frontend does all day). MVP wasm has no GC, no exceptions, no threads.

Honest scope notes (why "trivial-adjacent", not trivial)

Skeleton scope (if/when picked up — esoteric-probe sized)

.wat subset: (module (func (export ...) (param i64...) (result i64) local.get/set, i64.const, i64.add/sub/mul/div_s, i64.eq/lt_s/gt_s, block/ loop/if/else/end, br/br_if, call, return)) + one debug-print import. Lower onto existing AN_*/IR only; x86-64 only; test wired into make test next to the other probe skeletons. Everything else (memories, globals, tables, f32/f64, .wasm binary decoding, WASI) stays out until wanted.

Log