Debian Codegraph @

tests/cli/gc/gc-i31.wast

raw
1 ;; RUN: wast --assert default --snapshot tests/snapshots %
2
3 ;; --enable-gc
4
5 (module
6 (func $f (result i32 i32)
7 (local $a (ref i31))
8 (local $b (ref null i31))
9 (local $c i31ref)
10
11 (local.set $a (ref.i31 (i32.const 42)))
12 (local.set $b (ref.i31 (i32.const 0)))
13 (i31.get_u (local.get $a))
14 (i31.get_s (local.get $b))
15 )
16 )