blob: 4697a8f18fe6a8b170e34a0dd765aaad43cbbe3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
(module
(import "env" "imported" (func $imported (result i64)))
(import "env" "other" (func $other (param i32) (param i64) (param i64)))
(import "env" "ref-func-arg" (func $ref-func-arg (result i64)))
(export "func" (func $func))
(export "ref-func-test" (func $ref-func-test))
(export "imported" (func $imported))
(export "imported_again" (func $imported))
(export "other" (func $other))
(func $func (result i64)
(drop (call $imported))
(call $other
(i32.const 0)
(i64.const 0)
(i64.const 0)
)
(unreachable)
)
;; If an import is used in ref.func, even if it is legalized to another
;; import, the original import should not be removed.
(func $ref-func-test
(drop
(call $ref-func-arg)
)
(drop
(ref.func $ref-func-arg)
)
)
)
(module)
|