Debian Codegraph @

tests/cli/folding/fold-call-import-gen-names.wast

raw
1 ;; RUN: wast --assert default,snapshot-folded --snapshot tests/snapshots %
2
3 ;;; WABT fold-call-import-gen-names.wat test (Copyright 2016- WebAssembly Community Group participants)
4 (module
5 (import "a" "b" (func (param i32) (result i32)))
6
7 (func (export "c") (param i64) (result i32)
8 local.get 0
9 i32.wrap_i64)
10
11 ;; Make sure that calls are folded properly when referencing generated names
12 ;; (there was a bug here).
13
14 (func (result i32)
15 i32.const 1
16 call 0
17 i32.const 2
18 call 0
19 i32.add
20
21 i64.const 3
22 call 1
23 drop))