| 1 |
(module |
| 2 |
(type (;0;) (func)) |
| 3 |
(type (;1;) (func (param i32) (result funcref))) |
| 4 |
(type (;2;) (func (param i32) (result i32))) |
| 5 |
(import "G" "g" (global $g0 (;0;) i32)) |
| 6 |
(table $t (;0;) 10 funcref ref.null func) |
| 7 |
(memory $m (;0;) 1) |
| 8 |
(global $g1 (;1;) i32 i32.const 8) |
| 9 |
(global $g2 (;2;) i32 global.get $g0) |
| 10 |
(global $g3 (;3;) i32 global.get $g1) |
| 11 |
(global $gf (;4;) funcref ref.func $f) |
| 12 |
(export "get-elem" (func 1)) |
| 13 |
(export "get-data" (func 2)) |
| 14 |
(elem (;0;) (table $t) (global.get $g2) funcref (ref.func $f)) |
| 15 |
(elem (;1;) (table $t) (global.get $g3) funcref (global.get $gf)) |
| 16 |
(func $f (;0;) (type 0)) |
| 17 |
(func (;1;) (type 1) (param $i i32) (result funcref) |
| 18 |
local.get $i |
| 19 |
table.get $t |
| 20 |
) |
| 21 |
(func (;2;) (type 2) (param $i i32) (result i32) |
| 22 |
local.get $i |
| 23 |
i32.load |
| 24 |
) |
| 25 |
(data (;0;) (global.get $g2) "DDDD") |
| 26 |
(data (;1;) (global.get $g3) "\88\88\88\88") |
| 27 |
) |