summaryrefslogtreecommitdiff
path: root/test/roundtrip/generate-from-export-name.txt
blob: a3546cf149ca49412ecf4617fcd82d0b8fedacac (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
32
33
34
35
36
37
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --debug-names --generate-names

(module
  (func (export "my_func"))
  (table (export "my_table") 1 funcref)
  (memory (export "my_memory") 1)
  (global (export "my_global") i32 (i32.const 1))

  ;; Handle name collisions
  (func $foo (result i32)
    (i32.const 123))
  (func $foo_1 (result i32)
    (i32.const 456))
  (func (export "foo") (result i32)
    (i32.const 789))
)
(;; STDOUT ;;;
(module
  (type $t0 (func))
  (type $t1 (func (result i32)))
  (func $my_func (type $t0))
  (func $foo (type $t1) (result i32)
    i32.const 123)
  (func $foo_1 (type $t1) (result i32)
    i32.const 456)
  (func $foo_2 (type $t1) (result i32)
    i32.const 789)
  (table $my_table 1 funcref)
  (memory $my_memory 1)
  (global $my_global i32 (i32.const 1))
  (export "my_func" (func $my_func))
  (export "my_table" (table $my_table))
  (export "my_memory" (memory $my_memory))
  (export "my_global" (global $my_global))
  (export "foo" (func $foo_2)))
;;; STDOUT ;;)