3 (module (func) (export "a" (func 0)))
4 (module (func) (export "a" (func 0)) (export "b" (func 0)))
5 (module (func) (func) (export "a" (func 0)) (export "b" (func 1)))
7 (module (func (export "a")))
8 (module (func $a (export "a")))
11 (export "e" (func $f))
12 (func $f (param $n i32) (result i32)
13 (return (i32.add (get_local $n) (i32.const 1)))
16 (assert_return (invoke "e" (i32.const 42)) (i32.const 43))
17 (assert_return (invoke $Func "e" (i32.const 42)) (i32.const 43))
20 (assert_return (invoke $Func "e" (i32.const 42)) (i32.const 43))
23 (module (func) (export "a" (func 1)))
27 (module (func) (export "a" (func 0)) (export "a" (func 0)))
28 "duplicate export name"
31 (module (func) (func) (export "a" (func 0)) (export "a" (func 1)))
32 "duplicate export name"
35 (module (func) (global i32 (i32.const 0)) (export "a" (func 0)) (export "a" (global 0)))
36 "duplicate export name"
39 (module (func) (table 0 anyfunc) (export "a" (func 0)) (export "a" (table 0)))
40 "duplicate export name"
43 (module (func) (memory 0) (export "a" (func 0)) (export "a" (memory 0)))
44 "duplicate export name"
50 (module (global i32 (i32.const 0)) (export "a" (global 0)))
51 (module (global i32 (i32.const 0)) (export "a" (global 0)) (export "b" (global 0)))
52 (module (global i32 (i32.const 0)) (global i32 (i32.const 0)) (export "a" (global 0)) (export "b" (global 1)))
54 (module (global (export "a") i32 (i32.const 0)))
55 (module (global $a (export "a") i32 (i32.const 0)))
58 (export "e" (global $g))
59 (global $g i32 (i32.const 42))
61 (assert_return (get "e") (i32.const 42))
62 (assert_return (get $Global "e") (i32.const 42))
65 (assert_return (get $Global "e") (i32.const 42))
68 (module (global i32 (i32.const 0)) (export "a" (global 1)))
72 (module (global i32 (i32.const 0)) (export "a" (global 0)) (export "a" (global 0)))
73 "duplicate export name"
76 (module (global i32 (i32.const 0)) (global i32 (i32.const 0)) (export "a" (global 0)) (export "a" (global 1)))
77 "duplicate export name"
80 (module (global i32 (i32.const 0)) (func) (export "a" (global 0)) (export "a" (func 0)))
81 "duplicate export name"
84 (module (global i32 (i32.const 0)) (table 0 anyfunc) (export "a" (global 0)) (export "a" (table 0)))
85 "duplicate export name"
88 (module (global i32 (i32.const 0)) (memory 0) (export "a" (global 0)) (export "a" (memory 0)))
89 "duplicate export name"
95 (module (table 0 anyfunc) (export "a" (table 0)))
96 (module (table 0 anyfunc) (export "a" (table 0)) (export "b" (table 0)))
97 ;; No multiple tables yet.
98 ;; (module (table 0 anyfunc) (table 0 anyfunc) (export "a" (table 0)) (export "b" (table 1)))
100 (module (table (export "a") 0 anyfunc))
101 (module (table (export "a") 0 1 anyfunc))
102 (module (table $a (export "a") 0 anyfunc))
103 (module (table $a (export "a") 0 1 anyfunc))
105 (; TODO: access table ;)
108 (module (table 0 anyfunc) (export "a" (table 1)))
112 (module (table 0 anyfunc) (export "a" (table 0)) (export "a" (table 0)))
113 "duplicate export name"
115 ;; No multiple tables yet.
117 ;; (module (table 0 anyfunc) (table 0 anyfunc) (export "a" (table 0)) (export "a" (table 1)))
118 ;; "duplicate export name"
121 (module (table 0 anyfunc) (func) (export "a" (table 0)) (export "a" (func 0)))
122 "duplicate export name"
125 (module (table 0 anyfunc) (global i32 (i32.const 0)) (export "a" (table 0)) (export "a" (global 0)))
126 "duplicate export name"
129 (module (table 0 anyfunc) (memory 0) (export "a" (table 0)) (export "a" (memory 0)))
130 "duplicate export name"
136 (module (memory 0) (export "a" (memory 0)))
137 (module (memory 0) (export "a" (memory 0)) (export "b" (memory 0)))
138 ;; No multiple memories yet.
139 ;; (module (memory 0) (memory 0) (export "a" (memory 0)) (export "b" (memory 1)))
141 (module (memory (export "a") 0))
142 (module (memory (export "a") 0 1))
143 (module (memory $a (export "a") 0))
144 (module (memory $a (export "a") 0 1))
146 (; TODO: access memory ;)
149 (module (memory 0) (export "a" (memory 1)))
153 (module (memory 0) (export "a" (memory 0)) (export "a" (memory 0)))
154 "duplicate export name"
156 ;; No multiple memories yet.
158 ;; (module (memory 0) (memory 0) (export "a" (memory 0)) (export "a" (memory 1)))
159 ;; "duplicate export name"
162 (module (memory 0) (func) (export "a" (memory 0)) (export "a" (func 0)))
163 "duplicate export name"
166 (module (memory 0) (global i32 (i32.const 0)) (export "a" (memory 0)) (export "a" (global 0)))
167 "duplicate export name"
170 (module (memory 0) (table 0 anyfunc) (export "a" (memory 0)) (export "a" (table 0)))
171 "duplicate export name"