| 1 |
(module |
| 2 |
(type (;0;) (func)) |
| 3 |
(type (;1;) (func (param i32) (result externref))) |
| 4 |
(type (;2;) (func (param i32) (result funcref))) |
| 5 |
(type (;3;) (func (param i64) (result funcref))) |
| 6 |
(type (;4;) (func (param i32 externref))) |
| 7 |
(type (;5;) (func (param i32 funcref))) |
| 8 |
(type (;6;) (func (param i32 i32))) |
| 9 |
(type (;7;) (func (param i64 funcref))) |
| 10 |
(type (;8;) (func (param i32) (result i32))) |
| 11 |
(table $t2 (;0;) 1 externref) |
| 12 |
(table $t3 (;1;) 2 funcref) |
| 13 |
(table $t64 (;2;) i64 2 funcref) |
| 14 |
(export "get-externref" (func 1)) |
| 15 |
(export "get-funcref" (func $f3)) |
| 16 |
(export "get-funcref-t64" (func $f4)) |
| 17 |
(export "set-externref" (func 4)) |
| 18 |
(export "set-funcref" (func 5)) |
| 19 |
(export "set-funcref-from" (func 6)) |
| 20 |
(export "set-funcref-t64" (func 7)) |
| 21 |
(export "is_null-funcref" (func 8)) |
| 22 |
(elem (;0;) (table $t3) (i32.const 1) func $dummy) |
| 23 |
(func $dummy (;0;) (type 0)) |
| 24 |
(func (;1;) (type 1) (param $i i32) (result externref) |
| 25 |
local.get $i |
| 26 |
table.get $t2 |
| 27 |
) |
| 28 |
(func $f3 (;2;) (type 2) (param $i i32) (result funcref) |
| 29 |
local.get $i |
| 30 |
table.get $t3 |
| 31 |
) |
| 32 |
(func $f4 (;3;) (type 3) (param $i i64) (result funcref) |
| 33 |
local.get $i |
| 34 |
table.get $t64 |
| 35 |
) |
| 36 |
(func (;4;) (type 4) (param $i i32) (param $r externref) |
| 37 |
local.get $i |
| 38 |
local.get $r |
| 39 |
table.set $t2 |
| 40 |
) |
| 41 |
(func (;5;) (type 5) (param $i i32) (param $r funcref) |
| 42 |
local.get $i |
| 43 |
local.get $r |
| 44 |
table.set $t3 |
| 45 |
) |
| 46 |
(func (;6;) (type 6) (param $i i32) (param $j i32) |
| 47 |
local.get $i |
| 48 |
local.get $j |
| 49 |
table.get $t3 |
| 50 |
table.set $t3 |
| 51 |
) |
| 52 |
(func (;7;) (type 7) (param $i i64) (param $r funcref) |
| 53 |
local.get $i |
| 54 |
local.get $r |
| 55 |
table.set $t64 |
| 56 |
) |
| 57 |
(func (;8;) (type 8) (param $i i32) (result i32) |
| 58 |
local.get $i |
| 59 |
call $f3 |
| 60 |
ref.is_null |
| 61 |
) |
| 62 |
) |