Debian Codegraph @

tests/cli/folding/fold-global-getset.wast

raw
1 ;; RUN: wast --assert default,snapshot-folded --snapshot tests/snapshots %
2
3 ;;; WABT fold-global-getset.wat test (Copyright 2016- WebAssembly Community Group participants)
4 (module
5 (global (mut i32) (i32.const 1))
6 (global (mut f32) (f32.const 1.5))
7
8 (func $fold-global-get (result i32)
9 global.get 1
10 drop
11 global.get 0
12 global.get 0
13 i32.mul)
14
15 (func $fold-global-set
16 global.get 0
17 i32.const 1
18 i32.add
19 global.set 0
20 f32.const 2
21 global.set 1)
22 )