Debian Codegraph @

tests/snapshots/cli/folding/array.wast/13.print-folded

raw
1 (module
2 (type $vec (;0;) (array f32))
3 (type $mvec (;1;) (array (mut f32)))
4 (type (;2;) (func (result (ref $vec))))
5 (type (;3;) (func (param i32 (ref $vec)) (result f32)))
6 (type (;4;) (func (param i32) (result f32)))
7 (type (;5;) (func (param i32 (ref $mvec) f32) (result f32)))
8 (type (;6;) (func (param i32 f32) (result f32)))
9 (type (;7;) (func (param (ref array)) (result i32)))
10 (type (;8;) (func (result i32)))
11 (global (;0;) (ref $vec) (array.new_fixed $vec 2 (f32.const 0x1p+0 (;=1;)) (f32.const 0x1p+1 (;=2;))))
12 (export "new" (func $new))
13 (export "get" (func 2))
14 (export "set_get" (func 4))
15 (export "len" (func 6))
16 (func $new (;0;) (type 2) (result (ref $vec))
17 (array.new_fixed $vec 2
18 (f32.const 0x1p+0 (;=1;))
19 (f32.const 0x1p+1 (;=2;)))
20 )
21 (func $get (;1;) (type 3) (param $i i32) (param $v (ref $vec)) (result f32)
22 (array.get $vec
23 (local.get $v)
24 (local.get $i))
25 )
26 (func (;2;) (type 4) (param $i i32) (result f32)
27 (call $get
28 (local.get $i)
29 (call $new))
30 )
31 (func $set_get (;3;) (type 5) (param $i i32) (param $v (ref $mvec)) (param $y f32) (result f32)
32 (array.set $mvec
33 (local.get $v)
34 (local.get $i)
35 (local.get $y))
36 (array.get $mvec
37 (local.get $v)
38 (local.get $i))
39 )
40 (func (;4;) (type 6) (param $i i32) (param $y f32) (result f32)
41 (call $set_get
42 (local.get $i)
43 (array.new_fixed $mvec 3
44 (f32.const 0x1p+0 (;=1;))
45 (f32.const 0x1p+1 (;=2;))
46 (f32.const 0x1.8p+1 (;=3;)))
47 (local.get $y))
48 )
49 (func $len (;5;) (type 7) (param $v (ref array)) (result i32)
50 (array.len
51 (local.get $v))
52 )
53 (func (;6;) (type 8) (result i32)
54 (call $len
55 (call $new))
56 )
57 )