summaryrefslogtreecommitdiff
path: root/test/spec/func.txt
blob: 25e9cf88979d6a6ffda26bfe67ca65490bc25d38 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
;;; TOOL: run-interp-spec
;;; STDIN_FILE: third_party/testsuite/func.wast
(;; STDOUT ;;;
out/test/spec/func.wast:436: assert_invalid passed:
  out/test/spec/func/func.2.wasm:000001a: error: function type variable out of range: 2 (max 2)
  000001a: error: OnFunction callback failed
out/test/spec/func.wast:448: assert_malformed passed:
  out/test/spec/func/func.3.wat:1:123: error: invalid func type index 2
  ...lt f64) (f64.const 1))(type $t (func (param i32)))(func (type 2) (param i32))
                                                        ^^^^
out/test/spec/func.wast:560: assert_malformed passed:
  out/test/spec/func/func.6.wat:1:76: error: unexpected token "param", expected an instr.
  ... i32) (result i32)))(func (type $sig) (result i32) (param i32) (i32.const 0))
                                                         ^^^^^
out/test/spec/func.wast:567: assert_malformed passed:
  out/test/spec/func/func.7.wat:1:63: error: unexpected token "type", expected an instr.
  ... i32) (result i32)))(func (param i32) (type $sig) (result i32) (i32.const 0))
                                            ^^^^
out/test/spec/func.wast:574: assert_malformed passed:
  out/test/spec/func/func.8.wat:1:76: error: unexpected token "type", expected an instr.
  ... i32) (result i32)))(func (param i32) (result i32) (type $sig) (i32.const 0))
                                                         ^^^^
out/test/spec/func.wast:581: assert_malformed passed:
  out/test/spec/func/func.9.wat:1:64: error: unexpected token "type", expected an instr.
  ... i32) (result i32)))(func (result i32) (type $sig) (param i32) (i32.const 0))
                                             ^^^^
out/test/spec/func.wast:588: assert_malformed passed:
  out/test/spec/func/func.10.wat:1:64: error: unexpected token "param", expected an instr.
  ... i32) (result i32)))(func (result i32) (param i32) (type $sig) (i32.const 0))
                                             ^^^^^
  out/test/spec/func/func.10.wat:1:85: error: unexpected token ), expected (.
  ... i32) (result i32)))(func (result i32) (param i32) (type $sig) (i32.const 0))
                                                                  ^
out/test/spec/func.wast:595: assert_malformed passed:
  out/test/spec/func/func.11.wat:1:21: error: unexpected token "param", expected an instr.
  (func (result i32) (param i32) (i32.const 0))
                      ^^^^^
out/test/spec/func.wast:602: assert_malformed passed:
  out/test/spec/func/func.12.wat:1:20: error: expected 0 results, got 1
  (type $sig (func))(func (type $sig) (result i32) (i32.const 0))
                     ^^^^
out/test/spec/func.wast:609: assert_malformed passed:
  out/test/spec/func/func.13.wat:1:45: error: expected 1 arguments, got 0
  ...g (func (param i32) (result i32)))(func (type $sig) (result i32) (i32.cons...
                                        ^^^^
out/test/spec/func.wast:616: assert_malformed passed:
  out/test/spec/func/func.14.wat:1:45: error: expected 1 results, got 0
  ...g (func (param i32) (result i32)))(func (type $sig) (param i32) (i32.const...
                                        ^^^^
out/test/spec/func.wast:623: assert_malformed passed:
  out/test/spec/func/func.15.wat:1:49: error: expected 2 arguments, got 1
  ...unc (param i32 i32) (result i32)))(func (type $sig) (param i32) (result i3...
                                        ^^^^
out/test/spec/func.wast:634: assert_invalid passed:
  out/test/spec/func/func.16.wasm:000001d: error: type mismatch in implicit return, expected [i64] but got [i32]
  000001d: error: EndFunctionBody callback failed
out/test/spec/func.wast:638: assert_invalid passed:
  out/test/spec/func/func.17.wasm:000001c: error: type mismatch in i32.eqz, expected [i32] but got [f32]
  000001c: error: OnConvertExpr callback failed
out/test/spec/func.wast:642: assert_invalid passed:
  out/test/spec/func/func.18.wasm:000001e: error: type mismatch in f64.neg, expected [f64] but got [i64]
  000001e: error: OnUnaryExpr callback failed
out/test/spec/func.wast:650: assert_invalid passed:
  out/test/spec/func/func.19.wasm:000001c: error: type mismatch in implicit return, expected [i64] but got [i32]
  000001c: error: EndFunctionBody callback failed
out/test/spec/func.wast:654: assert_invalid passed:
  out/test/spec/func/func.20.wasm:000001b: error: type mismatch in i32.eqz, expected [i32] but got [f32]
  000001b: error: OnConvertExpr callback failed
out/test/spec/func.wast:658: assert_invalid passed:
  out/test/spec/func/func.21.wasm:000001c: error: type mismatch in f64.neg, expected [f64] but got [i64]
  000001c: error: OnUnaryExpr callback failed
out/test/spec/func.wast:666: assert_invalid passed:
  out/test/spec/func/func.22.wasm:0000019: error: type mismatch in implicit return, expected [i32] but got []
  0000019: error: EndFunctionBody callback failed
out/test/spec/func.wast:670: assert_invalid passed:
  out/test/spec/func/func.23.wasm:0000019: error: type mismatch in implicit return, expected [i64] but got []
  0000019: error: EndFunctionBody callback failed
out/test/spec/func.wast:674: assert_invalid passed:
  out/test/spec/func/func.24.wasm:0000019: error: type mismatch in implicit return, expected [f32] but got []
  0000019: error: EndFunctionBody callback failed
out/test/spec/func.wast:678: assert_invalid passed:
  out/test/spec/func/func.25.wasm:0000019: error: type mismatch in implicit return, expected [f64] but got []
  0000019: error: EndFunctionBody callback failed
out/test/spec/func.wast:682: assert_invalid passed:
  out/test/spec/func/func.26.wasm:000001a: error: type mismatch in implicit return, expected [f64, i32] but got []
  000001a: error: EndFunctionBody callback failed
out/test/spec/func.wast:687: assert_invalid passed:
  out/test/spec/func/func.27.wasm:000001a: error: type mismatch in implicit return, expected [i32] but got []
  000001a: error: EndFunctionBody callback failed
out/test/spec/func.wast:693: assert_invalid passed:
  out/test/spec/func/func.28.wasm:000001b: error: type mismatch in implicit return, expected [i32, i32] but got []
  000001b: error: EndFunctionBody callback failed
out/test/spec/func.wast:699: assert_invalid passed:
  out/test/spec/func/func.29.wasm:000001a: error: type mismatch at end of function, expected [] but got [i32]
  000001a: error: EndFunctionBody callback failed
out/test/spec/func.wast:705: assert_invalid passed:
  out/test/spec/func/func.30.wasm:000001c: error: type mismatch at end of function, expected [] but got [i32, i64]
  000001c: error: EndFunctionBody callback failed
out/test/spec/func.wast:711: assert_invalid passed:
  out/test/spec/func/func.31.wasm:000001e: error: type mismatch in implicit return, expected [i32] but got [f32]
  000001e: error: EndFunctionBody callback failed
out/test/spec/func.wast:717: assert_invalid passed:
  out/test/spec/func/func.32.wasm:000001f: error: type mismatch in implicit return, expected [f32, f32] but got [f32]
  000001f: error: EndFunctionBody callback failed
out/test/spec/func.wast:723: assert_invalid passed:
  out/test/spec/func/func.33.wasm:0000023: error: type mismatch at end of function, expected [] but got [f32]
  0000023: error: EndFunctionBody callback failed
out/test/spec/func.wast:730: assert_invalid passed:
  out/test/spec/func/func.34.wasm:0000019: error: type mismatch in return, expected [i32] but got []
  0000019: error: OnReturnExpr callback failed
out/test/spec/func.wast:736: assert_invalid passed:
  out/test/spec/func/func.35.wasm:000001a: error: type mismatch in return, expected [i32, i32] but got []
  000001a: error: OnReturnExpr callback failed
out/test/spec/func.wast:742: assert_invalid passed:
  out/test/spec/func/func.36.wasm:000001a: error: type mismatch in return, expected [i32] but got []
  000001a: error: OnReturnExpr callback failed
out/test/spec/func.wast:748: assert_invalid passed:
  out/test/spec/func/func.37.wasm:000001b: error: type mismatch in return, expected [i32, i64] but got []
  000001b: error: OnReturnExpr callback failed
out/test/spec/func.wast:754: assert_invalid passed:
  out/test/spec/func/func.38.wasm:000001b: error: type mismatch in return, expected [i32] but got [i64]
  000001b: error: OnReturnExpr callback failed
out/test/spec/func.wast:760: assert_invalid passed:
  out/test/spec/func/func.39.wasm:000001c: error: type mismatch in return, expected [i64, i64] but got [i64]
  000001c: error: OnReturnExpr callback failed
out/test/spec/func.wast:767: assert_invalid passed:
  out/test/spec/func/func.40.wasm:0000019: error: type mismatch in return, expected [i32] but got []
  0000019: error: OnReturnExpr callback failed
out/test/spec/func.wast:773: assert_invalid passed:
  out/test/spec/func/func.41.wasm:000001a: error: type mismatch in return, expected [i32, i32] but got []
  000001a: error: OnReturnExpr callback failed
out/test/spec/func.wast:779: assert_invalid passed:
  out/test/spec/func/func.42.wasm:000001c: error: type mismatch in return, expected [i32, i32] but got [i32]
  000001c: error: OnReturnExpr callback failed
out/test/spec/func.wast:785: assert_invalid passed:
  out/test/spec/func/func.43.wasm:000001a: error: type mismatch in return, expected [i32] but got []
  000001a: error: OnReturnExpr callback failed
out/test/spec/func.wast:791: assert_invalid passed:
  out/test/spec/func/func.44.wasm:000001b: error: type mismatch in return, expected [i32, i32] but got []
  000001b: error: OnReturnExpr callback failed
out/test/spec/func.wast:797: assert_invalid passed:
  out/test/spec/func/func.45.wasm:000001b: error: type mismatch in return, expected [i32] but got [i64]
  000001b: error: OnReturnExpr callback failed
out/test/spec/func.wast:803: assert_invalid passed:
  out/test/spec/func/func.46.wasm:000001c: error: type mismatch in return, expected [i32, i32] but got [i64]
  000001c: error: OnReturnExpr callback failed
out/test/spec/func.wast:809: assert_invalid passed:
  out/test/spec/func/func.47.wasm:000001b: error: type mismatch in return, expected [i32] but got [i64]
  000001b: error: OnReturnExpr callback failed
out/test/spec/func.wast:815: assert_invalid passed:
  out/test/spec/func/func.48.wasm:000001c: error: type mismatch in return, expected [i32, i32] but got [i32]
  000001c: error: OnReturnExpr callback failed
out/test/spec/func.wast:822: assert_invalid passed:
  out/test/spec/func/func.49.wasm:000001a: error: type mismatch in br, expected [i32] but got []
  000001a: error: OnBrExpr callback failed
out/test/spec/func.wast:828: assert_invalid passed:
  out/test/spec/func/func.50.wasm:000001b: error: type mismatch in br, expected [i32, i32] but got []
  000001b: error: OnBrExpr callback failed
out/test/spec/func.wast:834: assert_invalid passed:
  out/test/spec/func/func.51.wasm:000001f: error: type mismatch in br, expected [i32] but got [f32]
  000001f: error: OnBrExpr callback failed
out/test/spec/func.wast:840: assert_invalid passed:
  out/test/spec/func/func.52.wasm:000001d: error: type mismatch in br, expected [i32, i32] but got [i32]
  000001d: error: OnBrExpr callback failed
out/test/spec/func.wast:846: assert_invalid passed:
  out/test/spec/func/func.53.wasm:000001a: error: type mismatch in br, expected [i32] but got []
  000001a: error: OnBrExpr callback failed
out/test/spec/func.wast:852: assert_invalid passed:
  out/test/spec/func/func.54.wasm:000001b: error: type mismatch in br, expected [i32, i32] but got []
  000001b: error: OnBrExpr callback failed
out/test/spec/func.wast:858: assert_invalid passed:
  out/test/spec/func/func.55.wasm:000001c: error: type mismatch in br, expected [i32] but got [i64]
  000001c: error: OnBrExpr callback failed
out/test/spec/func.wast:864: assert_invalid passed:
  out/test/spec/func/func.56.wasm:000001d: error: type mismatch in br, expected [i32, i32] but got [i32]
  000001d: error: OnBrExpr callback failed
out/test/spec/func.wast:870: assert_invalid passed:
  out/test/spec/func/func.57.wasm:000001c: error: type mismatch in br, expected [i32] but got [i64]
  000001c: error: OnBrExpr callback failed
out/test/spec/func.wast:877: assert_invalid passed:
  out/test/spec/func/func.58.wasm:000001c: error: type mismatch in br, expected [i32] but got []
  000001c: error: OnBrExpr callback failed
out/test/spec/func.wast:883: assert_invalid passed:
  out/test/spec/func/func.59.wasm:000001d: error: type mismatch in br, expected [i32, i32] but got []
  000001d: error: OnBrExpr callback failed
out/test/spec/func.wast:889: assert_invalid passed:
  out/test/spec/func/func.60.wasm:000001d: error: type mismatch in br, expected [i32] but got []
  000001d: error: OnBrExpr callback failed
out/test/spec/func.wast:895: assert_invalid passed:
  out/test/spec/func/func.61.wasm:000001e: error: type mismatch in br, expected [i32, i32] but got []
  000001e: error: OnBrExpr callback failed
out/test/spec/func.wast:901: assert_invalid passed:
  out/test/spec/func/func.62.wasm:000001e: error: type mismatch in br, expected [i32] but got [i64]
  000001e: error: OnBrExpr callback failed
out/test/spec/func.wast:907: assert_invalid passed:
  out/test/spec/func/func.63.wasm:000001f: error: type mismatch in br, expected [i32, i32] but got [i32]
  000001f: error: OnBrExpr callback failed
out/test/spec/func.wast:917: assert_malformed passed:
  out/test/spec/func/func.64.wat:1:14: error: unexpected token "local", expected an instr.
  (func (nop) (local i32))
               ^^^^^
out/test/spec/func.wast:921: assert_malformed passed:
  out/test/spec/func/func.65.wat:1:14: error: unexpected token "param", expected an instr.
  (func (nop) (param i32))
               ^^^^^
out/test/spec/func.wast:925: assert_malformed passed:
  out/test/spec/func/func.66.wat:1:14: error: unexpected token "result", expected an instr.
  (func (nop) (result i32))
               ^^^^^^
out/test/spec/func.wast:929: assert_malformed passed:
  out/test/spec/func/func.67.wat:1:20: error: unexpected token "param", expected an instr.
  (func (local i32) (param i32))
                     ^^^^^
out/test/spec/func.wast:933: assert_malformed passed:
  out/test/spec/func/func.68.wat:1:20: error: unexpected token "result", expected an instr.
  (func (local i32) (result i32) (local.get 0))
                     ^^^^^^
out/test/spec/func.wast:937: assert_malformed passed:
  out/test/spec/func/func.69.wat:1:21: error: unexpected token "param", expected an instr.
  (func (result i32) (param i32) (local.get 0))
                      ^^^^^
out/test/spec/func.wast:943: assert_malformed passed:
  out/test/spec/func/func.70.wat:1:13: error: redefinition of function "$foo"
  (func $foo)(func $foo)
              ^^^^
out/test/spec/func.wast:947: assert_malformed passed:
  out/test/spec/func/func.71.wat:1:28: error: redefinition of function "$foo"
  (import "" "" (func $foo))(func $foo)
                             ^^^^
out/test/spec/func.wast:951: assert_malformed passed:
  out/test/spec/func/func.72.wat:1:28: error: redefinition of function "$foo"
  (import "" "" (func $foo))(import "" "" (func $foo))
                             ^^^^^^
out/test/spec/func.wast:956: assert_malformed passed:
  out/test/spec/func/func.73.wat:1:31: error: redefinition of parameter "$foo"
  (func (param $foo i32) (param $foo i32))
                                ^^^^
out/test/spec/func.wast:958: assert_malformed passed:
  out/test/spec/func/func.74.wat:1:31: error: redefinition of parameter "$foo"
  (func (param $foo i32) (local $foo i32))
                                ^^^^
out/test/spec/func.wast:960: assert_malformed passed:
  out/test/spec/func/func.75.wat:1:31: error: redefinition of local "$foo"
  (func (local $foo i32) (local $foo i32))
                                ^^^^
172/172 tests passed.
;;; STDOUT ;;)