assemblyscript/tests/compiler/void.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

19 lines
358 B
Plaintext

(module
(type $i (func (result i32)))
(type $v (func))
(memory $0 0)
(export "memory" (memory $0))
(start $start)
(func $void/anInt (; 0 ;) (; has Stack IR ;) (type $i) (result i32)
(i32.const 2)
)
(func $start (; 1 ;) (; has Stack IR ;) (type $v)
(drop
(call $void/anInt)
)
)
(func $null (; 2 ;) (; has Stack IR ;) (type $v)
(nop)
)
)