Debian Codegraph @

internal/integration_test/spectest/extended-const/testdata/data.wast

raw
1 ;; Extended contant expressions
2
3 (module
4 (memory 1)
5 (data (i32.add (i32.const 0) (i32.const 42)))
6 )
7
8 (module
9 (memory 1)
10 (data (i32.sub (i32.const 42) (i32.const 0)))
11 )
12
13 (module
14 (memory 1)
15 (data (i32.mul (i32.const 1) (i32.const 2)))
16 )
17
18 ;; Combining add, sub, mul and global.get
19
20 (module
21 (global (import "spectest" "global_i32") i32)
22 (memory 1)
23 (data (i32.mul
24 (i32.const 2)
25 (i32.add
26 (i32.sub (global.get 0) (i32.const 1))
27 (i32.const 2)
28 )
29 )
30 )
31 )