summaryrefslogtreecommitdiff
path: root/test/lit/merge/fusing.wat.second
blob: 387e57bb4ed53c839f61e10d768f8b2964168a79 (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
(module
  ;; Use the same internal name as in first, so $other.foo will need to be
  ;; deduplicated.
  (import "first" "foo" (func $other.foo))

  ;; Use a different prefix than in first ($main instead of $other).
  (import "first" "bar" (func $main.bar))

  (memory $second.mem 2)

  (export "mem" (memory $second.mem))

  (func $second.foo (export "foo")
    (call $other.foo)
    (drop
      (i32.const 3)
    )
  )

  ;; Use the same internal name as in first, so this will need to be
  ;; deduplicated.
  (func $bar (export "bar")
    (call $main.bar)
    (drop
      (i32.const 4)
    )
  )
)