assemblyscript/tests/compiler/class-overloading.untouched.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

27 lines
583 B
Plaintext

(module
(type $iv (func (param i32)))
(type $v (func))
(global $HEAP_BASE i32 (i32.const 8))
(table 1 1 anyfunc)
(elem (i32.const 0) $null)
(memory $0 0)
(export "memory" (memory $0))
(export "test" (func $class-overloading/test))
(start $start)
(func $class-overloading/Foo#baz (; 0 ;) (type $iv) (param $0 i32)
(nop)
)
(func $class-overloading/test (; 1 ;) (type $iv) (param $0 i32)
(call $class-overloading/Foo#baz
(get_local $0)
)
)
(func $start (; 2 ;) (type $v)
(call $class-overloading/test
(i32.const 0)
)
)
(func $null (; 3 ;) (type $v)
)
)