Files
gyehoek-hs/golden/arith/out.wat
T
2026-07-12 12:33:46 -06:00

39 lines
711 B
WebAssembly Text Format

(module
(type (sub (struct (field (mut i32)))))
(func
(param)
(result (ref eq))
(local (ref eq) (ref eq) (ref eq) (ref eq) (ref eq))
(i32.const 3)
ref.i31
(ref.cast (ref i31))
i31.get_s
(i32.const 4)
ref.i31
(ref.cast (ref i31))
i31.get_s
i32.mul
ref.i31
(local.set 0)
(i32.const 2)
ref.i31
(ref.cast (ref i31))
i31.get_s
(i32.const 5)
ref.i31
(ref.cast (ref i31))
i31.get_s
i32.mul
ref.i31
(local.set 1)
(local.get 0)
(ref.cast (ref i31))
i31.get_s
(local.get 1)
(ref.cast (ref i31))
i31.get_s
i32.add
ref.i31
(local.set 2)
(local.get 2))
(export "main" (func 0)))