assemblyscript/tests/compiler/ternary.optimized.wat
dcodeIO 16d1a833dd Always add a null function at table index zero
This allows function references (a table index internally) to be nullable
2018-09-17 01:48:35 +02:00

22 lines
388 B
Plaintext

(module
(type $v (func))
(global $ternary/a (mut i32) (i32.const 0))
(memory $0 0)
(export "memory" (memory $0))
(start $start)
(func $start (; 0 ;) (; has Stack IR ;) (type $v)
(set_global $ternary/a
(i32.const 1)
)
(set_global $ternary/a
(i32.const 1)
)
(set_global $ternary/a
(i32.const 1)
)
)
(func $null (; 1 ;) (; has Stack IR ;) (type $v)
(nop)
)
)