| 1 |
(module $anyref_global_of_i31ref |
| 2 |
(type (;0;) (func (result i32 i32))) |
| 3 |
(type (;1;) (func (param i32))) |
| 4 |
(global $c (;0;) (ref null (shared any)) i32.const 1234 ref.i31_shared) |
| 5 |
(global $m (;1;) (mut (ref null (shared any))) i32.const 5678 ref.i31_shared) |
| 6 |
(export "get_globals" (func 0)) |
| 7 |
(export "set_global" (func 1)) |
| 8 |
(func (;0;) (type 0) (result i32 i32) |
| 9 |
global.get $c |
| 10 |
ref.cast (ref null (shared i31)) |
| 11 |
i31.get_u |
| 12 |
global.get $m |
| 13 |
ref.cast (ref null (shared i31)) |
| 14 |
i31.get_u |
| 15 |
) |
| 16 |
(func (;1;) (type 1) (param i32) |
| 17 |
local.get 0 |
| 18 |
ref.i31_shared |
| 19 |
global.set $m |
| 20 |
) |
| 21 |
) |