Debian Codegraph @

js/src/jit-test/tests/wasm/spec/memory64/table_copy.wast.js

raw
1 /* Copyright 2021 Mozilla Foundation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 // ./test/core/table_copy.wast
17
18 // ./test/core/table_copy.wast:6
19 let $0 = instantiate(`(module
20 (func (export "ef0") (result i32) (i32.const 0))
21 (func (export "ef1") (result i32) (i32.const 1))
22 (func (export "ef2") (result i32) (i32.const 2))
23 (func (export "ef3") (result i32) (i32.const 3))
24 (func (export "ef4") (result i32) (i32.const 4))
25 )`);
26
27 // ./test/core/table_copy.wast:13
28 register($0, `a`);
29
30 // ./test/core/table_copy.wast:15
31 let $1 = instantiate(`(module
32 (type (func (result i32))) ;; type #0
33 (import "a" "ef0" (func (result i32))) ;; index 0
34 (import "a" "ef1" (func (result i32)))
35 (import "a" "ef2" (func (result i32)))
36 (import "a" "ef3" (func (result i32)))
37 (import "a" "ef4" (func (result i32))) ;; index 4
38 (table $$t0 30 30 funcref)
39 (table $$t1 30 30 funcref)
40 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
41 (elem funcref
42 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
43 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
44 (elem funcref
45 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
46 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
47 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
48 (func (result i32) (i32.const 5)) ;; index 5
49 (func (result i32) (i32.const 6))
50 (func (result i32) (i32.const 7))
51 (func (result i32) (i32.const 8))
52 (func (result i32) (i32.const 9)) ;; index 9
53 (func (export "test")
54 (nop))
55 (func (export "check_t0") (param i32) (result i32)
56 (call_indirect $$t0 (type 0) (local.get 0)))
57 (func (export "check_t1") (param i32) (result i32)
58 (call_indirect $$t1 (type 0) (local.get 0)))
59 )`);
60
61 // ./test/core/table_copy.wast:45
62 invoke($1, `test`, []);
63
64 // ./test/core/table_copy.wast:46
65 assert_trap(() => invoke($1, `check_t0`, [0]), `uninitialized element`);
66
67 // ./test/core/table_copy.wast:47
68 assert_trap(() => invoke($1, `check_t0`, [1]), `uninitialized element`);
69
70 // ./test/core/table_copy.wast:48
71 assert_return(() => invoke($1, `check_t0`, [2]), [value("i32", 3)]);
72
73 // ./test/core/table_copy.wast:49
74 assert_return(() => invoke($1, `check_t0`, [3]), [value("i32", 1)]);
75
76 // ./test/core/table_copy.wast:50
77 assert_return(() => invoke($1, `check_t0`, [4]), [value("i32", 4)]);
78
79 // ./test/core/table_copy.wast:51
80 assert_return(() => invoke($1, `check_t0`, [5]), [value("i32", 1)]);
81
82 // ./test/core/table_copy.wast:52
83 assert_trap(() => invoke($1, `check_t0`, [6]), `uninitialized element`);
84
85 // ./test/core/table_copy.wast:53
86 assert_trap(() => invoke($1, `check_t0`, [7]), `uninitialized element`);
87
88 // ./test/core/table_copy.wast:54
89 assert_trap(() => invoke($1, `check_t0`, [8]), `uninitialized element`);
90
91 // ./test/core/table_copy.wast:55
92 assert_trap(() => invoke($1, `check_t0`, [9]), `uninitialized element`);
93
94 // ./test/core/table_copy.wast:56
95 assert_trap(() => invoke($1, `check_t0`, [10]), `uninitialized element`);
96
97 // ./test/core/table_copy.wast:57
98 assert_trap(() => invoke($1, `check_t0`, [11]), `uninitialized element`);
99
100 // ./test/core/table_copy.wast:58
101 assert_return(() => invoke($1, `check_t0`, [12]), [value("i32", 7)]);
102
103 // ./test/core/table_copy.wast:59
104 assert_return(() => invoke($1, `check_t0`, [13]), [value("i32", 5)]);
105
106 // ./test/core/table_copy.wast:60
107 assert_return(() => invoke($1, `check_t0`, [14]), [value("i32", 2)]);
108
109 // ./test/core/table_copy.wast:61
110 assert_return(() => invoke($1, `check_t0`, [15]), [value("i32", 3)]);
111
112 // ./test/core/table_copy.wast:62
113 assert_return(() => invoke($1, `check_t0`, [16]), [value("i32", 6)]);
114
115 // ./test/core/table_copy.wast:63
116 assert_trap(() => invoke($1, `check_t0`, [17]), `uninitialized element`);
117
118 // ./test/core/table_copy.wast:64
119 assert_trap(() => invoke($1, `check_t0`, [18]), `uninitialized element`);
120
121 // ./test/core/table_copy.wast:65
122 assert_trap(() => invoke($1, `check_t0`, [19]), `uninitialized element`);
123
124 // ./test/core/table_copy.wast:66
125 assert_trap(() => invoke($1, `check_t0`, [20]), `uninitialized element`);
126
127 // ./test/core/table_copy.wast:67
128 assert_trap(() => invoke($1, `check_t0`, [21]), `uninitialized element`);
129
130 // ./test/core/table_copy.wast:68
131 assert_trap(() => invoke($1, `check_t0`, [22]), `uninitialized element`);
132
133 // ./test/core/table_copy.wast:69
134 assert_trap(() => invoke($1, `check_t0`, [23]), `uninitialized element`);
135
136 // ./test/core/table_copy.wast:70
137 assert_trap(() => invoke($1, `check_t0`, [24]), `uninitialized element`);
138
139 // ./test/core/table_copy.wast:71
140 assert_trap(() => invoke($1, `check_t0`, [25]), `uninitialized element`);
141
142 // ./test/core/table_copy.wast:72
143 assert_trap(() => invoke($1, `check_t0`, [26]), `uninitialized element`);
144
145 // ./test/core/table_copy.wast:73
146 assert_trap(() => invoke($1, `check_t0`, [27]), `uninitialized element`);
147
148 // ./test/core/table_copy.wast:74
149 assert_trap(() => invoke($1, `check_t0`, [28]), `uninitialized element`);
150
151 // ./test/core/table_copy.wast:75
152 assert_trap(() => invoke($1, `check_t0`, [29]), `uninitialized element`);
153
154 // ./test/core/table_copy.wast:76
155 assert_trap(() => invoke($1, `check_t1`, [0]), `uninitialized element`);
156
157 // ./test/core/table_copy.wast:77
158 assert_trap(() => invoke($1, `check_t1`, [1]), `uninitialized element`);
159
160 // ./test/core/table_copy.wast:78
161 assert_trap(() => invoke($1, `check_t1`, [2]), `uninitialized element`);
162
163 // ./test/core/table_copy.wast:79
164 assert_return(() => invoke($1, `check_t1`, [3]), [value("i32", 1)]);
165
166 // ./test/core/table_copy.wast:80
167 assert_return(() => invoke($1, `check_t1`, [4]), [value("i32", 3)]);
168
169 // ./test/core/table_copy.wast:81
170 assert_return(() => invoke($1, `check_t1`, [5]), [value("i32", 1)]);
171
172 // ./test/core/table_copy.wast:82
173 assert_return(() => invoke($1, `check_t1`, [6]), [value("i32", 4)]);
174
175 // ./test/core/table_copy.wast:83
176 assert_trap(() => invoke($1, `check_t1`, [7]), `uninitialized element`);
177
178 // ./test/core/table_copy.wast:84
179 assert_trap(() => invoke($1, `check_t1`, [8]), `uninitialized element`);
180
181 // ./test/core/table_copy.wast:85
182 assert_trap(() => invoke($1, `check_t1`, [9]), `uninitialized element`);
183
184 // ./test/core/table_copy.wast:86
185 assert_trap(() => invoke($1, `check_t1`, [10]), `uninitialized element`);
186
187 // ./test/core/table_copy.wast:87
188 assert_return(() => invoke($1, `check_t1`, [11]), [value("i32", 6)]);
189
190 // ./test/core/table_copy.wast:88
191 assert_return(() => invoke($1, `check_t1`, [12]), [value("i32", 3)]);
192
193 // ./test/core/table_copy.wast:89
194 assert_return(() => invoke($1, `check_t1`, [13]), [value("i32", 2)]);
195
196 // ./test/core/table_copy.wast:90
197 assert_return(() => invoke($1, `check_t1`, [14]), [value("i32", 5)]);
198
199 // ./test/core/table_copy.wast:91
200 assert_return(() => invoke($1, `check_t1`, [15]), [value("i32", 7)]);
201
202 // ./test/core/table_copy.wast:92
203 assert_trap(() => invoke($1, `check_t1`, [16]), `uninitialized element`);
204
205 // ./test/core/table_copy.wast:93
206 assert_trap(() => invoke($1, `check_t1`, [17]), `uninitialized element`);
207
208 // ./test/core/table_copy.wast:94
209 assert_trap(() => invoke($1, `check_t1`, [18]), `uninitialized element`);
210
211 // ./test/core/table_copy.wast:95
212 assert_trap(() => invoke($1, `check_t1`, [19]), `uninitialized element`);
213
214 // ./test/core/table_copy.wast:96
215 assert_trap(() => invoke($1, `check_t1`, [20]), `uninitialized element`);
216
217 // ./test/core/table_copy.wast:97
218 assert_trap(() => invoke($1, `check_t1`, [21]), `uninitialized element`);
219
220 // ./test/core/table_copy.wast:98
221 assert_trap(() => invoke($1, `check_t1`, [22]), `uninitialized element`);
222
223 // ./test/core/table_copy.wast:99
224 assert_trap(() => invoke($1, `check_t1`, [23]), `uninitialized element`);
225
226 // ./test/core/table_copy.wast:100
227 assert_trap(() => invoke($1, `check_t1`, [24]), `uninitialized element`);
228
229 // ./test/core/table_copy.wast:101
230 assert_trap(() => invoke($1, `check_t1`, [25]), `uninitialized element`);
231
232 // ./test/core/table_copy.wast:102
233 assert_trap(() => invoke($1, `check_t1`, [26]), `uninitialized element`);
234
235 // ./test/core/table_copy.wast:103
236 assert_trap(() => invoke($1, `check_t1`, [27]), `uninitialized element`);
237
238 // ./test/core/table_copy.wast:104
239 assert_trap(() => invoke($1, `check_t1`, [28]), `uninitialized element`);
240
241 // ./test/core/table_copy.wast:105
242 assert_trap(() => invoke($1, `check_t1`, [29]), `uninitialized element`);
243
244 // ./test/core/table_copy.wast:107
245 let $2 = instantiate(`(module
246 (type (func (result i32))) ;; type #0
247 (import "a" "ef0" (func (result i32))) ;; index 0
248 (import "a" "ef1" (func (result i32)))
249 (import "a" "ef2" (func (result i32)))
250 (import "a" "ef3" (func (result i32)))
251 (import "a" "ef4" (func (result i32))) ;; index 4
252 (table $$t0 30 30 funcref)
253 (table $$t1 30 30 funcref)
254 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
255 (elem funcref
256 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
257 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
258 (elem funcref
259 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
260 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
261 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
262 (func (result i32) (i32.const 5)) ;; index 5
263 (func (result i32) (i32.const 6))
264 (func (result i32) (i32.const 7))
265 (func (result i32) (i32.const 8))
266 (func (result i32) (i32.const 9)) ;; index 9
267 (func (export "test")
268 (table.copy $$t0 $$t0 (i32.const 13) (i32.const 2) (i32.const 3)))
269 (func (export "check_t0") (param i32) (result i32)
270 (call_indirect $$t0 (type 0) (local.get 0)))
271 (func (export "check_t1") (param i32) (result i32)
272 (call_indirect $$t1 (type 0) (local.get 0)))
273 )`);
274
275 // ./test/core/table_copy.wast:137
276 invoke($2, `test`, []);
277
278 // ./test/core/table_copy.wast:138
279 assert_trap(() => invoke($2, `check_t0`, [0]), `uninitialized element`);
280
281 // ./test/core/table_copy.wast:139
282 assert_trap(() => invoke($2, `check_t0`, [1]), `uninitialized element`);
283
284 // ./test/core/table_copy.wast:140
285 assert_return(() => invoke($2, `check_t0`, [2]), [value("i32", 3)]);
286
287 // ./test/core/table_copy.wast:141
288 assert_return(() => invoke($2, `check_t0`, [3]), [value("i32", 1)]);
289
290 // ./test/core/table_copy.wast:142
291 assert_return(() => invoke($2, `check_t0`, [4]), [value("i32", 4)]);
292
293 // ./test/core/table_copy.wast:143
294 assert_return(() => invoke($2, `check_t0`, [5]), [value("i32", 1)]);
295
296 // ./test/core/table_copy.wast:144
297 assert_trap(() => invoke($2, `check_t0`, [6]), `uninitialized element`);
298
299 // ./test/core/table_copy.wast:145
300 assert_trap(() => invoke($2, `check_t0`, [7]), `uninitialized element`);
301
302 // ./test/core/table_copy.wast:146
303 assert_trap(() => invoke($2, `check_t0`, [8]), `uninitialized element`);
304
305 // ./test/core/table_copy.wast:147
306 assert_trap(() => invoke($2, `check_t0`, [9]), `uninitialized element`);
307
308 // ./test/core/table_copy.wast:148
309 assert_trap(() => invoke($2, `check_t0`, [10]), `uninitialized element`);
310
311 // ./test/core/table_copy.wast:149
312 assert_trap(() => invoke($2, `check_t0`, [11]), `uninitialized element`);
313
314 // ./test/core/table_copy.wast:150
315 assert_return(() => invoke($2, `check_t0`, [12]), [value("i32", 7)]);
316
317 // ./test/core/table_copy.wast:151
318 assert_return(() => invoke($2, `check_t0`, [13]), [value("i32", 3)]);
319
320 // ./test/core/table_copy.wast:152
321 assert_return(() => invoke($2, `check_t0`, [14]), [value("i32", 1)]);
322
323 // ./test/core/table_copy.wast:153
324 assert_return(() => invoke($2, `check_t0`, [15]), [value("i32", 4)]);
325
326 // ./test/core/table_copy.wast:154
327 assert_return(() => invoke($2, `check_t0`, [16]), [value("i32", 6)]);
328
329 // ./test/core/table_copy.wast:155
330 assert_trap(() => invoke($2, `check_t0`, [17]), `uninitialized element`);
331
332 // ./test/core/table_copy.wast:156
333 assert_trap(() => invoke($2, `check_t0`, [18]), `uninitialized element`);
334
335 // ./test/core/table_copy.wast:157
336 assert_trap(() => invoke($2, `check_t0`, [19]), `uninitialized element`);
337
338 // ./test/core/table_copy.wast:158
339 assert_trap(() => invoke($2, `check_t0`, [20]), `uninitialized element`);
340
341 // ./test/core/table_copy.wast:159
342 assert_trap(() => invoke($2, `check_t0`, [21]), `uninitialized element`);
343
344 // ./test/core/table_copy.wast:160
345 assert_trap(() => invoke($2, `check_t0`, [22]), `uninitialized element`);
346
347 // ./test/core/table_copy.wast:161
348 assert_trap(() => invoke($2, `check_t0`, [23]), `uninitialized element`);
349
350 // ./test/core/table_copy.wast:162
351 assert_trap(() => invoke($2, `check_t0`, [24]), `uninitialized element`);
352
353 // ./test/core/table_copy.wast:163
354 assert_trap(() => invoke($2, `check_t0`, [25]), `uninitialized element`);
355
356 // ./test/core/table_copy.wast:164
357 assert_trap(() => invoke($2, `check_t0`, [26]), `uninitialized element`);
358
359 // ./test/core/table_copy.wast:165
360 assert_trap(() => invoke($2, `check_t0`, [27]), `uninitialized element`);
361
362 // ./test/core/table_copy.wast:166
363 assert_trap(() => invoke($2, `check_t0`, [28]), `uninitialized element`);
364
365 // ./test/core/table_copy.wast:167
366 assert_trap(() => invoke($2, `check_t0`, [29]), `uninitialized element`);
367
368 // ./test/core/table_copy.wast:168
369 assert_trap(() => invoke($2, `check_t1`, [0]), `uninitialized element`);
370
371 // ./test/core/table_copy.wast:169
372 assert_trap(() => invoke($2, `check_t1`, [1]), `uninitialized element`);
373
374 // ./test/core/table_copy.wast:170
375 assert_trap(() => invoke($2, `check_t1`, [2]), `uninitialized element`);
376
377 // ./test/core/table_copy.wast:171
378 assert_return(() => invoke($2, `check_t1`, [3]), [value("i32", 1)]);
379
380 // ./test/core/table_copy.wast:172
381 assert_return(() => invoke($2, `check_t1`, [4]), [value("i32", 3)]);
382
383 // ./test/core/table_copy.wast:173
384 assert_return(() => invoke($2, `check_t1`, [5]), [value("i32", 1)]);
385
386 // ./test/core/table_copy.wast:174
387 assert_return(() => invoke($2, `check_t1`, [6]), [value("i32", 4)]);
388
389 // ./test/core/table_copy.wast:175
390 assert_trap(() => invoke($2, `check_t1`, [7]), `uninitialized element`);
391
392 // ./test/core/table_copy.wast:176
393 assert_trap(() => invoke($2, `check_t1`, [8]), `uninitialized element`);
394
395 // ./test/core/table_copy.wast:177
396 assert_trap(() => invoke($2, `check_t1`, [9]), `uninitialized element`);
397
398 // ./test/core/table_copy.wast:178
399 assert_trap(() => invoke($2, `check_t1`, [10]), `uninitialized element`);
400
401 // ./test/core/table_copy.wast:179
402 assert_return(() => invoke($2, `check_t1`, [11]), [value("i32", 6)]);
403
404 // ./test/core/table_copy.wast:180
405 assert_return(() => invoke($2, `check_t1`, [12]), [value("i32", 3)]);
406
407 // ./test/core/table_copy.wast:181
408 assert_return(() => invoke($2, `check_t1`, [13]), [value("i32", 2)]);
409
410 // ./test/core/table_copy.wast:182
411 assert_return(() => invoke($2, `check_t1`, [14]), [value("i32", 5)]);
412
413 // ./test/core/table_copy.wast:183
414 assert_return(() => invoke($2, `check_t1`, [15]), [value("i32", 7)]);
415
416 // ./test/core/table_copy.wast:184
417 assert_trap(() => invoke($2, `check_t1`, [16]), `uninitialized element`);
418
419 // ./test/core/table_copy.wast:185
420 assert_trap(() => invoke($2, `check_t1`, [17]), `uninitialized element`);
421
422 // ./test/core/table_copy.wast:186
423 assert_trap(() => invoke($2, `check_t1`, [18]), `uninitialized element`);
424
425 // ./test/core/table_copy.wast:187
426 assert_trap(() => invoke($2, `check_t1`, [19]), `uninitialized element`);
427
428 // ./test/core/table_copy.wast:188
429 assert_trap(() => invoke($2, `check_t1`, [20]), `uninitialized element`);
430
431 // ./test/core/table_copy.wast:189
432 assert_trap(() => invoke($2, `check_t1`, [21]), `uninitialized element`);
433
434 // ./test/core/table_copy.wast:190
435 assert_trap(() => invoke($2, `check_t1`, [22]), `uninitialized element`);
436
437 // ./test/core/table_copy.wast:191
438 assert_trap(() => invoke($2, `check_t1`, [23]), `uninitialized element`);
439
440 // ./test/core/table_copy.wast:192
441 assert_trap(() => invoke($2, `check_t1`, [24]), `uninitialized element`);
442
443 // ./test/core/table_copy.wast:193
444 assert_trap(() => invoke($2, `check_t1`, [25]), `uninitialized element`);
445
446 // ./test/core/table_copy.wast:194
447 assert_trap(() => invoke($2, `check_t1`, [26]), `uninitialized element`);
448
449 // ./test/core/table_copy.wast:195
450 assert_trap(() => invoke($2, `check_t1`, [27]), `uninitialized element`);
451
452 // ./test/core/table_copy.wast:196
453 assert_trap(() => invoke($2, `check_t1`, [28]), `uninitialized element`);
454
455 // ./test/core/table_copy.wast:197
456 assert_trap(() => invoke($2, `check_t1`, [29]), `uninitialized element`);
457
458 // ./test/core/table_copy.wast:199
459 let $3 = instantiate(`(module
460 (type (func (result i32))) ;; type #0
461 (import "a" "ef0" (func (result i32))) ;; index 0
462 (import "a" "ef1" (func (result i32)))
463 (import "a" "ef2" (func (result i32)))
464 (import "a" "ef3" (func (result i32)))
465 (import "a" "ef4" (func (result i32))) ;; index 4
466 (table $$t0 30 30 funcref)
467 (table $$t1 30 30 funcref)
468 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
469 (elem funcref
470 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
471 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
472 (elem funcref
473 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
474 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
475 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
476 (func (result i32) (i32.const 5)) ;; index 5
477 (func (result i32) (i32.const 6))
478 (func (result i32) (i32.const 7))
479 (func (result i32) (i32.const 8))
480 (func (result i32) (i32.const 9)) ;; index 9
481 (func (export "test")
482 (table.copy $$t0 $$t0 (i32.const 25) (i32.const 15) (i32.const 2)))
483 (func (export "check_t0") (param i32) (result i32)
484 (call_indirect $$t0 (type 0) (local.get 0)))
485 (func (export "check_t1") (param i32) (result i32)
486 (call_indirect $$t1 (type 0) (local.get 0)))
487 )`);
488
489 // ./test/core/table_copy.wast:229
490 invoke($3, `test`, []);
491
492 // ./test/core/table_copy.wast:230
493 assert_trap(() => invoke($3, `check_t0`, [0]), `uninitialized element`);
494
495 // ./test/core/table_copy.wast:231
496 assert_trap(() => invoke($3, `check_t0`, [1]), `uninitialized element`);
497
498 // ./test/core/table_copy.wast:232
499 assert_return(() => invoke($3, `check_t0`, [2]), [value("i32", 3)]);
500
501 // ./test/core/table_copy.wast:233
502 assert_return(() => invoke($3, `check_t0`, [3]), [value("i32", 1)]);
503
504 // ./test/core/table_copy.wast:234
505 assert_return(() => invoke($3, `check_t0`, [4]), [value("i32", 4)]);
506
507 // ./test/core/table_copy.wast:235
508 assert_return(() => invoke($3, `check_t0`, [5]), [value("i32", 1)]);
509
510 // ./test/core/table_copy.wast:236
511 assert_trap(() => invoke($3, `check_t0`, [6]), `uninitialized element`);
512
513 // ./test/core/table_copy.wast:237
514 assert_trap(() => invoke($3, `check_t0`, [7]), `uninitialized element`);
515
516 // ./test/core/table_copy.wast:238
517 assert_trap(() => invoke($3, `check_t0`, [8]), `uninitialized element`);
518
519 // ./test/core/table_copy.wast:239
520 assert_trap(() => invoke($3, `check_t0`, [9]), `uninitialized element`);
521
522 // ./test/core/table_copy.wast:240
523 assert_trap(() => invoke($3, `check_t0`, [10]), `uninitialized element`);
524
525 // ./test/core/table_copy.wast:241
526 assert_trap(() => invoke($3, `check_t0`, [11]), `uninitialized element`);
527
528 // ./test/core/table_copy.wast:242
529 assert_return(() => invoke($3, `check_t0`, [12]), [value("i32", 7)]);
530
531 // ./test/core/table_copy.wast:243
532 assert_return(() => invoke($3, `check_t0`, [13]), [value("i32", 5)]);
533
534 // ./test/core/table_copy.wast:244
535 assert_return(() => invoke($3, `check_t0`, [14]), [value("i32", 2)]);
536
537 // ./test/core/table_copy.wast:245
538 assert_return(() => invoke($3, `check_t0`, [15]), [value("i32", 3)]);
539
540 // ./test/core/table_copy.wast:246
541 assert_return(() => invoke($3, `check_t0`, [16]), [value("i32", 6)]);
542
543 // ./test/core/table_copy.wast:247
544 assert_trap(() => invoke($3, `check_t0`, [17]), `uninitialized element`);
545
546 // ./test/core/table_copy.wast:248
547 assert_trap(() => invoke($3, `check_t0`, [18]), `uninitialized element`);
548
549 // ./test/core/table_copy.wast:249
550 assert_trap(() => invoke($3, `check_t0`, [19]), `uninitialized element`);
551
552 // ./test/core/table_copy.wast:250
553 assert_trap(() => invoke($3, `check_t0`, [20]), `uninitialized element`);
554
555 // ./test/core/table_copy.wast:251
556 assert_trap(() => invoke($3, `check_t0`, [21]), `uninitialized element`);
557
558 // ./test/core/table_copy.wast:252
559 assert_trap(() => invoke($3, `check_t0`, [22]), `uninitialized element`);
560
561 // ./test/core/table_copy.wast:253
562 assert_trap(() => invoke($3, `check_t0`, [23]), `uninitialized element`);
563
564 // ./test/core/table_copy.wast:254
565 assert_trap(() => invoke($3, `check_t0`, [24]), `uninitialized element`);
566
567 // ./test/core/table_copy.wast:255
568 assert_return(() => invoke($3, `check_t0`, [25]), [value("i32", 3)]);
569
570 // ./test/core/table_copy.wast:256
571 assert_return(() => invoke($3, `check_t0`, [26]), [value("i32", 6)]);
572
573 // ./test/core/table_copy.wast:257
574 assert_trap(() => invoke($3, `check_t0`, [27]), `uninitialized element`);
575
576 // ./test/core/table_copy.wast:258
577 assert_trap(() => invoke($3, `check_t0`, [28]), `uninitialized element`);
578
579 // ./test/core/table_copy.wast:259
580 assert_trap(() => invoke($3, `check_t0`, [29]), `uninitialized element`);
581
582 // ./test/core/table_copy.wast:260
583 assert_trap(() => invoke($3, `check_t1`, [0]), `uninitialized element`);
584
585 // ./test/core/table_copy.wast:261
586 assert_trap(() => invoke($3, `check_t1`, [1]), `uninitialized element`);
587
588 // ./test/core/table_copy.wast:262
589 assert_trap(() => invoke($3, `check_t1`, [2]), `uninitialized element`);
590
591 // ./test/core/table_copy.wast:263
592 assert_return(() => invoke($3, `check_t1`, [3]), [value("i32", 1)]);
593
594 // ./test/core/table_copy.wast:264
595 assert_return(() => invoke($3, `check_t1`, [4]), [value("i32", 3)]);
596
597 // ./test/core/table_copy.wast:265
598 assert_return(() => invoke($3, `check_t1`, [5]), [value("i32", 1)]);
599
600 // ./test/core/table_copy.wast:266
601 assert_return(() => invoke($3, `check_t1`, [6]), [value("i32", 4)]);
602
603 // ./test/core/table_copy.wast:267
604 assert_trap(() => invoke($3, `check_t1`, [7]), `uninitialized element`);
605
606 // ./test/core/table_copy.wast:268
607 assert_trap(() => invoke($3, `check_t1`, [8]), `uninitialized element`);
608
609 // ./test/core/table_copy.wast:269
610 assert_trap(() => invoke($3, `check_t1`, [9]), `uninitialized element`);
611
612 // ./test/core/table_copy.wast:270
613 assert_trap(() => invoke($3, `check_t1`, [10]), `uninitialized element`);
614
615 // ./test/core/table_copy.wast:271
616 assert_return(() => invoke($3, `check_t1`, [11]), [value("i32", 6)]);
617
618 // ./test/core/table_copy.wast:272
619 assert_return(() => invoke($3, `check_t1`, [12]), [value("i32", 3)]);
620
621 // ./test/core/table_copy.wast:273
622 assert_return(() => invoke($3, `check_t1`, [13]), [value("i32", 2)]);
623
624 // ./test/core/table_copy.wast:274
625 assert_return(() => invoke($3, `check_t1`, [14]), [value("i32", 5)]);
626
627 // ./test/core/table_copy.wast:275
628 assert_return(() => invoke($3, `check_t1`, [15]), [value("i32", 7)]);
629
630 // ./test/core/table_copy.wast:276
631 assert_trap(() => invoke($3, `check_t1`, [16]), `uninitialized element`);
632
633 // ./test/core/table_copy.wast:277
634 assert_trap(() => invoke($3, `check_t1`, [17]), `uninitialized element`);
635
636 // ./test/core/table_copy.wast:278
637 assert_trap(() => invoke($3, `check_t1`, [18]), `uninitialized element`);
638
639 // ./test/core/table_copy.wast:279
640 assert_trap(() => invoke($3, `check_t1`, [19]), `uninitialized element`);
641
642 // ./test/core/table_copy.wast:280
643 assert_trap(() => invoke($3, `check_t1`, [20]), `uninitialized element`);
644
645 // ./test/core/table_copy.wast:281
646 assert_trap(() => invoke($3, `check_t1`, [21]), `uninitialized element`);
647
648 // ./test/core/table_copy.wast:282
649 assert_trap(() => invoke($3, `check_t1`, [22]), `uninitialized element`);
650
651 // ./test/core/table_copy.wast:283
652 assert_trap(() => invoke($3, `check_t1`, [23]), `uninitialized element`);
653
654 // ./test/core/table_copy.wast:284
655 assert_trap(() => invoke($3, `check_t1`, [24]), `uninitialized element`);
656
657 // ./test/core/table_copy.wast:285
658 assert_trap(() => invoke($3, `check_t1`, [25]), `uninitialized element`);
659
660 // ./test/core/table_copy.wast:286
661 assert_trap(() => invoke($3, `check_t1`, [26]), `uninitialized element`);
662
663 // ./test/core/table_copy.wast:287
664 assert_trap(() => invoke($3, `check_t1`, [27]), `uninitialized element`);
665
666 // ./test/core/table_copy.wast:288
667 assert_trap(() => invoke($3, `check_t1`, [28]), `uninitialized element`);
668
669 // ./test/core/table_copy.wast:289
670 assert_trap(() => invoke($3, `check_t1`, [29]), `uninitialized element`);
671
672 // ./test/core/table_copy.wast:291
673 let $4 = instantiate(`(module
674 (type (func (result i32))) ;; type #0
675 (import "a" "ef0" (func (result i32))) ;; index 0
676 (import "a" "ef1" (func (result i32)))
677 (import "a" "ef2" (func (result i32)))
678 (import "a" "ef3" (func (result i32)))
679 (import "a" "ef4" (func (result i32))) ;; index 4
680 (table $$t0 30 30 funcref)
681 (table $$t1 30 30 funcref)
682 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
683 (elem funcref
684 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
685 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
686 (elem funcref
687 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
688 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
689 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
690 (func (result i32) (i32.const 5)) ;; index 5
691 (func (result i32) (i32.const 6))
692 (func (result i32) (i32.const 7))
693 (func (result i32) (i32.const 8))
694 (func (result i32) (i32.const 9)) ;; index 9
695 (func (export "test")
696 (table.copy $$t0 $$t0 (i32.const 13) (i32.const 25) (i32.const 3)))
697 (func (export "check_t0") (param i32) (result i32)
698 (call_indirect $$t0 (type 0) (local.get 0)))
699 (func (export "check_t1") (param i32) (result i32)
700 (call_indirect $$t1 (type 0) (local.get 0)))
701 )`);
702
703 // ./test/core/table_copy.wast:321
704 invoke($4, `test`, []);
705
706 // ./test/core/table_copy.wast:322
707 assert_trap(() => invoke($4, `check_t0`, [0]), `uninitialized element`);
708
709 // ./test/core/table_copy.wast:323
710 assert_trap(() => invoke($4, `check_t0`, [1]), `uninitialized element`);
711
712 // ./test/core/table_copy.wast:324
713 assert_return(() => invoke($4, `check_t0`, [2]), [value("i32", 3)]);
714
715 // ./test/core/table_copy.wast:325
716 assert_return(() => invoke($4, `check_t0`, [3]), [value("i32", 1)]);
717
718 // ./test/core/table_copy.wast:326
719 assert_return(() => invoke($4, `check_t0`, [4]), [value("i32", 4)]);
720
721 // ./test/core/table_copy.wast:327
722 assert_return(() => invoke($4, `check_t0`, [5]), [value("i32", 1)]);
723
724 // ./test/core/table_copy.wast:328
725 assert_trap(() => invoke($4, `check_t0`, [6]), `uninitialized element`);
726
727 // ./test/core/table_copy.wast:329
728 assert_trap(() => invoke($4, `check_t0`, [7]), `uninitialized element`);
729
730 // ./test/core/table_copy.wast:330
731 assert_trap(() => invoke($4, `check_t0`, [8]), `uninitialized element`);
732
733 // ./test/core/table_copy.wast:331
734 assert_trap(() => invoke($4, `check_t0`, [9]), `uninitialized element`);
735
736 // ./test/core/table_copy.wast:332
737 assert_trap(() => invoke($4, `check_t0`, [10]), `uninitialized element`);
738
739 // ./test/core/table_copy.wast:333
740 assert_trap(() => invoke($4, `check_t0`, [11]), `uninitialized element`);
741
742 // ./test/core/table_copy.wast:334
743 assert_return(() => invoke($4, `check_t0`, [12]), [value("i32", 7)]);
744
745 // ./test/core/table_copy.wast:335
746 assert_trap(() => invoke($4, `check_t0`, [13]), `uninitialized element`);
747
748 // ./test/core/table_copy.wast:336
749 assert_trap(() => invoke($4, `check_t0`, [14]), `uninitialized element`);
750
751 // ./test/core/table_copy.wast:337
752 assert_trap(() => invoke($4, `check_t0`, [15]), `uninitialized element`);
753
754 // ./test/core/table_copy.wast:338
755 assert_return(() => invoke($4, `check_t0`, [16]), [value("i32", 6)]);
756
757 // ./test/core/table_copy.wast:339
758 assert_trap(() => invoke($4, `check_t0`, [17]), `uninitialized element`);
759
760 // ./test/core/table_copy.wast:340
761 assert_trap(() => invoke($4, `check_t0`, [18]), `uninitialized element`);
762
763 // ./test/core/table_copy.wast:341
764 assert_trap(() => invoke($4, `check_t0`, [19]), `uninitialized element`);
765
766 // ./test/core/table_copy.wast:342
767 assert_trap(() => invoke($4, `check_t0`, [20]), `uninitialized element`);
768
769 // ./test/core/table_copy.wast:343
770 assert_trap(() => invoke($4, `check_t0`, [21]), `uninitialized element`);
771
772 // ./test/core/table_copy.wast:344
773 assert_trap(() => invoke($4, `check_t0`, [22]), `uninitialized element`);
774
775 // ./test/core/table_copy.wast:345
776 assert_trap(() => invoke($4, `check_t0`, [23]), `uninitialized element`);
777
778 // ./test/core/table_copy.wast:346
779 assert_trap(() => invoke($4, `check_t0`, [24]), `uninitialized element`);
780
781 // ./test/core/table_copy.wast:347
782 assert_trap(() => invoke($4, `check_t0`, [25]), `uninitialized element`);
783
784 // ./test/core/table_copy.wast:348
785 assert_trap(() => invoke($4, `check_t0`, [26]), `uninitialized element`);
786
787 // ./test/core/table_copy.wast:349
788 assert_trap(() => invoke($4, `check_t0`, [27]), `uninitialized element`);
789
790 // ./test/core/table_copy.wast:350
791 assert_trap(() => invoke($4, `check_t0`, [28]), `uninitialized element`);
792
793 // ./test/core/table_copy.wast:351
794 assert_trap(() => invoke($4, `check_t0`, [29]), `uninitialized element`);
795
796 // ./test/core/table_copy.wast:352
797 assert_trap(() => invoke($4, `check_t1`, [0]), `uninitialized element`);
798
799 // ./test/core/table_copy.wast:353
800 assert_trap(() => invoke($4, `check_t1`, [1]), `uninitialized element`);
801
802 // ./test/core/table_copy.wast:354
803 assert_trap(() => invoke($4, `check_t1`, [2]), `uninitialized element`);
804
805 // ./test/core/table_copy.wast:355
806 assert_return(() => invoke($4, `check_t1`, [3]), [value("i32", 1)]);
807
808 // ./test/core/table_copy.wast:356
809 assert_return(() => invoke($4, `check_t1`, [4]), [value("i32", 3)]);
810
811 // ./test/core/table_copy.wast:357
812 assert_return(() => invoke($4, `check_t1`, [5]), [value("i32", 1)]);
813
814 // ./test/core/table_copy.wast:358
815 assert_return(() => invoke($4, `check_t1`, [6]), [value("i32", 4)]);
816
817 // ./test/core/table_copy.wast:359
818 assert_trap(() => invoke($4, `check_t1`, [7]), `uninitialized element`);
819
820 // ./test/core/table_copy.wast:360
821 assert_trap(() => invoke($4, `check_t1`, [8]), `uninitialized element`);
822
823 // ./test/core/table_copy.wast:361
824 assert_trap(() => invoke($4, `check_t1`, [9]), `uninitialized element`);
825
826 // ./test/core/table_copy.wast:362
827 assert_trap(() => invoke($4, `check_t1`, [10]), `uninitialized element`);
828
829 // ./test/core/table_copy.wast:363
830 assert_return(() => invoke($4, `check_t1`, [11]), [value("i32", 6)]);
831
832 // ./test/core/table_copy.wast:364
833 assert_return(() => invoke($4, `check_t1`, [12]), [value("i32", 3)]);
834
835 // ./test/core/table_copy.wast:365
836 assert_return(() => invoke($4, `check_t1`, [13]), [value("i32", 2)]);
837
838 // ./test/core/table_copy.wast:366
839 assert_return(() => invoke($4, `check_t1`, [14]), [value("i32", 5)]);
840
841 // ./test/core/table_copy.wast:367
842 assert_return(() => invoke($4, `check_t1`, [15]), [value("i32", 7)]);
843
844 // ./test/core/table_copy.wast:368
845 assert_trap(() => invoke($4, `check_t1`, [16]), `uninitialized element`);
846
847 // ./test/core/table_copy.wast:369
848 assert_trap(() => invoke($4, `check_t1`, [17]), `uninitialized element`);
849
850 // ./test/core/table_copy.wast:370
851 assert_trap(() => invoke($4, `check_t1`, [18]), `uninitialized element`);
852
853 // ./test/core/table_copy.wast:371
854 assert_trap(() => invoke($4, `check_t1`, [19]), `uninitialized element`);
855
856 // ./test/core/table_copy.wast:372
857 assert_trap(() => invoke($4, `check_t1`, [20]), `uninitialized element`);
858
859 // ./test/core/table_copy.wast:373
860 assert_trap(() => invoke($4, `check_t1`, [21]), `uninitialized element`);
861
862 // ./test/core/table_copy.wast:374
863 assert_trap(() => invoke($4, `check_t1`, [22]), `uninitialized element`);
864
865 // ./test/core/table_copy.wast:375
866 assert_trap(() => invoke($4, `check_t1`, [23]), `uninitialized element`);
867
868 // ./test/core/table_copy.wast:376
869 assert_trap(() => invoke($4, `check_t1`, [24]), `uninitialized element`);
870
871 // ./test/core/table_copy.wast:377
872 assert_trap(() => invoke($4, `check_t1`, [25]), `uninitialized element`);
873
874 // ./test/core/table_copy.wast:378
875 assert_trap(() => invoke($4, `check_t1`, [26]), `uninitialized element`);
876
877 // ./test/core/table_copy.wast:379
878 assert_trap(() => invoke($4, `check_t1`, [27]), `uninitialized element`);
879
880 // ./test/core/table_copy.wast:380
881 assert_trap(() => invoke($4, `check_t1`, [28]), `uninitialized element`);
882
883 // ./test/core/table_copy.wast:381
884 assert_trap(() => invoke($4, `check_t1`, [29]), `uninitialized element`);
885
886 // ./test/core/table_copy.wast:383
887 let $5 = instantiate(`(module
888 (type (func (result i32))) ;; type #0
889 (import "a" "ef0" (func (result i32))) ;; index 0
890 (import "a" "ef1" (func (result i32)))
891 (import "a" "ef2" (func (result i32)))
892 (import "a" "ef3" (func (result i32)))
893 (import "a" "ef4" (func (result i32))) ;; index 4
894 (table $$t0 30 30 funcref)
895 (table $$t1 30 30 funcref)
896 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
897 (elem funcref
898 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
899 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
900 (elem funcref
901 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
902 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
903 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
904 (func (result i32) (i32.const 5)) ;; index 5
905 (func (result i32) (i32.const 6))
906 (func (result i32) (i32.const 7))
907 (func (result i32) (i32.const 8))
908 (func (result i32) (i32.const 9)) ;; index 9
909 (func (export "test")
910 (table.copy $$t0 $$t0 (i32.const 20) (i32.const 22) (i32.const 4)))
911 (func (export "check_t0") (param i32) (result i32)
912 (call_indirect $$t0 (type 0) (local.get 0)))
913 (func (export "check_t1") (param i32) (result i32)
914 (call_indirect $$t1 (type 0) (local.get 0)))
915 )`);
916
917 // ./test/core/table_copy.wast:413
918 invoke($5, `test`, []);
919
920 // ./test/core/table_copy.wast:414
921 assert_trap(() => invoke($5, `check_t0`, [0]), `uninitialized element`);
922
923 // ./test/core/table_copy.wast:415
924 assert_trap(() => invoke($5, `check_t0`, [1]), `uninitialized element`);
925
926 // ./test/core/table_copy.wast:416
927 assert_return(() => invoke($5, `check_t0`, [2]), [value("i32", 3)]);
928
929 // ./test/core/table_copy.wast:417
930 assert_return(() => invoke($5, `check_t0`, [3]), [value("i32", 1)]);
931
932 // ./test/core/table_copy.wast:418
933 assert_return(() => invoke($5, `check_t0`, [4]), [value("i32", 4)]);
934
935 // ./test/core/table_copy.wast:419
936 assert_return(() => invoke($5, `check_t0`, [5]), [value("i32", 1)]);
937
938 // ./test/core/table_copy.wast:420
939 assert_trap(() => invoke($5, `check_t0`, [6]), `uninitialized element`);
940
941 // ./test/core/table_copy.wast:421
942 assert_trap(() => invoke($5, `check_t0`, [7]), `uninitialized element`);
943
944 // ./test/core/table_copy.wast:422
945 assert_trap(() => invoke($5, `check_t0`, [8]), `uninitialized element`);
946
947 // ./test/core/table_copy.wast:423
948 assert_trap(() => invoke($5, `check_t0`, [9]), `uninitialized element`);
949
950 // ./test/core/table_copy.wast:424
951 assert_trap(() => invoke($5, `check_t0`, [10]), `uninitialized element`);
952
953 // ./test/core/table_copy.wast:425
954 assert_trap(() => invoke($5, `check_t0`, [11]), `uninitialized element`);
955
956 // ./test/core/table_copy.wast:426
957 assert_return(() => invoke($5, `check_t0`, [12]), [value("i32", 7)]);
958
959 // ./test/core/table_copy.wast:427
960 assert_return(() => invoke($5, `check_t0`, [13]), [value("i32", 5)]);
961
962 // ./test/core/table_copy.wast:428
963 assert_return(() => invoke($5, `check_t0`, [14]), [value("i32", 2)]);
964
965 // ./test/core/table_copy.wast:429
966 assert_return(() => invoke($5, `check_t0`, [15]), [value("i32", 3)]);
967
968 // ./test/core/table_copy.wast:430
969 assert_return(() => invoke($5, `check_t0`, [16]), [value("i32", 6)]);
970
971 // ./test/core/table_copy.wast:431
972 assert_trap(() => invoke($5, `check_t0`, [17]), `uninitialized element`);
973
974 // ./test/core/table_copy.wast:432
975 assert_trap(() => invoke($5, `check_t0`, [18]), `uninitialized element`);
976
977 // ./test/core/table_copy.wast:433
978 assert_trap(() => invoke($5, `check_t0`, [19]), `uninitialized element`);
979
980 // ./test/core/table_copy.wast:434
981 assert_trap(() => invoke($5, `check_t0`, [20]), `uninitialized element`);
982
983 // ./test/core/table_copy.wast:435
984 assert_trap(() => invoke($5, `check_t0`, [21]), `uninitialized element`);
985
986 // ./test/core/table_copy.wast:436
987 assert_trap(() => invoke($5, `check_t0`, [22]), `uninitialized element`);
988
989 // ./test/core/table_copy.wast:437
990 assert_trap(() => invoke($5, `check_t0`, [23]), `uninitialized element`);
991
992 // ./test/core/table_copy.wast:438
993 assert_trap(() => invoke($5, `check_t0`, [24]), `uninitialized element`);
994
995 // ./test/core/table_copy.wast:439
996 assert_trap(() => invoke($5, `check_t0`, [25]), `uninitialized element`);
997
998 // ./test/core/table_copy.wast:440
999 assert_trap(() => invoke($5, `check_t0`, [26]), `uninitialized element`);
1000
1001 // ./test/core/table_copy.wast:441
1002 assert_trap(() => invoke($5, `check_t0`, [27]), `uninitialized element`);
1003
1004 // ./test/core/table_copy.wast:442
1005 assert_trap(() => invoke($5, `check_t0`, [28]), `uninitialized element`);
1006
1007 // ./test/core/table_copy.wast:443
1008 assert_trap(() => invoke($5, `check_t0`, [29]), `uninitialized element`);
1009
1010 // ./test/core/table_copy.wast:444
1011 assert_trap(() => invoke($5, `check_t1`, [0]), `uninitialized element`);
1012
1013 // ./test/core/table_copy.wast:445
1014 assert_trap(() => invoke($5, `check_t1`, [1]), `uninitialized element`);
1015
1016 // ./test/core/table_copy.wast:446
1017 assert_trap(() => invoke($5, `check_t1`, [2]), `uninitialized element`);
1018
1019 // ./test/core/table_copy.wast:447
1020 assert_return(() => invoke($5, `check_t1`, [3]), [value("i32", 1)]);
1021
1022 // ./test/core/table_copy.wast:448
1023 assert_return(() => invoke($5, `check_t1`, [4]), [value("i32", 3)]);
1024
1025 // ./test/core/table_copy.wast:449
1026 assert_return(() => invoke($5, `check_t1`, [5]), [value("i32", 1)]);
1027
1028 // ./test/core/table_copy.wast:450
1029 assert_return(() => invoke($5, `check_t1`, [6]), [value("i32", 4)]);
1030
1031 // ./test/core/table_copy.wast:451
1032 assert_trap(() => invoke($5, `check_t1`, [7]), `uninitialized element`);
1033
1034 // ./test/core/table_copy.wast:452
1035 assert_trap(() => invoke($5, `check_t1`, [8]), `uninitialized element`);
1036
1037 // ./test/core/table_copy.wast:453
1038 assert_trap(() => invoke($5, `check_t1`, [9]), `uninitialized element`);
1039
1040 // ./test/core/table_copy.wast:454
1041 assert_trap(() => invoke($5, `check_t1`, [10]), `uninitialized element`);
1042
1043 // ./test/core/table_copy.wast:455
1044 assert_return(() => invoke($5, `check_t1`, [11]), [value("i32", 6)]);
1045
1046 // ./test/core/table_copy.wast:456
1047 assert_return(() => invoke($5, `check_t1`, [12]), [value("i32", 3)]);
1048
1049 // ./test/core/table_copy.wast:457
1050 assert_return(() => invoke($5, `check_t1`, [13]), [value("i32", 2)]);
1051
1052 // ./test/core/table_copy.wast:458
1053 assert_return(() => invoke($5, `check_t1`, [14]), [value("i32", 5)]);
1054
1055 // ./test/core/table_copy.wast:459
1056 assert_return(() => invoke($5, `check_t1`, [15]), [value("i32", 7)]);
1057
1058 // ./test/core/table_copy.wast:460
1059 assert_trap(() => invoke($5, `check_t1`, [16]), `uninitialized element`);
1060
1061 // ./test/core/table_copy.wast:461
1062 assert_trap(() => invoke($5, `check_t1`, [17]), `uninitialized element`);
1063
1064 // ./test/core/table_copy.wast:462
1065 assert_trap(() => invoke($5, `check_t1`, [18]), `uninitialized element`);
1066
1067 // ./test/core/table_copy.wast:463
1068 assert_trap(() => invoke($5, `check_t1`, [19]), `uninitialized element`);
1069
1070 // ./test/core/table_copy.wast:464
1071 assert_trap(() => invoke($5, `check_t1`, [20]), `uninitialized element`);
1072
1073 // ./test/core/table_copy.wast:465
1074 assert_trap(() => invoke($5, `check_t1`, [21]), `uninitialized element`);
1075
1076 // ./test/core/table_copy.wast:466
1077 assert_trap(() => invoke($5, `check_t1`, [22]), `uninitialized element`);
1078
1079 // ./test/core/table_copy.wast:467
1080 assert_trap(() => invoke($5, `check_t1`, [23]), `uninitialized element`);
1081
1082 // ./test/core/table_copy.wast:468
1083 assert_trap(() => invoke($5, `check_t1`, [24]), `uninitialized element`);
1084
1085 // ./test/core/table_copy.wast:469
1086 assert_trap(() => invoke($5, `check_t1`, [25]), `uninitialized element`);
1087
1088 // ./test/core/table_copy.wast:470
1089 assert_trap(() => invoke($5, `check_t1`, [26]), `uninitialized element`);
1090
1091 // ./test/core/table_copy.wast:471
1092 assert_trap(() => invoke($5, `check_t1`, [27]), `uninitialized element`);
1093
1094 // ./test/core/table_copy.wast:472
1095 assert_trap(() => invoke($5, `check_t1`, [28]), `uninitialized element`);
1096
1097 // ./test/core/table_copy.wast:473
1098 assert_trap(() => invoke($5, `check_t1`, [29]), `uninitialized element`);
1099
1100 // ./test/core/table_copy.wast:475
1101 let $6 = instantiate(`(module
1102 (type (func (result i32))) ;; type #0
1103 (import "a" "ef0" (func (result i32))) ;; index 0
1104 (import "a" "ef1" (func (result i32)))
1105 (import "a" "ef2" (func (result i32)))
1106 (import "a" "ef3" (func (result i32)))
1107 (import "a" "ef4" (func (result i32))) ;; index 4
1108 (table $$t0 30 30 funcref)
1109 (table $$t1 30 30 funcref)
1110 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
1111 (elem funcref
1112 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
1113 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
1114 (elem funcref
1115 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
1116 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
1117 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
1118 (func (result i32) (i32.const 5)) ;; index 5
1119 (func (result i32) (i32.const 6))
1120 (func (result i32) (i32.const 7))
1121 (func (result i32) (i32.const 8))
1122 (func (result i32) (i32.const 9)) ;; index 9
1123 (func (export "test")
1124 (table.copy $$t0 $$t0 (i32.const 25) (i32.const 1) (i32.const 3)))
1125 (func (export "check_t0") (param i32) (result i32)
1126 (call_indirect $$t0 (type 0) (local.get 0)))
1127 (func (export "check_t1") (param i32) (result i32)
1128 (call_indirect $$t1 (type 0) (local.get 0)))
1129 )`);
1130
1131 // ./test/core/table_copy.wast:505
1132 invoke($6, `test`, []);
1133
1134 // ./test/core/table_copy.wast:506
1135 assert_trap(() => invoke($6, `check_t0`, [0]), `uninitialized element`);
1136
1137 // ./test/core/table_copy.wast:507
1138 assert_trap(() => invoke($6, `check_t0`, [1]), `uninitialized element`);
1139
1140 // ./test/core/table_copy.wast:508
1141 assert_return(() => invoke($6, `check_t0`, [2]), [value("i32", 3)]);
1142
1143 // ./test/core/table_copy.wast:509
1144 assert_return(() => invoke($6, `check_t0`, [3]), [value("i32", 1)]);
1145
1146 // ./test/core/table_copy.wast:510
1147 assert_return(() => invoke($6, `check_t0`, [4]), [value("i32", 4)]);
1148
1149 // ./test/core/table_copy.wast:511
1150 assert_return(() => invoke($6, `check_t0`, [5]), [value("i32", 1)]);
1151
1152 // ./test/core/table_copy.wast:512
1153 assert_trap(() => invoke($6, `check_t0`, [6]), `uninitialized element`);
1154
1155 // ./test/core/table_copy.wast:513
1156 assert_trap(() => invoke($6, `check_t0`, [7]), `uninitialized element`);
1157
1158 // ./test/core/table_copy.wast:514
1159 assert_trap(() => invoke($6, `check_t0`, [8]), `uninitialized element`);
1160
1161 // ./test/core/table_copy.wast:515
1162 assert_trap(() => invoke($6, `check_t0`, [9]), `uninitialized element`);
1163
1164 // ./test/core/table_copy.wast:516
1165 assert_trap(() => invoke($6, `check_t0`, [10]), `uninitialized element`);
1166
1167 // ./test/core/table_copy.wast:517
1168 assert_trap(() => invoke($6, `check_t0`, [11]), `uninitialized element`);
1169
1170 // ./test/core/table_copy.wast:518
1171 assert_return(() => invoke($6, `check_t0`, [12]), [value("i32", 7)]);
1172
1173 // ./test/core/table_copy.wast:519
1174 assert_return(() => invoke($6, `check_t0`, [13]), [value("i32", 5)]);
1175
1176 // ./test/core/table_copy.wast:520
1177 assert_return(() => invoke($6, `check_t0`, [14]), [value("i32", 2)]);
1178
1179 // ./test/core/table_copy.wast:521
1180 assert_return(() => invoke($6, `check_t0`, [15]), [value("i32", 3)]);
1181
1182 // ./test/core/table_copy.wast:522
1183 assert_return(() => invoke($6, `check_t0`, [16]), [value("i32", 6)]);
1184
1185 // ./test/core/table_copy.wast:523
1186 assert_trap(() => invoke($6, `check_t0`, [17]), `uninitialized element`);
1187
1188 // ./test/core/table_copy.wast:524
1189 assert_trap(() => invoke($6, `check_t0`, [18]), `uninitialized element`);
1190
1191 // ./test/core/table_copy.wast:525
1192 assert_trap(() => invoke($6, `check_t0`, [19]), `uninitialized element`);
1193
1194 // ./test/core/table_copy.wast:526
1195 assert_trap(() => invoke($6, `check_t0`, [20]), `uninitialized element`);
1196
1197 // ./test/core/table_copy.wast:527
1198 assert_trap(() => invoke($6, `check_t0`, [21]), `uninitialized element`);
1199
1200 // ./test/core/table_copy.wast:528
1201 assert_trap(() => invoke($6, `check_t0`, [22]), `uninitialized element`);
1202
1203 // ./test/core/table_copy.wast:529
1204 assert_trap(() => invoke($6, `check_t0`, [23]), `uninitialized element`);
1205
1206 // ./test/core/table_copy.wast:530
1207 assert_trap(() => invoke($6, `check_t0`, [24]), `uninitialized element`);
1208
1209 // ./test/core/table_copy.wast:531
1210 assert_trap(() => invoke($6, `check_t0`, [25]), `uninitialized element`);
1211
1212 // ./test/core/table_copy.wast:532
1213 assert_return(() => invoke($6, `check_t0`, [26]), [value("i32", 3)]);
1214
1215 // ./test/core/table_copy.wast:533
1216 assert_return(() => invoke($6, `check_t0`, [27]), [value("i32", 1)]);
1217
1218 // ./test/core/table_copy.wast:534
1219 assert_trap(() => invoke($6, `check_t0`, [28]), `uninitialized element`);
1220
1221 // ./test/core/table_copy.wast:535
1222 assert_trap(() => invoke($6, `check_t0`, [29]), `uninitialized element`);
1223
1224 // ./test/core/table_copy.wast:536
1225 assert_trap(() => invoke($6, `check_t1`, [0]), `uninitialized element`);
1226
1227 // ./test/core/table_copy.wast:537
1228 assert_trap(() => invoke($6, `check_t1`, [1]), `uninitialized element`);
1229
1230 // ./test/core/table_copy.wast:538
1231 assert_trap(() => invoke($6, `check_t1`, [2]), `uninitialized element`);
1232
1233 // ./test/core/table_copy.wast:539
1234 assert_return(() => invoke($6, `check_t1`, [3]), [value("i32", 1)]);
1235
1236 // ./test/core/table_copy.wast:540
1237 assert_return(() => invoke($6, `check_t1`, [4]), [value("i32", 3)]);
1238
1239 // ./test/core/table_copy.wast:541
1240 assert_return(() => invoke($6, `check_t1`, [5]), [value("i32", 1)]);
1241
1242 // ./test/core/table_copy.wast:542
1243 assert_return(() => invoke($6, `check_t1`, [6]), [value("i32", 4)]);
1244
1245 // ./test/core/table_copy.wast:543
1246 assert_trap(() => invoke($6, `check_t1`, [7]), `uninitialized element`);
1247
1248 // ./test/core/table_copy.wast:544
1249 assert_trap(() => invoke($6, `check_t1`, [8]), `uninitialized element`);
1250
1251 // ./test/core/table_copy.wast:545
1252 assert_trap(() => invoke($6, `check_t1`, [9]), `uninitialized element`);
1253
1254 // ./test/core/table_copy.wast:546
1255 assert_trap(() => invoke($6, `check_t1`, [10]), `uninitialized element`);
1256
1257 // ./test/core/table_copy.wast:547
1258 assert_return(() => invoke($6, `check_t1`, [11]), [value("i32", 6)]);
1259
1260 // ./test/core/table_copy.wast:548
1261 assert_return(() => invoke($6, `check_t1`, [12]), [value("i32", 3)]);
1262
1263 // ./test/core/table_copy.wast:549
1264 assert_return(() => invoke($6, `check_t1`, [13]), [value("i32", 2)]);
1265
1266 // ./test/core/table_copy.wast:550
1267 assert_return(() => invoke($6, `check_t1`, [14]), [value("i32", 5)]);
1268
1269 // ./test/core/table_copy.wast:551
1270 assert_return(() => invoke($6, `check_t1`, [15]), [value("i32", 7)]);
1271
1272 // ./test/core/table_copy.wast:552
1273 assert_trap(() => invoke($6, `check_t1`, [16]), `uninitialized element`);
1274
1275 // ./test/core/table_copy.wast:553
1276 assert_trap(() => invoke($6, `check_t1`, [17]), `uninitialized element`);
1277
1278 // ./test/core/table_copy.wast:554
1279 assert_trap(() => invoke($6, `check_t1`, [18]), `uninitialized element`);
1280
1281 // ./test/core/table_copy.wast:555
1282 assert_trap(() => invoke($6, `check_t1`, [19]), `uninitialized element`);
1283
1284 // ./test/core/table_copy.wast:556
1285 assert_trap(() => invoke($6, `check_t1`, [20]), `uninitialized element`);
1286
1287 // ./test/core/table_copy.wast:557
1288 assert_trap(() => invoke($6, `check_t1`, [21]), `uninitialized element`);
1289
1290 // ./test/core/table_copy.wast:558
1291 assert_trap(() => invoke($6, `check_t1`, [22]), `uninitialized element`);
1292
1293 // ./test/core/table_copy.wast:559
1294 assert_trap(() => invoke($6, `check_t1`, [23]), `uninitialized element`);
1295
1296 // ./test/core/table_copy.wast:560
1297 assert_trap(() => invoke($6, `check_t1`, [24]), `uninitialized element`);
1298
1299 // ./test/core/table_copy.wast:561
1300 assert_trap(() => invoke($6, `check_t1`, [25]), `uninitialized element`);
1301
1302 // ./test/core/table_copy.wast:562
1303 assert_trap(() => invoke($6, `check_t1`, [26]), `uninitialized element`);
1304
1305 // ./test/core/table_copy.wast:563
1306 assert_trap(() => invoke($6, `check_t1`, [27]), `uninitialized element`);
1307
1308 // ./test/core/table_copy.wast:564
1309 assert_trap(() => invoke($6, `check_t1`, [28]), `uninitialized element`);
1310
1311 // ./test/core/table_copy.wast:565
1312 assert_trap(() => invoke($6, `check_t1`, [29]), `uninitialized element`);
1313
1314 // ./test/core/table_copy.wast:567
1315 let $7 = instantiate(`(module
1316 (type (func (result i32))) ;; type #0
1317 (import "a" "ef0" (func (result i32))) ;; index 0
1318 (import "a" "ef1" (func (result i32)))
1319 (import "a" "ef2" (func (result i32)))
1320 (import "a" "ef3" (func (result i32)))
1321 (import "a" "ef4" (func (result i32))) ;; index 4
1322 (table $$t0 30 30 funcref)
1323 (table $$t1 30 30 funcref)
1324 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
1325 (elem funcref
1326 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
1327 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
1328 (elem funcref
1329 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
1330 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
1331 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
1332 (func (result i32) (i32.const 5)) ;; index 5
1333 (func (result i32) (i32.const 6))
1334 (func (result i32) (i32.const 7))
1335 (func (result i32) (i32.const 8))
1336 (func (result i32) (i32.const 9)) ;; index 9
1337 (func (export "test")
1338 (table.copy $$t0 $$t0 (i32.const 10) (i32.const 12) (i32.const 7)))
1339 (func (export "check_t0") (param i32) (result i32)
1340 (call_indirect $$t0 (type 0) (local.get 0)))
1341 (func (export "check_t1") (param i32) (result i32)
1342 (call_indirect $$t1 (type 0) (local.get 0)))
1343 )`);
1344
1345 // ./test/core/table_copy.wast:597
1346 invoke($7, `test`, []);
1347
1348 // ./test/core/table_copy.wast:598
1349 assert_trap(() => invoke($7, `check_t0`, [0]), `uninitialized element`);
1350
1351 // ./test/core/table_copy.wast:599
1352 assert_trap(() => invoke($7, `check_t0`, [1]), `uninitialized element`);
1353
1354 // ./test/core/table_copy.wast:600
1355 assert_return(() => invoke($7, `check_t0`, [2]), [value("i32", 3)]);
1356
1357 // ./test/core/table_copy.wast:601
1358 assert_return(() => invoke($7, `check_t0`, [3]), [value("i32", 1)]);
1359
1360 // ./test/core/table_copy.wast:602
1361 assert_return(() => invoke($7, `check_t0`, [4]), [value("i32", 4)]);
1362
1363 // ./test/core/table_copy.wast:603
1364 assert_return(() => invoke($7, `check_t0`, [5]), [value("i32", 1)]);
1365
1366 // ./test/core/table_copy.wast:604
1367 assert_trap(() => invoke($7, `check_t0`, [6]), `uninitialized element`);
1368
1369 // ./test/core/table_copy.wast:605
1370 assert_trap(() => invoke($7, `check_t0`, [7]), `uninitialized element`);
1371
1372 // ./test/core/table_copy.wast:606
1373 assert_trap(() => invoke($7, `check_t0`, [8]), `uninitialized element`);
1374
1375 // ./test/core/table_copy.wast:607
1376 assert_trap(() => invoke($7, `check_t0`, [9]), `uninitialized element`);
1377
1378 // ./test/core/table_copy.wast:608
1379 assert_return(() => invoke($7, `check_t0`, [10]), [value("i32", 7)]);
1380
1381 // ./test/core/table_copy.wast:609
1382 assert_return(() => invoke($7, `check_t0`, [11]), [value("i32", 5)]);
1383
1384 // ./test/core/table_copy.wast:610
1385 assert_return(() => invoke($7, `check_t0`, [12]), [value("i32", 2)]);
1386
1387 // ./test/core/table_copy.wast:611
1388 assert_return(() => invoke($7, `check_t0`, [13]), [value("i32", 3)]);
1389
1390 // ./test/core/table_copy.wast:612
1391 assert_return(() => invoke($7, `check_t0`, [14]), [value("i32", 6)]);
1392
1393 // ./test/core/table_copy.wast:613
1394 assert_trap(() => invoke($7, `check_t0`, [15]), `uninitialized element`);
1395
1396 // ./test/core/table_copy.wast:614
1397 assert_trap(() => invoke($7, `check_t0`, [16]), `uninitialized element`);
1398
1399 // ./test/core/table_copy.wast:615
1400 assert_trap(() => invoke($7, `check_t0`, [17]), `uninitialized element`);
1401
1402 // ./test/core/table_copy.wast:616
1403 assert_trap(() => invoke($7, `check_t0`, [18]), `uninitialized element`);
1404
1405 // ./test/core/table_copy.wast:617
1406 assert_trap(() => invoke($7, `check_t0`, [19]), `uninitialized element`);
1407
1408 // ./test/core/table_copy.wast:618
1409 assert_trap(() => invoke($7, `check_t0`, [20]), `uninitialized element`);
1410
1411 // ./test/core/table_copy.wast:619
1412 assert_trap(() => invoke($7, `check_t0`, [21]), `uninitialized element`);
1413
1414 // ./test/core/table_copy.wast:620
1415 assert_trap(() => invoke($7, `check_t0`, [22]), `uninitialized element`);
1416
1417 // ./test/core/table_copy.wast:621
1418 assert_trap(() => invoke($7, `check_t0`, [23]), `uninitialized element`);
1419
1420 // ./test/core/table_copy.wast:622
1421 assert_trap(() => invoke($7, `check_t0`, [24]), `uninitialized element`);
1422
1423 // ./test/core/table_copy.wast:623
1424 assert_trap(() => invoke($7, `check_t0`, [25]), `uninitialized element`);
1425
1426 // ./test/core/table_copy.wast:624
1427 assert_trap(() => invoke($7, `check_t0`, [26]), `uninitialized element`);
1428
1429 // ./test/core/table_copy.wast:625
1430 assert_trap(() => invoke($7, `check_t0`, [27]), `uninitialized element`);
1431
1432 // ./test/core/table_copy.wast:626
1433 assert_trap(() => invoke($7, `check_t0`, [28]), `uninitialized element`);
1434
1435 // ./test/core/table_copy.wast:627
1436 assert_trap(() => invoke($7, `check_t0`, [29]), `uninitialized element`);
1437
1438 // ./test/core/table_copy.wast:628
1439 assert_trap(() => invoke($7, `check_t1`, [0]), `uninitialized element`);
1440
1441 // ./test/core/table_copy.wast:629
1442 assert_trap(() => invoke($7, `check_t1`, [1]), `uninitialized element`);
1443
1444 // ./test/core/table_copy.wast:630
1445 assert_trap(() => invoke($7, `check_t1`, [2]), `uninitialized element`);
1446
1447 // ./test/core/table_copy.wast:631
1448 assert_return(() => invoke($7, `check_t1`, [3]), [value("i32", 1)]);
1449
1450 // ./test/core/table_copy.wast:632
1451 assert_return(() => invoke($7, `check_t1`, [4]), [value("i32", 3)]);
1452
1453 // ./test/core/table_copy.wast:633
1454 assert_return(() => invoke($7, `check_t1`, [5]), [value("i32", 1)]);
1455
1456 // ./test/core/table_copy.wast:634
1457 assert_return(() => invoke($7, `check_t1`, [6]), [value("i32", 4)]);
1458
1459 // ./test/core/table_copy.wast:635
1460 assert_trap(() => invoke($7, `check_t1`, [7]), `uninitialized element`);
1461
1462 // ./test/core/table_copy.wast:636
1463 assert_trap(() => invoke($7, `check_t1`, [8]), `uninitialized element`);
1464
1465 // ./test/core/table_copy.wast:637
1466 assert_trap(() => invoke($7, `check_t1`, [9]), `uninitialized element`);
1467
1468 // ./test/core/table_copy.wast:638
1469 assert_trap(() => invoke($7, `check_t1`, [10]), `uninitialized element`);
1470
1471 // ./test/core/table_copy.wast:639
1472 assert_return(() => invoke($7, `check_t1`, [11]), [value("i32", 6)]);
1473
1474 // ./test/core/table_copy.wast:640
1475 assert_return(() => invoke($7, `check_t1`, [12]), [value("i32", 3)]);
1476
1477 // ./test/core/table_copy.wast:641
1478 assert_return(() => invoke($7, `check_t1`, [13]), [value("i32", 2)]);
1479
1480 // ./test/core/table_copy.wast:642
1481 assert_return(() => invoke($7, `check_t1`, [14]), [value("i32", 5)]);
1482
1483 // ./test/core/table_copy.wast:643
1484 assert_return(() => invoke($7, `check_t1`, [15]), [value("i32", 7)]);
1485
1486 // ./test/core/table_copy.wast:644
1487 assert_trap(() => invoke($7, `check_t1`, [16]), `uninitialized element`);
1488
1489 // ./test/core/table_copy.wast:645
1490 assert_trap(() => invoke($7, `check_t1`, [17]), `uninitialized element`);
1491
1492 // ./test/core/table_copy.wast:646
1493 assert_trap(() => invoke($7, `check_t1`, [18]), `uninitialized element`);
1494
1495 // ./test/core/table_copy.wast:647
1496 assert_trap(() => invoke($7, `check_t1`, [19]), `uninitialized element`);
1497
1498 // ./test/core/table_copy.wast:648
1499 assert_trap(() => invoke($7, `check_t1`, [20]), `uninitialized element`);
1500
1501 // ./test/core/table_copy.wast:649
1502 assert_trap(() => invoke($7, `check_t1`, [21]), `uninitialized element`);
1503
1504 // ./test/core/table_copy.wast:650
1505 assert_trap(() => invoke($7, `check_t1`, [22]), `uninitialized element`);
1506
1507 // ./test/core/table_copy.wast:651
1508 assert_trap(() => invoke($7, `check_t1`, [23]), `uninitialized element`);
1509
1510 // ./test/core/table_copy.wast:652
1511 assert_trap(() => invoke($7, `check_t1`, [24]), `uninitialized element`);
1512
1513 // ./test/core/table_copy.wast:653
1514 assert_trap(() => invoke($7, `check_t1`, [25]), `uninitialized element`);
1515
1516 // ./test/core/table_copy.wast:654
1517 assert_trap(() => invoke($7, `check_t1`, [26]), `uninitialized element`);
1518
1519 // ./test/core/table_copy.wast:655
1520 assert_trap(() => invoke($7, `check_t1`, [27]), `uninitialized element`);
1521
1522 // ./test/core/table_copy.wast:656
1523 assert_trap(() => invoke($7, `check_t1`, [28]), `uninitialized element`);
1524
1525 // ./test/core/table_copy.wast:657
1526 assert_trap(() => invoke($7, `check_t1`, [29]), `uninitialized element`);
1527
1528 // ./test/core/table_copy.wast:659
1529 let $8 = instantiate(`(module
1530 (type (func (result i32))) ;; type #0
1531 (import "a" "ef0" (func (result i32))) ;; index 0
1532 (import "a" "ef1" (func (result i32)))
1533 (import "a" "ef2" (func (result i32)))
1534 (import "a" "ef3" (func (result i32)))
1535 (import "a" "ef4" (func (result i32))) ;; index 4
1536 (table $$t0 30 30 funcref)
1537 (table $$t1 30 30 funcref)
1538 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
1539 (elem funcref
1540 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
1541 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
1542 (elem funcref
1543 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
1544 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
1545 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
1546 (func (result i32) (i32.const 5)) ;; index 5
1547 (func (result i32) (i32.const 6))
1548 (func (result i32) (i32.const 7))
1549 (func (result i32) (i32.const 8))
1550 (func (result i32) (i32.const 9)) ;; index 9
1551 (func (export "test")
1552 (table.copy $$t0 $$t0 (i32.const 12) (i32.const 10) (i32.const 7)))
1553 (func (export "check_t0") (param i32) (result i32)
1554 (call_indirect $$t0 (type 0) (local.get 0)))
1555 (func (export "check_t1") (param i32) (result i32)
1556 (call_indirect $$t1 (type 0) (local.get 0)))
1557 )`);
1558
1559 // ./test/core/table_copy.wast:689
1560 invoke($8, `test`, []);
1561
1562 // ./test/core/table_copy.wast:690
1563 assert_trap(() => invoke($8, `check_t0`, [0]), `uninitialized element`);
1564
1565 // ./test/core/table_copy.wast:691
1566 assert_trap(() => invoke($8, `check_t0`, [1]), `uninitialized element`);
1567
1568 // ./test/core/table_copy.wast:692
1569 assert_return(() => invoke($8, `check_t0`, [2]), [value("i32", 3)]);
1570
1571 // ./test/core/table_copy.wast:693
1572 assert_return(() => invoke($8, `check_t0`, [3]), [value("i32", 1)]);
1573
1574 // ./test/core/table_copy.wast:694
1575 assert_return(() => invoke($8, `check_t0`, [4]), [value("i32", 4)]);
1576
1577 // ./test/core/table_copy.wast:695
1578 assert_return(() => invoke($8, `check_t0`, [5]), [value("i32", 1)]);
1579
1580 // ./test/core/table_copy.wast:696
1581 assert_trap(() => invoke($8, `check_t0`, [6]), `uninitialized element`);
1582
1583 // ./test/core/table_copy.wast:697
1584 assert_trap(() => invoke($8, `check_t0`, [7]), `uninitialized element`);
1585
1586 // ./test/core/table_copy.wast:698
1587 assert_trap(() => invoke($8, `check_t0`, [8]), `uninitialized element`);
1588
1589 // ./test/core/table_copy.wast:699
1590 assert_trap(() => invoke($8, `check_t0`, [9]), `uninitialized element`);
1591
1592 // ./test/core/table_copy.wast:700
1593 assert_trap(() => invoke($8, `check_t0`, [10]), `uninitialized element`);
1594
1595 // ./test/core/table_copy.wast:701
1596 assert_trap(() => invoke($8, `check_t0`, [11]), `uninitialized element`);
1597
1598 // ./test/core/table_copy.wast:702
1599 assert_trap(() => invoke($8, `check_t0`, [12]), `uninitialized element`);
1600
1601 // ./test/core/table_copy.wast:703
1602 assert_trap(() => invoke($8, `check_t0`, [13]), `uninitialized element`);
1603
1604 // ./test/core/table_copy.wast:704
1605 assert_return(() => invoke($8, `check_t0`, [14]), [value("i32", 7)]);
1606
1607 // ./test/core/table_copy.wast:705
1608 assert_return(() => invoke($8, `check_t0`, [15]), [value("i32", 5)]);
1609
1610 // ./test/core/table_copy.wast:706
1611 assert_return(() => invoke($8, `check_t0`, [16]), [value("i32", 2)]);
1612
1613 // ./test/core/table_copy.wast:707
1614 assert_return(() => invoke($8, `check_t0`, [17]), [value("i32", 3)]);
1615
1616 // ./test/core/table_copy.wast:708
1617 assert_return(() => invoke($8, `check_t0`, [18]), [value("i32", 6)]);
1618
1619 // ./test/core/table_copy.wast:709
1620 assert_trap(() => invoke($8, `check_t0`, [19]), `uninitialized element`);
1621
1622 // ./test/core/table_copy.wast:710
1623 assert_trap(() => invoke($8, `check_t0`, [20]), `uninitialized element`);
1624
1625 // ./test/core/table_copy.wast:711
1626 assert_trap(() => invoke($8, `check_t0`, [21]), `uninitialized element`);
1627
1628 // ./test/core/table_copy.wast:712
1629 assert_trap(() => invoke($8, `check_t0`, [22]), `uninitialized element`);
1630
1631 // ./test/core/table_copy.wast:713
1632 assert_trap(() => invoke($8, `check_t0`, [23]), `uninitialized element`);
1633
1634 // ./test/core/table_copy.wast:714
1635 assert_trap(() => invoke($8, `check_t0`, [24]), `uninitialized element`);
1636
1637 // ./test/core/table_copy.wast:715
1638 assert_trap(() => invoke($8, `check_t0`, [25]), `uninitialized element`);
1639
1640 // ./test/core/table_copy.wast:716
1641 assert_trap(() => invoke($8, `check_t0`, [26]), `uninitialized element`);
1642
1643 // ./test/core/table_copy.wast:717
1644 assert_trap(() => invoke($8, `check_t0`, [27]), `uninitialized element`);
1645
1646 // ./test/core/table_copy.wast:718
1647 assert_trap(() => invoke($8, `check_t0`, [28]), `uninitialized element`);
1648
1649 // ./test/core/table_copy.wast:719
1650 assert_trap(() => invoke($8, `check_t0`, [29]), `uninitialized element`);
1651
1652 // ./test/core/table_copy.wast:720
1653 assert_trap(() => invoke($8, `check_t1`, [0]), `uninitialized element`);
1654
1655 // ./test/core/table_copy.wast:721
1656 assert_trap(() => invoke($8, `check_t1`, [1]), `uninitialized element`);
1657
1658 // ./test/core/table_copy.wast:722
1659 assert_trap(() => invoke($8, `check_t1`, [2]), `uninitialized element`);
1660
1661 // ./test/core/table_copy.wast:723
1662 assert_return(() => invoke($8, `check_t1`, [3]), [value("i32", 1)]);
1663
1664 // ./test/core/table_copy.wast:724
1665 assert_return(() => invoke($8, `check_t1`, [4]), [value("i32", 3)]);
1666
1667 // ./test/core/table_copy.wast:725
1668 assert_return(() => invoke($8, `check_t1`, [5]), [value("i32", 1)]);
1669
1670 // ./test/core/table_copy.wast:726
1671 assert_return(() => invoke($8, `check_t1`, [6]), [value("i32", 4)]);
1672
1673 // ./test/core/table_copy.wast:727
1674 assert_trap(() => invoke($8, `check_t1`, [7]), `uninitialized element`);
1675
1676 // ./test/core/table_copy.wast:728
1677 assert_trap(() => invoke($8, `check_t1`, [8]), `uninitialized element`);
1678
1679 // ./test/core/table_copy.wast:729
1680 assert_trap(() => invoke($8, `check_t1`, [9]), `uninitialized element`);
1681
1682 // ./test/core/table_copy.wast:730
1683 assert_trap(() => invoke($8, `check_t1`, [10]), `uninitialized element`);
1684
1685 // ./test/core/table_copy.wast:731
1686 assert_return(() => invoke($8, `check_t1`, [11]), [value("i32", 6)]);
1687
1688 // ./test/core/table_copy.wast:732
1689 assert_return(() => invoke($8, `check_t1`, [12]), [value("i32", 3)]);
1690
1691 // ./test/core/table_copy.wast:733
1692 assert_return(() => invoke($8, `check_t1`, [13]), [value("i32", 2)]);
1693
1694 // ./test/core/table_copy.wast:734
1695 assert_return(() => invoke($8, `check_t1`, [14]), [value("i32", 5)]);
1696
1697 // ./test/core/table_copy.wast:735
1698 assert_return(() => invoke($8, `check_t1`, [15]), [value("i32", 7)]);
1699
1700 // ./test/core/table_copy.wast:736
1701 assert_trap(() => invoke($8, `check_t1`, [16]), `uninitialized element`);
1702
1703 // ./test/core/table_copy.wast:737
1704 assert_trap(() => invoke($8, `check_t1`, [17]), `uninitialized element`);
1705
1706 // ./test/core/table_copy.wast:738
1707 assert_trap(() => invoke($8, `check_t1`, [18]), `uninitialized element`);
1708
1709 // ./test/core/table_copy.wast:739
1710 assert_trap(() => invoke($8, `check_t1`, [19]), `uninitialized element`);
1711
1712 // ./test/core/table_copy.wast:740
1713 assert_trap(() => invoke($8, `check_t1`, [20]), `uninitialized element`);
1714
1715 // ./test/core/table_copy.wast:741
1716 assert_trap(() => invoke($8, `check_t1`, [21]), `uninitialized element`);
1717
1718 // ./test/core/table_copy.wast:742
1719 assert_trap(() => invoke($8, `check_t1`, [22]), `uninitialized element`);
1720
1721 // ./test/core/table_copy.wast:743
1722 assert_trap(() => invoke($8, `check_t1`, [23]), `uninitialized element`);
1723
1724 // ./test/core/table_copy.wast:744
1725 assert_trap(() => invoke($8, `check_t1`, [24]), `uninitialized element`);
1726
1727 // ./test/core/table_copy.wast:745
1728 assert_trap(() => invoke($8, `check_t1`, [25]), `uninitialized element`);
1729
1730 // ./test/core/table_copy.wast:746
1731 assert_trap(() => invoke($8, `check_t1`, [26]), `uninitialized element`);
1732
1733 // ./test/core/table_copy.wast:747
1734 assert_trap(() => invoke($8, `check_t1`, [27]), `uninitialized element`);
1735
1736 // ./test/core/table_copy.wast:748
1737 assert_trap(() => invoke($8, `check_t1`, [28]), `uninitialized element`);
1738
1739 // ./test/core/table_copy.wast:749
1740 assert_trap(() => invoke($8, `check_t1`, [29]), `uninitialized element`);
1741
1742 // ./test/core/table_copy.wast:751
1743 let $9 = instantiate(`(module
1744 (type (func (result i32))) ;; type #0
1745 (import "a" "ef0" (func (result i32))) ;; index 0
1746 (import "a" "ef1" (func (result i32)))
1747 (import "a" "ef2" (func (result i32)))
1748 (import "a" "ef3" (func (result i32)))
1749 (import "a" "ef4" (func (result i32))) ;; index 4
1750 (table $$t0 30 30 funcref)
1751 (table $$t1 30 30 funcref)
1752 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
1753 (elem funcref
1754 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
1755 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
1756 (elem funcref
1757 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
1758 (elem (table $$t1) (i32.const 3) func 1 3 1 4)
1759 (elem (table $$t1) (i32.const 11) func 6 3 2 5 7)
1760 (func (result i32) (i32.const 5)) ;; index 5
1761 (func (result i32) (i32.const 6))
1762 (func (result i32) (i32.const 7))
1763 (func (result i32) (i32.const 8))
1764 (func (result i32) (i32.const 9)) ;; index 9
1765 (func (export "test")
1766 (table.copy $$t1 $$t0 (i32.const 10) (i32.const 0) (i32.const 20)))
1767 (func (export "check_t0") (param i32) (result i32)
1768 (call_indirect $$t0 (type 0) (local.get 0)))
1769 (func (export "check_t1") (param i32) (result i32)
1770 (call_indirect $$t1 (type 0) (local.get 0)))
1771 )`);
1772
1773 // ./test/core/table_copy.wast:781
1774 invoke($9, `test`, []);
1775
1776 // ./test/core/table_copy.wast:782
1777 assert_trap(() => invoke($9, `check_t0`, [0]), `uninitialized element`);
1778
1779 // ./test/core/table_copy.wast:783
1780 assert_trap(() => invoke($9, `check_t0`, [1]), `uninitialized element`);
1781
1782 // ./test/core/table_copy.wast:784
1783 assert_return(() => invoke($9, `check_t0`, [2]), [value("i32", 3)]);
1784
1785 // ./test/core/table_copy.wast:785
1786 assert_return(() => invoke($9, `check_t0`, [3]), [value("i32", 1)]);
1787
1788 // ./test/core/table_copy.wast:786
1789 assert_return(() => invoke($9, `check_t0`, [4]), [value("i32", 4)]);
1790
1791 // ./test/core/table_copy.wast:787
1792 assert_return(() => invoke($9, `check_t0`, [5]), [value("i32", 1)]);
1793
1794 // ./test/core/table_copy.wast:788
1795 assert_trap(() => invoke($9, `check_t0`, [6]), `uninitialized element`);
1796
1797 // ./test/core/table_copy.wast:789
1798 assert_trap(() => invoke($9, `check_t0`, [7]), `uninitialized element`);
1799
1800 // ./test/core/table_copy.wast:790
1801 assert_trap(() => invoke($9, `check_t0`, [8]), `uninitialized element`);
1802
1803 // ./test/core/table_copy.wast:791
1804 assert_trap(() => invoke($9, `check_t0`, [9]), `uninitialized element`);
1805
1806 // ./test/core/table_copy.wast:792
1807 assert_trap(() => invoke($9, `check_t0`, [10]), `uninitialized element`);
1808
1809 // ./test/core/table_copy.wast:793
1810 assert_trap(() => invoke($9, `check_t0`, [11]), `uninitialized element`);
1811
1812 // ./test/core/table_copy.wast:794
1813 assert_return(() => invoke($9, `check_t0`, [12]), [value("i32", 7)]);
1814
1815 // ./test/core/table_copy.wast:795
1816 assert_return(() => invoke($9, `check_t0`, [13]), [value("i32", 5)]);
1817
1818 // ./test/core/table_copy.wast:796
1819 assert_return(() => invoke($9, `check_t0`, [14]), [value("i32", 2)]);
1820
1821 // ./test/core/table_copy.wast:797
1822 assert_return(() => invoke($9, `check_t0`, [15]), [value("i32", 3)]);
1823
1824 // ./test/core/table_copy.wast:798
1825 assert_return(() => invoke($9, `check_t0`, [16]), [value("i32", 6)]);
1826
1827 // ./test/core/table_copy.wast:799
1828 assert_trap(() => invoke($9, `check_t0`, [17]), `uninitialized element`);
1829
1830 // ./test/core/table_copy.wast:800
1831 assert_trap(() => invoke($9, `check_t0`, [18]), `uninitialized element`);
1832
1833 // ./test/core/table_copy.wast:801
1834 assert_trap(() => invoke($9, `check_t0`, [19]), `uninitialized element`);
1835
1836 // ./test/core/table_copy.wast:802
1837 assert_trap(() => invoke($9, `check_t0`, [20]), `uninitialized element`);
1838
1839 // ./test/core/table_copy.wast:803
1840 assert_trap(() => invoke($9, `check_t0`, [21]), `uninitialized element`);
1841
1842 // ./test/core/table_copy.wast:804
1843 assert_trap(() => invoke($9, `check_t0`, [22]), `uninitialized element`);
1844
1845 // ./test/core/table_copy.wast:805
1846 assert_trap(() => invoke($9, `check_t0`, [23]), `uninitialized element`);
1847
1848 // ./test/core/table_copy.wast:806
1849 assert_trap(() => invoke($9, `check_t0`, [24]), `uninitialized element`);
1850
1851 // ./test/core/table_copy.wast:807
1852 assert_trap(() => invoke($9, `check_t0`, [25]), `uninitialized element`);
1853
1854 // ./test/core/table_copy.wast:808
1855 assert_trap(() => invoke($9, `check_t0`, [26]), `uninitialized element`);
1856
1857 // ./test/core/table_copy.wast:809
1858 assert_trap(() => invoke($9, `check_t0`, [27]), `uninitialized element`);
1859
1860 // ./test/core/table_copy.wast:810
1861 assert_trap(() => invoke($9, `check_t0`, [28]), `uninitialized element`);
1862
1863 // ./test/core/table_copy.wast:811
1864 assert_trap(() => invoke($9, `check_t0`, [29]), `uninitialized element`);
1865
1866 // ./test/core/table_copy.wast:812
1867 assert_trap(() => invoke($9, `check_t1`, [0]), `uninitialized element`);
1868
1869 // ./test/core/table_copy.wast:813
1870 assert_trap(() => invoke($9, `check_t1`, [1]), `uninitialized element`);
1871
1872 // ./test/core/table_copy.wast:814
1873 assert_trap(() => invoke($9, `check_t1`, [2]), `uninitialized element`);
1874
1875 // ./test/core/table_copy.wast:815
1876 assert_return(() => invoke($9, `check_t1`, [3]), [value("i32", 1)]);
1877
1878 // ./test/core/table_copy.wast:816
1879 assert_return(() => invoke($9, `check_t1`, [4]), [value("i32", 3)]);
1880
1881 // ./test/core/table_copy.wast:817
1882 assert_return(() => invoke($9, `check_t1`, [5]), [value("i32", 1)]);
1883
1884 // ./test/core/table_copy.wast:818
1885 assert_return(() => invoke($9, `check_t1`, [6]), [value("i32", 4)]);
1886
1887 // ./test/core/table_copy.wast:819
1888 assert_trap(() => invoke($9, `check_t1`, [7]), `uninitialized element`);
1889
1890 // ./test/core/table_copy.wast:820
1891 assert_trap(() => invoke($9, `check_t1`, [8]), `uninitialized element`);
1892
1893 // ./test/core/table_copy.wast:821
1894 assert_trap(() => invoke($9, `check_t1`, [9]), `uninitialized element`);
1895
1896 // ./test/core/table_copy.wast:822
1897 assert_trap(() => invoke($9, `check_t1`, [10]), `uninitialized element`);
1898
1899 // ./test/core/table_copy.wast:823
1900 assert_trap(() => invoke($9, `check_t1`, [11]), `uninitialized element`);
1901
1902 // ./test/core/table_copy.wast:824
1903 assert_return(() => invoke($9, `check_t1`, [12]), [value("i32", 3)]);
1904
1905 // ./test/core/table_copy.wast:825
1906 assert_return(() => invoke($9, `check_t1`, [13]), [value("i32", 1)]);
1907
1908 // ./test/core/table_copy.wast:826
1909 assert_return(() => invoke($9, `check_t1`, [14]), [value("i32", 4)]);
1910
1911 // ./test/core/table_copy.wast:827
1912 assert_return(() => invoke($9, `check_t1`, [15]), [value("i32", 1)]);
1913
1914 // ./test/core/table_copy.wast:828
1915 assert_trap(() => invoke($9, `check_t1`, [16]), `uninitialized element`);
1916
1917 // ./test/core/table_copy.wast:829
1918 assert_trap(() => invoke($9, `check_t1`, [17]), `uninitialized element`);
1919
1920 // ./test/core/table_copy.wast:830
1921 assert_trap(() => invoke($9, `check_t1`, [18]), `uninitialized element`);
1922
1923 // ./test/core/table_copy.wast:831
1924 assert_trap(() => invoke($9, `check_t1`, [19]), `uninitialized element`);
1925
1926 // ./test/core/table_copy.wast:832
1927 assert_trap(() => invoke($9, `check_t1`, [20]), `uninitialized element`);
1928
1929 // ./test/core/table_copy.wast:833
1930 assert_trap(() => invoke($9, `check_t1`, [21]), `uninitialized element`);
1931
1932 // ./test/core/table_copy.wast:834
1933 assert_return(() => invoke($9, `check_t1`, [22]), [value("i32", 7)]);
1934
1935 // ./test/core/table_copy.wast:835
1936 assert_return(() => invoke($9, `check_t1`, [23]), [value("i32", 5)]);
1937
1938 // ./test/core/table_copy.wast:836
1939 assert_return(() => invoke($9, `check_t1`, [24]), [value("i32", 2)]);
1940
1941 // ./test/core/table_copy.wast:837
1942 assert_return(() => invoke($9, `check_t1`, [25]), [value("i32", 3)]);
1943
1944 // ./test/core/table_copy.wast:838
1945 assert_return(() => invoke($9, `check_t1`, [26]), [value("i32", 6)]);
1946
1947 // ./test/core/table_copy.wast:839
1948 assert_trap(() => invoke($9, `check_t1`, [27]), `uninitialized element`);
1949
1950 // ./test/core/table_copy.wast:840
1951 assert_trap(() => invoke($9, `check_t1`, [28]), `uninitialized element`);
1952
1953 // ./test/core/table_copy.wast:841
1954 assert_trap(() => invoke($9, `check_t1`, [29]), `uninitialized element`);
1955
1956 // ./test/core/table_copy.wast:843
1957 let $10 = instantiate(`(module
1958 (type (func (result i32))) ;; type #0
1959 (import "a" "ef0" (func (result i32))) ;; index 0
1960 (import "a" "ef1" (func (result i32)))
1961 (import "a" "ef2" (func (result i32)))
1962 (import "a" "ef3" (func (result i32)))
1963 (import "a" "ef4" (func (result i32))) ;; index 4
1964 (table $$t0 30 30 funcref)
1965 (table $$t1 30 30 funcref)
1966 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
1967 (elem funcref
1968 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
1969 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
1970 (elem funcref
1971 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
1972 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
1973 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
1974 (func (result i32) (i32.const 5)) ;; index 5
1975 (func (result i32) (i32.const 6))
1976 (func (result i32) (i32.const 7))
1977 (func (result i32) (i32.const 8))
1978 (func (result i32) (i32.const 9)) ;; index 9
1979 (func (export "test")
1980 (nop))
1981 (func (export "check_t0") (param i32) (result i32)
1982 (call_indirect $$t1 (type 0) (local.get 0)))
1983 (func (export "check_t1") (param i32) (result i32)
1984 (call_indirect $$t0 (type 0) (local.get 0)))
1985 )`);
1986
1987 // ./test/core/table_copy.wast:873
1988 invoke($10, `test`, []);
1989
1990 // ./test/core/table_copy.wast:874
1991 assert_trap(() => invoke($10, `check_t0`, [0]), `uninitialized element`);
1992
1993 // ./test/core/table_copy.wast:875
1994 assert_trap(() => invoke($10, `check_t0`, [1]), `uninitialized element`);
1995
1996 // ./test/core/table_copy.wast:876
1997 assert_return(() => invoke($10, `check_t0`, [2]), [value("i32", 3)]);
1998
1999 // ./test/core/table_copy.wast:877
2000 assert_return(() => invoke($10, `check_t0`, [3]), [value("i32", 1)]);
2001
2002 // ./test/core/table_copy.wast:878
2003 assert_return(() => invoke($10, `check_t0`, [4]), [value("i32", 4)]);
2004
2005 // ./test/core/table_copy.wast:879
2006 assert_return(() => invoke($10, `check_t0`, [5]), [value("i32", 1)]);
2007
2008 // ./test/core/table_copy.wast:880
2009 assert_trap(() => invoke($10, `check_t0`, [6]), `uninitialized element`);
2010
2011 // ./test/core/table_copy.wast:881
2012 assert_trap(() => invoke($10, `check_t0`, [7]), `uninitialized element`);
2013
2014 // ./test/core/table_copy.wast:882
2015 assert_trap(() => invoke($10, `check_t0`, [8]), `uninitialized element`);
2016
2017 // ./test/core/table_copy.wast:883
2018 assert_trap(() => invoke($10, `check_t0`, [9]), `uninitialized element`);
2019
2020 // ./test/core/table_copy.wast:884
2021 assert_trap(() => invoke($10, `check_t0`, [10]), `uninitialized element`);
2022
2023 // ./test/core/table_copy.wast:885
2024 assert_trap(() => invoke($10, `check_t0`, [11]), `uninitialized element`);
2025
2026 // ./test/core/table_copy.wast:886
2027 assert_return(() => invoke($10, `check_t0`, [12]), [value("i32", 7)]);
2028
2029 // ./test/core/table_copy.wast:887
2030 assert_return(() => invoke($10, `check_t0`, [13]), [value("i32", 5)]);
2031
2032 // ./test/core/table_copy.wast:888
2033 assert_return(() => invoke($10, `check_t0`, [14]), [value("i32", 2)]);
2034
2035 // ./test/core/table_copy.wast:889
2036 assert_return(() => invoke($10, `check_t0`, [15]), [value("i32", 3)]);
2037
2038 // ./test/core/table_copy.wast:890
2039 assert_return(() => invoke($10, `check_t0`, [16]), [value("i32", 6)]);
2040
2041 // ./test/core/table_copy.wast:891
2042 assert_trap(() => invoke($10, `check_t0`, [17]), `uninitialized element`);
2043
2044 // ./test/core/table_copy.wast:892
2045 assert_trap(() => invoke($10, `check_t0`, [18]), `uninitialized element`);
2046
2047 // ./test/core/table_copy.wast:893
2048 assert_trap(() => invoke($10, `check_t0`, [19]), `uninitialized element`);
2049
2050 // ./test/core/table_copy.wast:894
2051 assert_trap(() => invoke($10, `check_t0`, [20]), `uninitialized element`);
2052
2053 // ./test/core/table_copy.wast:895
2054 assert_trap(() => invoke($10, `check_t0`, [21]), `uninitialized element`);
2055
2056 // ./test/core/table_copy.wast:896
2057 assert_trap(() => invoke($10, `check_t0`, [22]), `uninitialized element`);
2058
2059 // ./test/core/table_copy.wast:897
2060 assert_trap(() => invoke($10, `check_t0`, [23]), `uninitialized element`);
2061
2062 // ./test/core/table_copy.wast:898
2063 assert_trap(() => invoke($10, `check_t0`, [24]), `uninitialized element`);
2064
2065 // ./test/core/table_copy.wast:899
2066 assert_trap(() => invoke($10, `check_t0`, [25]), `uninitialized element`);
2067
2068 // ./test/core/table_copy.wast:900
2069 assert_trap(() => invoke($10, `check_t0`, [26]), `uninitialized element`);
2070
2071 // ./test/core/table_copy.wast:901
2072 assert_trap(() => invoke($10, `check_t0`, [27]), `uninitialized element`);
2073
2074 // ./test/core/table_copy.wast:902
2075 assert_trap(() => invoke($10, `check_t0`, [28]), `uninitialized element`);
2076
2077 // ./test/core/table_copy.wast:903
2078 assert_trap(() => invoke($10, `check_t0`, [29]), `uninitialized element`);
2079
2080 // ./test/core/table_copy.wast:904
2081 assert_trap(() => invoke($10, `check_t1`, [0]), `uninitialized element`);
2082
2083 // ./test/core/table_copy.wast:905
2084 assert_trap(() => invoke($10, `check_t1`, [1]), `uninitialized element`);
2085
2086 // ./test/core/table_copy.wast:906
2087 assert_trap(() => invoke($10, `check_t1`, [2]), `uninitialized element`);
2088
2089 // ./test/core/table_copy.wast:907
2090 assert_return(() => invoke($10, `check_t1`, [3]), [value("i32", 1)]);
2091
2092 // ./test/core/table_copy.wast:908
2093 assert_return(() => invoke($10, `check_t1`, [4]), [value("i32", 3)]);
2094
2095 // ./test/core/table_copy.wast:909
2096 assert_return(() => invoke($10, `check_t1`, [5]), [value("i32", 1)]);
2097
2098 // ./test/core/table_copy.wast:910
2099 assert_return(() => invoke($10, `check_t1`, [6]), [value("i32", 4)]);
2100
2101 // ./test/core/table_copy.wast:911
2102 assert_trap(() => invoke($10, `check_t1`, [7]), `uninitialized element`);
2103
2104 // ./test/core/table_copy.wast:912
2105 assert_trap(() => invoke($10, `check_t1`, [8]), `uninitialized element`);
2106
2107 // ./test/core/table_copy.wast:913
2108 assert_trap(() => invoke($10, `check_t1`, [9]), `uninitialized element`);
2109
2110 // ./test/core/table_copy.wast:914
2111 assert_trap(() => invoke($10, `check_t1`, [10]), `uninitialized element`);
2112
2113 // ./test/core/table_copy.wast:915
2114 assert_return(() => invoke($10, `check_t1`, [11]), [value("i32", 6)]);
2115
2116 // ./test/core/table_copy.wast:916
2117 assert_return(() => invoke($10, `check_t1`, [12]), [value("i32", 3)]);
2118
2119 // ./test/core/table_copy.wast:917
2120 assert_return(() => invoke($10, `check_t1`, [13]), [value("i32", 2)]);
2121
2122 // ./test/core/table_copy.wast:918
2123 assert_return(() => invoke($10, `check_t1`, [14]), [value("i32", 5)]);
2124
2125 // ./test/core/table_copy.wast:919
2126 assert_return(() => invoke($10, `check_t1`, [15]), [value("i32", 7)]);
2127
2128 // ./test/core/table_copy.wast:920
2129 assert_trap(() => invoke($10, `check_t1`, [16]), `uninitialized element`);
2130
2131 // ./test/core/table_copy.wast:921
2132 assert_trap(() => invoke($10, `check_t1`, [17]), `uninitialized element`);
2133
2134 // ./test/core/table_copy.wast:922
2135 assert_trap(() => invoke($10, `check_t1`, [18]), `uninitialized element`);
2136
2137 // ./test/core/table_copy.wast:923
2138 assert_trap(() => invoke($10, `check_t1`, [19]), `uninitialized element`);
2139
2140 // ./test/core/table_copy.wast:924
2141 assert_trap(() => invoke($10, `check_t1`, [20]), `uninitialized element`);
2142
2143 // ./test/core/table_copy.wast:925
2144 assert_trap(() => invoke($10, `check_t1`, [21]), `uninitialized element`);
2145
2146 // ./test/core/table_copy.wast:926
2147 assert_trap(() => invoke($10, `check_t1`, [22]), `uninitialized element`);
2148
2149 // ./test/core/table_copy.wast:927
2150 assert_trap(() => invoke($10, `check_t1`, [23]), `uninitialized element`);
2151
2152 // ./test/core/table_copy.wast:928
2153 assert_trap(() => invoke($10, `check_t1`, [24]), `uninitialized element`);
2154
2155 // ./test/core/table_copy.wast:929
2156 assert_trap(() => invoke($10, `check_t1`, [25]), `uninitialized element`);
2157
2158 // ./test/core/table_copy.wast:930
2159 assert_trap(() => invoke($10, `check_t1`, [26]), `uninitialized element`);
2160
2161 // ./test/core/table_copy.wast:931
2162 assert_trap(() => invoke($10, `check_t1`, [27]), `uninitialized element`);
2163
2164 // ./test/core/table_copy.wast:932
2165 assert_trap(() => invoke($10, `check_t1`, [28]), `uninitialized element`);
2166
2167 // ./test/core/table_copy.wast:933
2168 assert_trap(() => invoke($10, `check_t1`, [29]), `uninitialized element`);
2169
2170 // ./test/core/table_copy.wast:935
2171 let $11 = instantiate(`(module
2172 (type (func (result i32))) ;; type #0
2173 (import "a" "ef0" (func (result i32))) ;; index 0
2174 (import "a" "ef1" (func (result i32)))
2175 (import "a" "ef2" (func (result i32)))
2176 (import "a" "ef3" (func (result i32)))
2177 (import "a" "ef4" (func (result i32))) ;; index 4
2178 (table $$t0 30 30 funcref)
2179 (table $$t1 30 30 funcref)
2180 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
2181 (elem funcref
2182 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
2183 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
2184 (elem funcref
2185 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
2186 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
2187 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
2188 (func (result i32) (i32.const 5)) ;; index 5
2189 (func (result i32) (i32.const 6))
2190 (func (result i32) (i32.const 7))
2191 (func (result i32) (i32.const 8))
2192 (func (result i32) (i32.const 9)) ;; index 9
2193 (func (export "test")
2194 (table.copy $$t1 $$t1 (i32.const 13) (i32.const 2) (i32.const 3)))
2195 (func (export "check_t0") (param i32) (result i32)
2196 (call_indirect $$t1 (type 0) (local.get 0)))
2197 (func (export "check_t1") (param i32) (result i32)
2198 (call_indirect $$t0 (type 0) (local.get 0)))
2199 )`);
2200
2201 // ./test/core/table_copy.wast:965
2202 invoke($11, `test`, []);
2203
2204 // ./test/core/table_copy.wast:966
2205 assert_trap(() => invoke($11, `check_t0`, [0]), `uninitialized element`);
2206
2207 // ./test/core/table_copy.wast:967
2208 assert_trap(() => invoke($11, `check_t0`, [1]), `uninitialized element`);
2209
2210 // ./test/core/table_copy.wast:968
2211 assert_return(() => invoke($11, `check_t0`, [2]), [value("i32", 3)]);
2212
2213 // ./test/core/table_copy.wast:969
2214 assert_return(() => invoke($11, `check_t0`, [3]), [value("i32", 1)]);
2215
2216 // ./test/core/table_copy.wast:970
2217 assert_return(() => invoke($11, `check_t0`, [4]), [value("i32", 4)]);
2218
2219 // ./test/core/table_copy.wast:971
2220 assert_return(() => invoke($11, `check_t0`, [5]), [value("i32", 1)]);
2221
2222 // ./test/core/table_copy.wast:972
2223 assert_trap(() => invoke($11, `check_t0`, [6]), `uninitialized element`);
2224
2225 // ./test/core/table_copy.wast:973
2226 assert_trap(() => invoke($11, `check_t0`, [7]), `uninitialized element`);
2227
2228 // ./test/core/table_copy.wast:974
2229 assert_trap(() => invoke($11, `check_t0`, [8]), `uninitialized element`);
2230
2231 // ./test/core/table_copy.wast:975
2232 assert_trap(() => invoke($11, `check_t0`, [9]), `uninitialized element`);
2233
2234 // ./test/core/table_copy.wast:976
2235 assert_trap(() => invoke($11, `check_t0`, [10]), `uninitialized element`);
2236
2237 // ./test/core/table_copy.wast:977
2238 assert_trap(() => invoke($11, `check_t0`, [11]), `uninitialized element`);
2239
2240 // ./test/core/table_copy.wast:978
2241 assert_return(() => invoke($11, `check_t0`, [12]), [value("i32", 7)]);
2242
2243 // ./test/core/table_copy.wast:979
2244 assert_return(() => invoke($11, `check_t0`, [13]), [value("i32", 3)]);
2245
2246 // ./test/core/table_copy.wast:980
2247 assert_return(() => invoke($11, `check_t0`, [14]), [value("i32", 1)]);
2248
2249 // ./test/core/table_copy.wast:981
2250 assert_return(() => invoke($11, `check_t0`, [15]), [value("i32", 4)]);
2251
2252 // ./test/core/table_copy.wast:982
2253 assert_return(() => invoke($11, `check_t0`, [16]), [value("i32", 6)]);
2254
2255 // ./test/core/table_copy.wast:983
2256 assert_trap(() => invoke($11, `check_t0`, [17]), `uninitialized element`);
2257
2258 // ./test/core/table_copy.wast:984
2259 assert_trap(() => invoke($11, `check_t0`, [18]), `uninitialized element`);
2260
2261 // ./test/core/table_copy.wast:985
2262 assert_trap(() => invoke($11, `check_t0`, [19]), `uninitialized element`);
2263
2264 // ./test/core/table_copy.wast:986
2265 assert_trap(() => invoke($11, `check_t0`, [20]), `uninitialized element`);
2266
2267 // ./test/core/table_copy.wast:987
2268 assert_trap(() => invoke($11, `check_t0`, [21]), `uninitialized element`);
2269
2270 // ./test/core/table_copy.wast:988
2271 assert_trap(() => invoke($11, `check_t0`, [22]), `uninitialized element`);
2272
2273 // ./test/core/table_copy.wast:989
2274 assert_trap(() => invoke($11, `check_t0`, [23]), `uninitialized element`);
2275
2276 // ./test/core/table_copy.wast:990
2277 assert_trap(() => invoke($11, `check_t0`, [24]), `uninitialized element`);
2278
2279 // ./test/core/table_copy.wast:991
2280 assert_trap(() => invoke($11, `check_t0`, [25]), `uninitialized element`);
2281
2282 // ./test/core/table_copy.wast:992
2283 assert_trap(() => invoke($11, `check_t0`, [26]), `uninitialized element`);
2284
2285 // ./test/core/table_copy.wast:993
2286 assert_trap(() => invoke($11, `check_t0`, [27]), `uninitialized element`);
2287
2288 // ./test/core/table_copy.wast:994
2289 assert_trap(() => invoke($11, `check_t0`, [28]), `uninitialized element`);
2290
2291 // ./test/core/table_copy.wast:995
2292 assert_trap(() => invoke($11, `check_t0`, [29]), `uninitialized element`);
2293
2294 // ./test/core/table_copy.wast:996
2295 assert_trap(() => invoke($11, `check_t1`, [0]), `uninitialized element`);
2296
2297 // ./test/core/table_copy.wast:997
2298 assert_trap(() => invoke($11, `check_t1`, [1]), `uninitialized element`);
2299
2300 // ./test/core/table_copy.wast:998
2301 assert_trap(() => invoke($11, `check_t1`, [2]), `uninitialized element`);
2302
2303 // ./test/core/table_copy.wast:999
2304 assert_return(() => invoke($11, `check_t1`, [3]), [value("i32", 1)]);
2305
2306 // ./test/core/table_copy.wast:1000
2307 assert_return(() => invoke($11, `check_t1`, [4]), [value("i32", 3)]);
2308
2309 // ./test/core/table_copy.wast:1001
2310 assert_return(() => invoke($11, `check_t1`, [5]), [value("i32", 1)]);
2311
2312 // ./test/core/table_copy.wast:1002
2313 assert_return(() => invoke($11, `check_t1`, [6]), [value("i32", 4)]);
2314
2315 // ./test/core/table_copy.wast:1003
2316 assert_trap(() => invoke($11, `check_t1`, [7]), `uninitialized element`);
2317
2318 // ./test/core/table_copy.wast:1004
2319 assert_trap(() => invoke($11, `check_t1`, [8]), `uninitialized element`);
2320
2321 // ./test/core/table_copy.wast:1005
2322 assert_trap(() => invoke($11, `check_t1`, [9]), `uninitialized element`);
2323
2324 // ./test/core/table_copy.wast:1006
2325 assert_trap(() => invoke($11, `check_t1`, [10]), `uninitialized element`);
2326
2327 // ./test/core/table_copy.wast:1007
2328 assert_return(() => invoke($11, `check_t1`, [11]), [value("i32", 6)]);
2329
2330 // ./test/core/table_copy.wast:1008
2331 assert_return(() => invoke($11, `check_t1`, [12]), [value("i32", 3)]);
2332
2333 // ./test/core/table_copy.wast:1009
2334 assert_return(() => invoke($11, `check_t1`, [13]), [value("i32", 2)]);
2335
2336 // ./test/core/table_copy.wast:1010
2337 assert_return(() => invoke($11, `check_t1`, [14]), [value("i32", 5)]);
2338
2339 // ./test/core/table_copy.wast:1011
2340 assert_return(() => invoke($11, `check_t1`, [15]), [value("i32", 7)]);
2341
2342 // ./test/core/table_copy.wast:1012
2343 assert_trap(() => invoke($11, `check_t1`, [16]), `uninitialized element`);
2344
2345 // ./test/core/table_copy.wast:1013
2346 assert_trap(() => invoke($11, `check_t1`, [17]), `uninitialized element`);
2347
2348 // ./test/core/table_copy.wast:1014
2349 assert_trap(() => invoke($11, `check_t1`, [18]), `uninitialized element`);
2350
2351 // ./test/core/table_copy.wast:1015
2352 assert_trap(() => invoke($11, `check_t1`, [19]), `uninitialized element`);
2353
2354 // ./test/core/table_copy.wast:1016
2355 assert_trap(() => invoke($11, `check_t1`, [20]), `uninitialized element`);
2356
2357 // ./test/core/table_copy.wast:1017
2358 assert_trap(() => invoke($11, `check_t1`, [21]), `uninitialized element`);
2359
2360 // ./test/core/table_copy.wast:1018
2361 assert_trap(() => invoke($11, `check_t1`, [22]), `uninitialized element`);
2362
2363 // ./test/core/table_copy.wast:1019
2364 assert_trap(() => invoke($11, `check_t1`, [23]), `uninitialized element`);
2365
2366 // ./test/core/table_copy.wast:1020
2367 assert_trap(() => invoke($11, `check_t1`, [24]), `uninitialized element`);
2368
2369 // ./test/core/table_copy.wast:1021
2370 assert_trap(() => invoke($11, `check_t1`, [25]), `uninitialized element`);
2371
2372 // ./test/core/table_copy.wast:1022
2373 assert_trap(() => invoke($11, `check_t1`, [26]), `uninitialized element`);
2374
2375 // ./test/core/table_copy.wast:1023
2376 assert_trap(() => invoke($11, `check_t1`, [27]), `uninitialized element`);
2377
2378 // ./test/core/table_copy.wast:1024
2379 assert_trap(() => invoke($11, `check_t1`, [28]), `uninitialized element`);
2380
2381 // ./test/core/table_copy.wast:1025
2382 assert_trap(() => invoke($11, `check_t1`, [29]), `uninitialized element`);
2383
2384 // ./test/core/table_copy.wast:1027
2385 let $12 = instantiate(`(module
2386 (type (func (result i32))) ;; type #0
2387 (import "a" "ef0" (func (result i32))) ;; index 0
2388 (import "a" "ef1" (func (result i32)))
2389 (import "a" "ef2" (func (result i32)))
2390 (import "a" "ef3" (func (result i32)))
2391 (import "a" "ef4" (func (result i32))) ;; index 4
2392 (table $$t0 30 30 funcref)
2393 (table $$t1 30 30 funcref)
2394 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
2395 (elem funcref
2396 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
2397 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
2398 (elem funcref
2399 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
2400 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
2401 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
2402 (func (result i32) (i32.const 5)) ;; index 5
2403 (func (result i32) (i32.const 6))
2404 (func (result i32) (i32.const 7))
2405 (func (result i32) (i32.const 8))
2406 (func (result i32) (i32.const 9)) ;; index 9
2407 (func (export "test")
2408 (table.copy $$t1 $$t1 (i32.const 25) (i32.const 15) (i32.const 2)))
2409 (func (export "check_t0") (param i32) (result i32)
2410 (call_indirect $$t1 (type 0) (local.get 0)))
2411 (func (export "check_t1") (param i32) (result i32)
2412 (call_indirect $$t0 (type 0) (local.get 0)))
2413 )`);
2414
2415 // ./test/core/table_copy.wast:1057
2416 invoke($12, `test`, []);
2417
2418 // ./test/core/table_copy.wast:1058
2419 assert_trap(() => invoke($12, `check_t0`, [0]), `uninitialized element`);
2420
2421 // ./test/core/table_copy.wast:1059
2422 assert_trap(() => invoke($12, `check_t0`, [1]), `uninitialized element`);
2423
2424 // ./test/core/table_copy.wast:1060
2425 assert_return(() => invoke($12, `check_t0`, [2]), [value("i32", 3)]);
2426
2427 // ./test/core/table_copy.wast:1061
2428 assert_return(() => invoke($12, `check_t0`, [3]), [value("i32", 1)]);
2429
2430 // ./test/core/table_copy.wast:1062
2431 assert_return(() => invoke($12, `check_t0`, [4]), [value("i32", 4)]);
2432
2433 // ./test/core/table_copy.wast:1063
2434 assert_return(() => invoke($12, `check_t0`, [5]), [value("i32", 1)]);
2435
2436 // ./test/core/table_copy.wast:1064
2437 assert_trap(() => invoke($12, `check_t0`, [6]), `uninitialized element`);
2438
2439 // ./test/core/table_copy.wast:1065
2440 assert_trap(() => invoke($12, `check_t0`, [7]), `uninitialized element`);
2441
2442 // ./test/core/table_copy.wast:1066
2443 assert_trap(() => invoke($12, `check_t0`, [8]), `uninitialized element`);
2444
2445 // ./test/core/table_copy.wast:1067
2446 assert_trap(() => invoke($12, `check_t0`, [9]), `uninitialized element`);
2447
2448 // ./test/core/table_copy.wast:1068
2449 assert_trap(() => invoke($12, `check_t0`, [10]), `uninitialized element`);
2450
2451 // ./test/core/table_copy.wast:1069
2452 assert_trap(() => invoke($12, `check_t0`, [11]), `uninitialized element`);
2453
2454 // ./test/core/table_copy.wast:1070
2455 assert_return(() => invoke($12, `check_t0`, [12]), [value("i32", 7)]);
2456
2457 // ./test/core/table_copy.wast:1071
2458 assert_return(() => invoke($12, `check_t0`, [13]), [value("i32", 5)]);
2459
2460 // ./test/core/table_copy.wast:1072
2461 assert_return(() => invoke($12, `check_t0`, [14]), [value("i32", 2)]);
2462
2463 // ./test/core/table_copy.wast:1073
2464 assert_return(() => invoke($12, `check_t0`, [15]), [value("i32", 3)]);
2465
2466 // ./test/core/table_copy.wast:1074
2467 assert_return(() => invoke($12, `check_t0`, [16]), [value("i32", 6)]);
2468
2469 // ./test/core/table_copy.wast:1075
2470 assert_trap(() => invoke($12, `check_t0`, [17]), `uninitialized element`);
2471
2472 // ./test/core/table_copy.wast:1076
2473 assert_trap(() => invoke($12, `check_t0`, [18]), `uninitialized element`);
2474
2475 // ./test/core/table_copy.wast:1077
2476 assert_trap(() => invoke($12, `check_t0`, [19]), `uninitialized element`);
2477
2478 // ./test/core/table_copy.wast:1078
2479 assert_trap(() => invoke($12, `check_t0`, [20]), `uninitialized element`);
2480
2481 // ./test/core/table_copy.wast:1079
2482 assert_trap(() => invoke($12, `check_t0`, [21]), `uninitialized element`);
2483
2484 // ./test/core/table_copy.wast:1080
2485 assert_trap(() => invoke($12, `check_t0`, [22]), `uninitialized element`);
2486
2487 // ./test/core/table_copy.wast:1081
2488 assert_trap(() => invoke($12, `check_t0`, [23]), `uninitialized element`);
2489
2490 // ./test/core/table_copy.wast:1082
2491 assert_trap(() => invoke($12, `check_t0`, [24]), `uninitialized element`);
2492
2493 // ./test/core/table_copy.wast:1083
2494 assert_return(() => invoke($12, `check_t0`, [25]), [value("i32", 3)]);
2495
2496 // ./test/core/table_copy.wast:1084
2497 assert_return(() => invoke($12, `check_t0`, [26]), [value("i32", 6)]);
2498
2499 // ./test/core/table_copy.wast:1085
2500 assert_trap(() => invoke($12, `check_t0`, [27]), `uninitialized element`);
2501
2502 // ./test/core/table_copy.wast:1086
2503 assert_trap(() => invoke($12, `check_t0`, [28]), `uninitialized element`);
2504
2505 // ./test/core/table_copy.wast:1087
2506 assert_trap(() => invoke($12, `check_t0`, [29]), `uninitialized element`);
2507
2508 // ./test/core/table_copy.wast:1088
2509 assert_trap(() => invoke($12, `check_t1`, [0]), `uninitialized element`);
2510
2511 // ./test/core/table_copy.wast:1089
2512 assert_trap(() => invoke($12, `check_t1`, [1]), `uninitialized element`);
2513
2514 // ./test/core/table_copy.wast:1090
2515 assert_trap(() => invoke($12, `check_t1`, [2]), `uninitialized element`);
2516
2517 // ./test/core/table_copy.wast:1091
2518 assert_return(() => invoke($12, `check_t1`, [3]), [value("i32", 1)]);
2519
2520 // ./test/core/table_copy.wast:1092
2521 assert_return(() => invoke($12, `check_t1`, [4]), [value("i32", 3)]);
2522
2523 // ./test/core/table_copy.wast:1093
2524 assert_return(() => invoke($12, `check_t1`, [5]), [value("i32", 1)]);
2525
2526 // ./test/core/table_copy.wast:1094
2527 assert_return(() => invoke($12, `check_t1`, [6]), [value("i32", 4)]);
2528
2529 // ./test/core/table_copy.wast:1095
2530 assert_trap(() => invoke($12, `check_t1`, [7]), `uninitialized element`);
2531
2532 // ./test/core/table_copy.wast:1096
2533 assert_trap(() => invoke($12, `check_t1`, [8]), `uninitialized element`);
2534
2535 // ./test/core/table_copy.wast:1097
2536 assert_trap(() => invoke($12, `check_t1`, [9]), `uninitialized element`);
2537
2538 // ./test/core/table_copy.wast:1098
2539 assert_trap(() => invoke($12, `check_t1`, [10]), `uninitialized element`);
2540
2541 // ./test/core/table_copy.wast:1099
2542 assert_return(() => invoke($12, `check_t1`, [11]), [value("i32", 6)]);
2543
2544 // ./test/core/table_copy.wast:1100
2545 assert_return(() => invoke($12, `check_t1`, [12]), [value("i32", 3)]);
2546
2547 // ./test/core/table_copy.wast:1101
2548 assert_return(() => invoke($12, `check_t1`, [13]), [value("i32", 2)]);
2549
2550 // ./test/core/table_copy.wast:1102
2551 assert_return(() => invoke($12, `check_t1`, [14]), [value("i32", 5)]);
2552
2553 // ./test/core/table_copy.wast:1103
2554 assert_return(() => invoke($12, `check_t1`, [15]), [value("i32", 7)]);
2555
2556 // ./test/core/table_copy.wast:1104
2557 assert_trap(() => invoke($12, `check_t1`, [16]), `uninitialized element`);
2558
2559 // ./test/core/table_copy.wast:1105
2560 assert_trap(() => invoke($12, `check_t1`, [17]), `uninitialized element`);
2561
2562 // ./test/core/table_copy.wast:1106
2563 assert_trap(() => invoke($12, `check_t1`, [18]), `uninitialized element`);
2564
2565 // ./test/core/table_copy.wast:1107
2566 assert_trap(() => invoke($12, `check_t1`, [19]), `uninitialized element`);
2567
2568 // ./test/core/table_copy.wast:1108
2569 assert_trap(() => invoke($12, `check_t1`, [20]), `uninitialized element`);
2570
2571 // ./test/core/table_copy.wast:1109
2572 assert_trap(() => invoke($12, `check_t1`, [21]), `uninitialized element`);
2573
2574 // ./test/core/table_copy.wast:1110
2575 assert_trap(() => invoke($12, `check_t1`, [22]), `uninitialized element`);
2576
2577 // ./test/core/table_copy.wast:1111
2578 assert_trap(() => invoke($12, `check_t1`, [23]), `uninitialized element`);
2579
2580 // ./test/core/table_copy.wast:1112
2581 assert_trap(() => invoke($12, `check_t1`, [24]), `uninitialized element`);
2582
2583 // ./test/core/table_copy.wast:1113
2584 assert_trap(() => invoke($12, `check_t1`, [25]), `uninitialized element`);
2585
2586 // ./test/core/table_copy.wast:1114
2587 assert_trap(() => invoke($12, `check_t1`, [26]), `uninitialized element`);
2588
2589 // ./test/core/table_copy.wast:1115
2590 assert_trap(() => invoke($12, `check_t1`, [27]), `uninitialized element`);
2591
2592 // ./test/core/table_copy.wast:1116
2593 assert_trap(() => invoke($12, `check_t1`, [28]), `uninitialized element`);
2594
2595 // ./test/core/table_copy.wast:1117
2596 assert_trap(() => invoke($12, `check_t1`, [29]), `uninitialized element`);
2597
2598 // ./test/core/table_copy.wast:1119
2599 let $13 = instantiate(`(module
2600 (type (func (result i32))) ;; type #0
2601 (import "a" "ef0" (func (result i32))) ;; index 0
2602 (import "a" "ef1" (func (result i32)))
2603 (import "a" "ef2" (func (result i32)))
2604 (import "a" "ef3" (func (result i32)))
2605 (import "a" "ef4" (func (result i32))) ;; index 4
2606 (table $$t0 30 30 funcref)
2607 (table $$t1 30 30 funcref)
2608 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
2609 (elem funcref
2610 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
2611 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
2612 (elem funcref
2613 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
2614 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
2615 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
2616 (func (result i32) (i32.const 5)) ;; index 5
2617 (func (result i32) (i32.const 6))
2618 (func (result i32) (i32.const 7))
2619 (func (result i32) (i32.const 8))
2620 (func (result i32) (i32.const 9)) ;; index 9
2621 (func (export "test")
2622 (table.copy $$t1 $$t1 (i32.const 13) (i32.const 25) (i32.const 3)))
2623 (func (export "check_t0") (param i32) (result i32)
2624 (call_indirect $$t1 (type 0) (local.get 0)))
2625 (func (export "check_t1") (param i32) (result i32)
2626 (call_indirect $$t0 (type 0) (local.get 0)))
2627 )`);
2628
2629 // ./test/core/table_copy.wast:1149
2630 invoke($13, `test`, []);
2631
2632 // ./test/core/table_copy.wast:1150
2633 assert_trap(() => invoke($13, `check_t0`, [0]), `uninitialized element`);
2634
2635 // ./test/core/table_copy.wast:1151
2636 assert_trap(() => invoke($13, `check_t0`, [1]), `uninitialized element`);
2637
2638 // ./test/core/table_copy.wast:1152
2639 assert_return(() => invoke($13, `check_t0`, [2]), [value("i32", 3)]);
2640
2641 // ./test/core/table_copy.wast:1153
2642 assert_return(() => invoke($13, `check_t0`, [3]), [value("i32", 1)]);
2643
2644 // ./test/core/table_copy.wast:1154
2645 assert_return(() => invoke($13, `check_t0`, [4]), [value("i32", 4)]);
2646
2647 // ./test/core/table_copy.wast:1155
2648 assert_return(() => invoke($13, `check_t0`, [5]), [value("i32", 1)]);
2649
2650 // ./test/core/table_copy.wast:1156
2651 assert_trap(() => invoke($13, `check_t0`, [6]), `uninitialized element`);
2652
2653 // ./test/core/table_copy.wast:1157
2654 assert_trap(() => invoke($13, `check_t0`, [7]), `uninitialized element`);
2655
2656 // ./test/core/table_copy.wast:1158
2657 assert_trap(() => invoke($13, `check_t0`, [8]), `uninitialized element`);
2658
2659 // ./test/core/table_copy.wast:1159
2660 assert_trap(() => invoke($13, `check_t0`, [9]), `uninitialized element`);
2661
2662 // ./test/core/table_copy.wast:1160
2663 assert_trap(() => invoke($13, `check_t0`, [10]), `uninitialized element`);
2664
2665 // ./test/core/table_copy.wast:1161
2666 assert_trap(() => invoke($13, `check_t0`, [11]), `uninitialized element`);
2667
2668 // ./test/core/table_copy.wast:1162
2669 assert_return(() => invoke($13, `check_t0`, [12]), [value("i32", 7)]);
2670
2671 // ./test/core/table_copy.wast:1163
2672 assert_trap(() => invoke($13, `check_t0`, [13]), `uninitialized element`);
2673
2674 // ./test/core/table_copy.wast:1164
2675 assert_trap(() => invoke($13, `check_t0`, [14]), `uninitialized element`);
2676
2677 // ./test/core/table_copy.wast:1165
2678 assert_trap(() => invoke($13, `check_t0`, [15]), `uninitialized element`);
2679
2680 // ./test/core/table_copy.wast:1166
2681 assert_return(() => invoke($13, `check_t0`, [16]), [value("i32", 6)]);
2682
2683 // ./test/core/table_copy.wast:1167
2684 assert_trap(() => invoke($13, `check_t0`, [17]), `uninitialized element`);
2685
2686 // ./test/core/table_copy.wast:1168
2687 assert_trap(() => invoke($13, `check_t0`, [18]), `uninitialized element`);
2688
2689 // ./test/core/table_copy.wast:1169
2690 assert_trap(() => invoke($13, `check_t0`, [19]), `uninitialized element`);
2691
2692 // ./test/core/table_copy.wast:1170
2693 assert_trap(() => invoke($13, `check_t0`, [20]), `uninitialized element`);
2694
2695 // ./test/core/table_copy.wast:1171
2696 assert_trap(() => invoke($13, `check_t0`, [21]), `uninitialized element`);
2697
2698 // ./test/core/table_copy.wast:1172
2699 assert_trap(() => invoke($13, `check_t0`, [22]), `uninitialized element`);
2700
2701 // ./test/core/table_copy.wast:1173
2702 assert_trap(() => invoke($13, `check_t0`, [23]), `uninitialized element`);
2703
2704 // ./test/core/table_copy.wast:1174
2705 assert_trap(() => invoke($13, `check_t0`, [24]), `uninitialized element`);
2706
2707 // ./test/core/table_copy.wast:1175
2708 assert_trap(() => invoke($13, `check_t0`, [25]), `uninitialized element`);
2709
2710 // ./test/core/table_copy.wast:1176
2711 assert_trap(() => invoke($13, `check_t0`, [26]), `uninitialized element`);
2712
2713 // ./test/core/table_copy.wast:1177
2714 assert_trap(() => invoke($13, `check_t0`, [27]), `uninitialized element`);
2715
2716 // ./test/core/table_copy.wast:1178
2717 assert_trap(() => invoke($13, `check_t0`, [28]), `uninitialized element`);
2718
2719 // ./test/core/table_copy.wast:1179
2720 assert_trap(() => invoke($13, `check_t0`, [29]), `uninitialized element`);
2721
2722 // ./test/core/table_copy.wast:1180
2723 assert_trap(() => invoke($13, `check_t1`, [0]), `uninitialized element`);
2724
2725 // ./test/core/table_copy.wast:1181
2726 assert_trap(() => invoke($13, `check_t1`, [1]), `uninitialized element`);
2727
2728 // ./test/core/table_copy.wast:1182
2729 assert_trap(() => invoke($13, `check_t1`, [2]), `uninitialized element`);
2730
2731 // ./test/core/table_copy.wast:1183
2732 assert_return(() => invoke($13, `check_t1`, [3]), [value("i32", 1)]);
2733
2734 // ./test/core/table_copy.wast:1184
2735 assert_return(() => invoke($13, `check_t1`, [4]), [value("i32", 3)]);
2736
2737 // ./test/core/table_copy.wast:1185
2738 assert_return(() => invoke($13, `check_t1`, [5]), [value("i32", 1)]);
2739
2740 // ./test/core/table_copy.wast:1186
2741 assert_return(() => invoke($13, `check_t1`, [6]), [value("i32", 4)]);
2742
2743 // ./test/core/table_copy.wast:1187
2744 assert_trap(() => invoke($13, `check_t1`, [7]), `uninitialized element`);
2745
2746 // ./test/core/table_copy.wast:1188
2747 assert_trap(() => invoke($13, `check_t1`, [8]), `uninitialized element`);
2748
2749 // ./test/core/table_copy.wast:1189
2750 assert_trap(() => invoke($13, `check_t1`, [9]), `uninitialized element`);
2751
2752 // ./test/core/table_copy.wast:1190
2753 assert_trap(() => invoke($13, `check_t1`, [10]), `uninitialized element`);
2754
2755 // ./test/core/table_copy.wast:1191
2756 assert_return(() => invoke($13, `check_t1`, [11]), [value("i32", 6)]);
2757
2758 // ./test/core/table_copy.wast:1192
2759 assert_return(() => invoke($13, `check_t1`, [12]), [value("i32", 3)]);
2760
2761 // ./test/core/table_copy.wast:1193
2762 assert_return(() => invoke($13, `check_t1`, [13]), [value("i32", 2)]);
2763
2764 // ./test/core/table_copy.wast:1194
2765 assert_return(() => invoke($13, `check_t1`, [14]), [value("i32", 5)]);
2766
2767 // ./test/core/table_copy.wast:1195
2768 assert_return(() => invoke($13, `check_t1`, [15]), [value("i32", 7)]);
2769
2770 // ./test/core/table_copy.wast:1196
2771 assert_trap(() => invoke($13, `check_t1`, [16]), `uninitialized element`);
2772
2773 // ./test/core/table_copy.wast:1197
2774 assert_trap(() => invoke($13, `check_t1`, [17]), `uninitialized element`);
2775
2776 // ./test/core/table_copy.wast:1198
2777 assert_trap(() => invoke($13, `check_t1`, [18]), `uninitialized element`);
2778
2779 // ./test/core/table_copy.wast:1199
2780 assert_trap(() => invoke($13, `check_t1`, [19]), `uninitialized element`);
2781
2782 // ./test/core/table_copy.wast:1200
2783 assert_trap(() => invoke($13, `check_t1`, [20]), `uninitialized element`);
2784
2785 // ./test/core/table_copy.wast:1201
2786 assert_trap(() => invoke($13, `check_t1`, [21]), `uninitialized element`);
2787
2788 // ./test/core/table_copy.wast:1202
2789 assert_trap(() => invoke($13, `check_t1`, [22]), `uninitialized element`);
2790
2791 // ./test/core/table_copy.wast:1203
2792 assert_trap(() => invoke($13, `check_t1`, [23]), `uninitialized element`);
2793
2794 // ./test/core/table_copy.wast:1204
2795 assert_trap(() => invoke($13, `check_t1`, [24]), `uninitialized element`);
2796
2797 // ./test/core/table_copy.wast:1205
2798 assert_trap(() => invoke($13, `check_t1`, [25]), `uninitialized element`);
2799
2800 // ./test/core/table_copy.wast:1206
2801 assert_trap(() => invoke($13, `check_t1`, [26]), `uninitialized element`);
2802
2803 // ./test/core/table_copy.wast:1207
2804 assert_trap(() => invoke($13, `check_t1`, [27]), `uninitialized element`);
2805
2806 // ./test/core/table_copy.wast:1208
2807 assert_trap(() => invoke($13, `check_t1`, [28]), `uninitialized element`);
2808
2809 // ./test/core/table_copy.wast:1209
2810 assert_trap(() => invoke($13, `check_t1`, [29]), `uninitialized element`);
2811
2812 // ./test/core/table_copy.wast:1211
2813 let $14 = instantiate(`(module
2814 (type (func (result i32))) ;; type #0
2815 (import "a" "ef0" (func (result i32))) ;; index 0
2816 (import "a" "ef1" (func (result i32)))
2817 (import "a" "ef2" (func (result i32)))
2818 (import "a" "ef3" (func (result i32)))
2819 (import "a" "ef4" (func (result i32))) ;; index 4
2820 (table $$t0 30 30 funcref)
2821 (table $$t1 30 30 funcref)
2822 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
2823 (elem funcref
2824 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
2825 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
2826 (elem funcref
2827 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
2828 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
2829 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
2830 (func (result i32) (i32.const 5)) ;; index 5
2831 (func (result i32) (i32.const 6))
2832 (func (result i32) (i32.const 7))
2833 (func (result i32) (i32.const 8))
2834 (func (result i32) (i32.const 9)) ;; index 9
2835 (func (export "test")
2836 (table.copy $$t1 $$t1 (i32.const 20) (i32.const 22) (i32.const 4)))
2837 (func (export "check_t0") (param i32) (result i32)
2838 (call_indirect $$t1 (type 0) (local.get 0)))
2839 (func (export "check_t1") (param i32) (result i32)
2840 (call_indirect $$t0 (type 0) (local.get 0)))
2841 )`);
2842
2843 // ./test/core/table_copy.wast:1241
2844 invoke($14, `test`, []);
2845
2846 // ./test/core/table_copy.wast:1242
2847 assert_trap(() => invoke($14, `check_t0`, [0]), `uninitialized element`);
2848
2849 // ./test/core/table_copy.wast:1243
2850 assert_trap(() => invoke($14, `check_t0`, [1]), `uninitialized element`);
2851
2852 // ./test/core/table_copy.wast:1244
2853 assert_return(() => invoke($14, `check_t0`, [2]), [value("i32", 3)]);
2854
2855 // ./test/core/table_copy.wast:1245
2856 assert_return(() => invoke($14, `check_t0`, [3]), [value("i32", 1)]);
2857
2858 // ./test/core/table_copy.wast:1246
2859 assert_return(() => invoke($14, `check_t0`, [4]), [value("i32", 4)]);
2860
2861 // ./test/core/table_copy.wast:1247
2862 assert_return(() => invoke($14, `check_t0`, [5]), [value("i32", 1)]);
2863
2864 // ./test/core/table_copy.wast:1248
2865 assert_trap(() => invoke($14, `check_t0`, [6]), `uninitialized element`);
2866
2867 // ./test/core/table_copy.wast:1249
2868 assert_trap(() => invoke($14, `check_t0`, [7]), `uninitialized element`);
2869
2870 // ./test/core/table_copy.wast:1250
2871 assert_trap(() => invoke($14, `check_t0`, [8]), `uninitialized element`);
2872
2873 // ./test/core/table_copy.wast:1251
2874 assert_trap(() => invoke($14, `check_t0`, [9]), `uninitialized element`);
2875
2876 // ./test/core/table_copy.wast:1252
2877 assert_trap(() => invoke($14, `check_t0`, [10]), `uninitialized element`);
2878
2879 // ./test/core/table_copy.wast:1253
2880 assert_trap(() => invoke($14, `check_t0`, [11]), `uninitialized element`);
2881
2882 // ./test/core/table_copy.wast:1254
2883 assert_return(() => invoke($14, `check_t0`, [12]), [value("i32", 7)]);
2884
2885 // ./test/core/table_copy.wast:1255
2886 assert_return(() => invoke($14, `check_t0`, [13]), [value("i32", 5)]);
2887
2888 // ./test/core/table_copy.wast:1256
2889 assert_return(() => invoke($14, `check_t0`, [14]), [value("i32", 2)]);
2890
2891 // ./test/core/table_copy.wast:1257
2892 assert_return(() => invoke($14, `check_t0`, [15]), [value("i32", 3)]);
2893
2894 // ./test/core/table_copy.wast:1258
2895 assert_return(() => invoke($14, `check_t0`, [16]), [value("i32", 6)]);
2896
2897 // ./test/core/table_copy.wast:1259
2898 assert_trap(() => invoke($14, `check_t0`, [17]), `uninitialized element`);
2899
2900 // ./test/core/table_copy.wast:1260
2901 assert_trap(() => invoke($14, `check_t0`, [18]), `uninitialized element`);
2902
2903 // ./test/core/table_copy.wast:1261
2904 assert_trap(() => invoke($14, `check_t0`, [19]), `uninitialized element`);
2905
2906 // ./test/core/table_copy.wast:1262
2907 assert_trap(() => invoke($14, `check_t0`, [20]), `uninitialized element`);
2908
2909 // ./test/core/table_copy.wast:1263
2910 assert_trap(() => invoke($14, `check_t0`, [21]), `uninitialized element`);
2911
2912 // ./test/core/table_copy.wast:1264
2913 assert_trap(() => invoke($14, `check_t0`, [22]), `uninitialized element`);
2914
2915 // ./test/core/table_copy.wast:1265
2916 assert_trap(() => invoke($14, `check_t0`, [23]), `uninitialized element`);
2917
2918 // ./test/core/table_copy.wast:1266
2919 assert_trap(() => invoke($14, `check_t0`, [24]), `uninitialized element`);
2920
2921 // ./test/core/table_copy.wast:1267
2922 assert_trap(() => invoke($14, `check_t0`, [25]), `uninitialized element`);
2923
2924 // ./test/core/table_copy.wast:1268
2925 assert_trap(() => invoke($14, `check_t0`, [26]), `uninitialized element`);
2926
2927 // ./test/core/table_copy.wast:1269
2928 assert_trap(() => invoke($14, `check_t0`, [27]), `uninitialized element`);
2929
2930 // ./test/core/table_copy.wast:1270
2931 assert_trap(() => invoke($14, `check_t0`, [28]), `uninitialized element`);
2932
2933 // ./test/core/table_copy.wast:1271
2934 assert_trap(() => invoke($14, `check_t0`, [29]), `uninitialized element`);
2935
2936 // ./test/core/table_copy.wast:1272
2937 assert_trap(() => invoke($14, `check_t1`, [0]), `uninitialized element`);
2938
2939 // ./test/core/table_copy.wast:1273
2940 assert_trap(() => invoke($14, `check_t1`, [1]), `uninitialized element`);
2941
2942 // ./test/core/table_copy.wast:1274
2943 assert_trap(() => invoke($14, `check_t1`, [2]), `uninitialized element`);
2944
2945 // ./test/core/table_copy.wast:1275
2946 assert_return(() => invoke($14, `check_t1`, [3]), [value("i32", 1)]);
2947
2948 // ./test/core/table_copy.wast:1276
2949 assert_return(() => invoke($14, `check_t1`, [4]), [value("i32", 3)]);
2950
2951 // ./test/core/table_copy.wast:1277
2952 assert_return(() => invoke($14, `check_t1`, [5]), [value("i32", 1)]);
2953
2954 // ./test/core/table_copy.wast:1278
2955 assert_return(() => invoke($14, `check_t1`, [6]), [value("i32", 4)]);
2956
2957 // ./test/core/table_copy.wast:1279
2958 assert_trap(() => invoke($14, `check_t1`, [7]), `uninitialized element`);
2959
2960 // ./test/core/table_copy.wast:1280
2961 assert_trap(() => invoke($14, `check_t1`, [8]), `uninitialized element`);
2962
2963 // ./test/core/table_copy.wast:1281
2964 assert_trap(() => invoke($14, `check_t1`, [9]), `uninitialized element`);
2965
2966 // ./test/core/table_copy.wast:1282
2967 assert_trap(() => invoke($14, `check_t1`, [10]), `uninitialized element`);
2968
2969 // ./test/core/table_copy.wast:1283
2970 assert_return(() => invoke($14, `check_t1`, [11]), [value("i32", 6)]);
2971
2972 // ./test/core/table_copy.wast:1284
2973 assert_return(() => invoke($14, `check_t1`, [12]), [value("i32", 3)]);
2974
2975 // ./test/core/table_copy.wast:1285
2976 assert_return(() => invoke($14, `check_t1`, [13]), [value("i32", 2)]);
2977
2978 // ./test/core/table_copy.wast:1286
2979 assert_return(() => invoke($14, `check_t1`, [14]), [value("i32", 5)]);
2980
2981 // ./test/core/table_copy.wast:1287
2982 assert_return(() => invoke($14, `check_t1`, [15]), [value("i32", 7)]);
2983
2984 // ./test/core/table_copy.wast:1288
2985 assert_trap(() => invoke($14, `check_t1`, [16]), `uninitialized element`);
2986
2987 // ./test/core/table_copy.wast:1289
2988 assert_trap(() => invoke($14, `check_t1`, [17]), `uninitialized element`);
2989
2990 // ./test/core/table_copy.wast:1290
2991 assert_trap(() => invoke($14, `check_t1`, [18]), `uninitialized element`);
2992
2993 // ./test/core/table_copy.wast:1291
2994 assert_trap(() => invoke($14, `check_t1`, [19]), `uninitialized element`);
2995
2996 // ./test/core/table_copy.wast:1292
2997 assert_trap(() => invoke($14, `check_t1`, [20]), `uninitialized element`);
2998
2999 // ./test/core/table_copy.wast:1293
3000 assert_trap(() => invoke($14, `check_t1`, [21]), `uninitialized element`);
3001
3002 // ./test/core/table_copy.wast:1294
3003 assert_trap(() => invoke($14, `check_t1`, [22]), `uninitialized element`);
3004
3005 // ./test/core/table_copy.wast:1295
3006 assert_trap(() => invoke($14, `check_t1`, [23]), `uninitialized element`);
3007
3008 // ./test/core/table_copy.wast:1296
3009 assert_trap(() => invoke($14, `check_t1`, [24]), `uninitialized element`);
3010
3011 // ./test/core/table_copy.wast:1297
3012 assert_trap(() => invoke($14, `check_t1`, [25]), `uninitialized element`);
3013
3014 // ./test/core/table_copy.wast:1298
3015 assert_trap(() => invoke($14, `check_t1`, [26]), `uninitialized element`);
3016
3017 // ./test/core/table_copy.wast:1299
3018 assert_trap(() => invoke($14, `check_t1`, [27]), `uninitialized element`);
3019
3020 // ./test/core/table_copy.wast:1300
3021 assert_trap(() => invoke($14, `check_t1`, [28]), `uninitialized element`);
3022
3023 // ./test/core/table_copy.wast:1301
3024 assert_trap(() => invoke($14, `check_t1`, [29]), `uninitialized element`);
3025
3026 // ./test/core/table_copy.wast:1303
3027 let $15 = instantiate(`(module
3028 (type (func (result i32))) ;; type #0
3029 (import "a" "ef0" (func (result i32))) ;; index 0
3030 (import "a" "ef1" (func (result i32)))
3031 (import "a" "ef2" (func (result i32)))
3032 (import "a" "ef3" (func (result i32)))
3033 (import "a" "ef4" (func (result i32))) ;; index 4
3034 (table $$t0 30 30 funcref)
3035 (table $$t1 30 30 funcref)
3036 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
3037 (elem funcref
3038 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3039 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
3040 (elem funcref
3041 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3042 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
3043 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
3044 (func (result i32) (i32.const 5)) ;; index 5
3045 (func (result i32) (i32.const 6))
3046 (func (result i32) (i32.const 7))
3047 (func (result i32) (i32.const 8))
3048 (func (result i32) (i32.const 9)) ;; index 9
3049 (func (export "test")
3050 (table.copy $$t1 $$t1 (i32.const 25) (i32.const 1) (i32.const 3)))
3051 (func (export "check_t0") (param i32) (result i32)
3052 (call_indirect $$t1 (type 0) (local.get 0)))
3053 (func (export "check_t1") (param i32) (result i32)
3054 (call_indirect $$t0 (type 0) (local.get 0)))
3055 )`);
3056
3057 // ./test/core/table_copy.wast:1333
3058 invoke($15, `test`, []);
3059
3060 // ./test/core/table_copy.wast:1334
3061 assert_trap(() => invoke($15, `check_t0`, [0]), `uninitialized element`);
3062
3063 // ./test/core/table_copy.wast:1335
3064 assert_trap(() => invoke($15, `check_t0`, [1]), `uninitialized element`);
3065
3066 // ./test/core/table_copy.wast:1336
3067 assert_return(() => invoke($15, `check_t0`, [2]), [value("i32", 3)]);
3068
3069 // ./test/core/table_copy.wast:1337
3070 assert_return(() => invoke($15, `check_t0`, [3]), [value("i32", 1)]);
3071
3072 // ./test/core/table_copy.wast:1338
3073 assert_return(() => invoke($15, `check_t0`, [4]), [value("i32", 4)]);
3074
3075 // ./test/core/table_copy.wast:1339
3076 assert_return(() => invoke($15, `check_t0`, [5]), [value("i32", 1)]);
3077
3078 // ./test/core/table_copy.wast:1340
3079 assert_trap(() => invoke($15, `check_t0`, [6]), `uninitialized element`);
3080
3081 // ./test/core/table_copy.wast:1341
3082 assert_trap(() => invoke($15, `check_t0`, [7]), `uninitialized element`);
3083
3084 // ./test/core/table_copy.wast:1342
3085 assert_trap(() => invoke($15, `check_t0`, [8]), `uninitialized element`);
3086
3087 // ./test/core/table_copy.wast:1343
3088 assert_trap(() => invoke($15, `check_t0`, [9]), `uninitialized element`);
3089
3090 // ./test/core/table_copy.wast:1344
3091 assert_trap(() => invoke($15, `check_t0`, [10]), `uninitialized element`);
3092
3093 // ./test/core/table_copy.wast:1345
3094 assert_trap(() => invoke($15, `check_t0`, [11]), `uninitialized element`);
3095
3096 // ./test/core/table_copy.wast:1346
3097 assert_return(() => invoke($15, `check_t0`, [12]), [value("i32", 7)]);
3098
3099 // ./test/core/table_copy.wast:1347
3100 assert_return(() => invoke($15, `check_t0`, [13]), [value("i32", 5)]);
3101
3102 // ./test/core/table_copy.wast:1348
3103 assert_return(() => invoke($15, `check_t0`, [14]), [value("i32", 2)]);
3104
3105 // ./test/core/table_copy.wast:1349
3106 assert_return(() => invoke($15, `check_t0`, [15]), [value("i32", 3)]);
3107
3108 // ./test/core/table_copy.wast:1350
3109 assert_return(() => invoke($15, `check_t0`, [16]), [value("i32", 6)]);
3110
3111 // ./test/core/table_copy.wast:1351
3112 assert_trap(() => invoke($15, `check_t0`, [17]), `uninitialized element`);
3113
3114 // ./test/core/table_copy.wast:1352
3115 assert_trap(() => invoke($15, `check_t0`, [18]), `uninitialized element`);
3116
3117 // ./test/core/table_copy.wast:1353
3118 assert_trap(() => invoke($15, `check_t0`, [19]), `uninitialized element`);
3119
3120 // ./test/core/table_copy.wast:1354
3121 assert_trap(() => invoke($15, `check_t0`, [20]), `uninitialized element`);
3122
3123 // ./test/core/table_copy.wast:1355
3124 assert_trap(() => invoke($15, `check_t0`, [21]), `uninitialized element`);
3125
3126 // ./test/core/table_copy.wast:1356
3127 assert_trap(() => invoke($15, `check_t0`, [22]), `uninitialized element`);
3128
3129 // ./test/core/table_copy.wast:1357
3130 assert_trap(() => invoke($15, `check_t0`, [23]), `uninitialized element`);
3131
3132 // ./test/core/table_copy.wast:1358
3133 assert_trap(() => invoke($15, `check_t0`, [24]), `uninitialized element`);
3134
3135 // ./test/core/table_copy.wast:1359
3136 assert_trap(() => invoke($15, `check_t0`, [25]), `uninitialized element`);
3137
3138 // ./test/core/table_copy.wast:1360
3139 assert_return(() => invoke($15, `check_t0`, [26]), [value("i32", 3)]);
3140
3141 // ./test/core/table_copy.wast:1361
3142 assert_return(() => invoke($15, `check_t0`, [27]), [value("i32", 1)]);
3143
3144 // ./test/core/table_copy.wast:1362
3145 assert_trap(() => invoke($15, `check_t0`, [28]), `uninitialized element`);
3146
3147 // ./test/core/table_copy.wast:1363
3148 assert_trap(() => invoke($15, `check_t0`, [29]), `uninitialized element`);
3149
3150 // ./test/core/table_copy.wast:1364
3151 assert_trap(() => invoke($15, `check_t1`, [0]), `uninitialized element`);
3152
3153 // ./test/core/table_copy.wast:1365
3154 assert_trap(() => invoke($15, `check_t1`, [1]), `uninitialized element`);
3155
3156 // ./test/core/table_copy.wast:1366
3157 assert_trap(() => invoke($15, `check_t1`, [2]), `uninitialized element`);
3158
3159 // ./test/core/table_copy.wast:1367
3160 assert_return(() => invoke($15, `check_t1`, [3]), [value("i32", 1)]);
3161
3162 // ./test/core/table_copy.wast:1368
3163 assert_return(() => invoke($15, `check_t1`, [4]), [value("i32", 3)]);
3164
3165 // ./test/core/table_copy.wast:1369
3166 assert_return(() => invoke($15, `check_t1`, [5]), [value("i32", 1)]);
3167
3168 // ./test/core/table_copy.wast:1370
3169 assert_return(() => invoke($15, `check_t1`, [6]), [value("i32", 4)]);
3170
3171 // ./test/core/table_copy.wast:1371
3172 assert_trap(() => invoke($15, `check_t1`, [7]), `uninitialized element`);
3173
3174 // ./test/core/table_copy.wast:1372
3175 assert_trap(() => invoke($15, `check_t1`, [8]), `uninitialized element`);
3176
3177 // ./test/core/table_copy.wast:1373
3178 assert_trap(() => invoke($15, `check_t1`, [9]), `uninitialized element`);
3179
3180 // ./test/core/table_copy.wast:1374
3181 assert_trap(() => invoke($15, `check_t1`, [10]), `uninitialized element`);
3182
3183 // ./test/core/table_copy.wast:1375
3184 assert_return(() => invoke($15, `check_t1`, [11]), [value("i32", 6)]);
3185
3186 // ./test/core/table_copy.wast:1376
3187 assert_return(() => invoke($15, `check_t1`, [12]), [value("i32", 3)]);
3188
3189 // ./test/core/table_copy.wast:1377
3190 assert_return(() => invoke($15, `check_t1`, [13]), [value("i32", 2)]);
3191
3192 // ./test/core/table_copy.wast:1378
3193 assert_return(() => invoke($15, `check_t1`, [14]), [value("i32", 5)]);
3194
3195 // ./test/core/table_copy.wast:1379
3196 assert_return(() => invoke($15, `check_t1`, [15]), [value("i32", 7)]);
3197
3198 // ./test/core/table_copy.wast:1380
3199 assert_trap(() => invoke($15, `check_t1`, [16]), `uninitialized element`);
3200
3201 // ./test/core/table_copy.wast:1381
3202 assert_trap(() => invoke($15, `check_t1`, [17]), `uninitialized element`);
3203
3204 // ./test/core/table_copy.wast:1382
3205 assert_trap(() => invoke($15, `check_t1`, [18]), `uninitialized element`);
3206
3207 // ./test/core/table_copy.wast:1383
3208 assert_trap(() => invoke($15, `check_t1`, [19]), `uninitialized element`);
3209
3210 // ./test/core/table_copy.wast:1384
3211 assert_trap(() => invoke($15, `check_t1`, [20]), `uninitialized element`);
3212
3213 // ./test/core/table_copy.wast:1385
3214 assert_trap(() => invoke($15, `check_t1`, [21]), `uninitialized element`);
3215
3216 // ./test/core/table_copy.wast:1386
3217 assert_trap(() => invoke($15, `check_t1`, [22]), `uninitialized element`);
3218
3219 // ./test/core/table_copy.wast:1387
3220 assert_trap(() => invoke($15, `check_t1`, [23]), `uninitialized element`);
3221
3222 // ./test/core/table_copy.wast:1388
3223 assert_trap(() => invoke($15, `check_t1`, [24]), `uninitialized element`);
3224
3225 // ./test/core/table_copy.wast:1389
3226 assert_trap(() => invoke($15, `check_t1`, [25]), `uninitialized element`);
3227
3228 // ./test/core/table_copy.wast:1390
3229 assert_trap(() => invoke($15, `check_t1`, [26]), `uninitialized element`);
3230
3231 // ./test/core/table_copy.wast:1391
3232 assert_trap(() => invoke($15, `check_t1`, [27]), `uninitialized element`);
3233
3234 // ./test/core/table_copy.wast:1392
3235 assert_trap(() => invoke($15, `check_t1`, [28]), `uninitialized element`);
3236
3237 // ./test/core/table_copy.wast:1393
3238 assert_trap(() => invoke($15, `check_t1`, [29]), `uninitialized element`);
3239
3240 // ./test/core/table_copy.wast:1395
3241 let $16 = instantiate(`(module
3242 (type (func (result i32))) ;; type #0
3243 (import "a" "ef0" (func (result i32))) ;; index 0
3244 (import "a" "ef1" (func (result i32)))
3245 (import "a" "ef2" (func (result i32)))
3246 (import "a" "ef3" (func (result i32)))
3247 (import "a" "ef4" (func (result i32))) ;; index 4
3248 (table $$t0 30 30 funcref)
3249 (table $$t1 30 30 funcref)
3250 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
3251 (elem funcref
3252 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3253 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
3254 (elem funcref
3255 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3256 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
3257 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
3258 (func (result i32) (i32.const 5)) ;; index 5
3259 (func (result i32) (i32.const 6))
3260 (func (result i32) (i32.const 7))
3261 (func (result i32) (i32.const 8))
3262 (func (result i32) (i32.const 9)) ;; index 9
3263 (func (export "test")
3264 (table.copy $$t1 $$t1 (i32.const 10) (i32.const 12) (i32.const 7)))
3265 (func (export "check_t0") (param i32) (result i32)
3266 (call_indirect $$t1 (type 0) (local.get 0)))
3267 (func (export "check_t1") (param i32) (result i32)
3268 (call_indirect $$t0 (type 0) (local.get 0)))
3269 )`);
3270
3271 // ./test/core/table_copy.wast:1425
3272 invoke($16, `test`, []);
3273
3274 // ./test/core/table_copy.wast:1426
3275 assert_trap(() => invoke($16, `check_t0`, [0]), `uninitialized element`);
3276
3277 // ./test/core/table_copy.wast:1427
3278 assert_trap(() => invoke($16, `check_t0`, [1]), `uninitialized element`);
3279
3280 // ./test/core/table_copy.wast:1428
3281 assert_return(() => invoke($16, `check_t0`, [2]), [value("i32", 3)]);
3282
3283 // ./test/core/table_copy.wast:1429
3284 assert_return(() => invoke($16, `check_t0`, [3]), [value("i32", 1)]);
3285
3286 // ./test/core/table_copy.wast:1430
3287 assert_return(() => invoke($16, `check_t0`, [4]), [value("i32", 4)]);
3288
3289 // ./test/core/table_copy.wast:1431
3290 assert_return(() => invoke($16, `check_t0`, [5]), [value("i32", 1)]);
3291
3292 // ./test/core/table_copy.wast:1432
3293 assert_trap(() => invoke($16, `check_t0`, [6]), `uninitialized element`);
3294
3295 // ./test/core/table_copy.wast:1433
3296 assert_trap(() => invoke($16, `check_t0`, [7]), `uninitialized element`);
3297
3298 // ./test/core/table_copy.wast:1434
3299 assert_trap(() => invoke($16, `check_t0`, [8]), `uninitialized element`);
3300
3301 // ./test/core/table_copy.wast:1435
3302 assert_trap(() => invoke($16, `check_t0`, [9]), `uninitialized element`);
3303
3304 // ./test/core/table_copy.wast:1436
3305 assert_return(() => invoke($16, `check_t0`, [10]), [value("i32", 7)]);
3306
3307 // ./test/core/table_copy.wast:1437
3308 assert_return(() => invoke($16, `check_t0`, [11]), [value("i32", 5)]);
3309
3310 // ./test/core/table_copy.wast:1438
3311 assert_return(() => invoke($16, `check_t0`, [12]), [value("i32", 2)]);
3312
3313 // ./test/core/table_copy.wast:1439
3314 assert_return(() => invoke($16, `check_t0`, [13]), [value("i32", 3)]);
3315
3316 // ./test/core/table_copy.wast:1440
3317 assert_return(() => invoke($16, `check_t0`, [14]), [value("i32", 6)]);
3318
3319 // ./test/core/table_copy.wast:1441
3320 assert_trap(() => invoke($16, `check_t0`, [15]), `uninitialized element`);
3321
3322 // ./test/core/table_copy.wast:1442
3323 assert_trap(() => invoke($16, `check_t0`, [16]), `uninitialized element`);
3324
3325 // ./test/core/table_copy.wast:1443
3326 assert_trap(() => invoke($16, `check_t0`, [17]), `uninitialized element`);
3327
3328 // ./test/core/table_copy.wast:1444
3329 assert_trap(() => invoke($16, `check_t0`, [18]), `uninitialized element`);
3330
3331 // ./test/core/table_copy.wast:1445
3332 assert_trap(() => invoke($16, `check_t0`, [19]), `uninitialized element`);
3333
3334 // ./test/core/table_copy.wast:1446
3335 assert_trap(() => invoke($16, `check_t0`, [20]), `uninitialized element`);
3336
3337 // ./test/core/table_copy.wast:1447
3338 assert_trap(() => invoke($16, `check_t0`, [21]), `uninitialized element`);
3339
3340 // ./test/core/table_copy.wast:1448
3341 assert_trap(() => invoke($16, `check_t0`, [22]), `uninitialized element`);
3342
3343 // ./test/core/table_copy.wast:1449
3344 assert_trap(() => invoke($16, `check_t0`, [23]), `uninitialized element`);
3345
3346 // ./test/core/table_copy.wast:1450
3347 assert_trap(() => invoke($16, `check_t0`, [24]), `uninitialized element`);
3348
3349 // ./test/core/table_copy.wast:1451
3350 assert_trap(() => invoke($16, `check_t0`, [25]), `uninitialized element`);
3351
3352 // ./test/core/table_copy.wast:1452
3353 assert_trap(() => invoke($16, `check_t0`, [26]), `uninitialized element`);
3354
3355 // ./test/core/table_copy.wast:1453
3356 assert_trap(() => invoke($16, `check_t0`, [27]), `uninitialized element`);
3357
3358 // ./test/core/table_copy.wast:1454
3359 assert_trap(() => invoke($16, `check_t0`, [28]), `uninitialized element`);
3360
3361 // ./test/core/table_copy.wast:1455
3362 assert_trap(() => invoke($16, `check_t0`, [29]), `uninitialized element`);
3363
3364 // ./test/core/table_copy.wast:1456
3365 assert_trap(() => invoke($16, `check_t1`, [0]), `uninitialized element`);
3366
3367 // ./test/core/table_copy.wast:1457
3368 assert_trap(() => invoke($16, `check_t1`, [1]), `uninitialized element`);
3369
3370 // ./test/core/table_copy.wast:1458
3371 assert_trap(() => invoke($16, `check_t1`, [2]), `uninitialized element`);
3372
3373 // ./test/core/table_copy.wast:1459
3374 assert_return(() => invoke($16, `check_t1`, [3]), [value("i32", 1)]);
3375
3376 // ./test/core/table_copy.wast:1460
3377 assert_return(() => invoke($16, `check_t1`, [4]), [value("i32", 3)]);
3378
3379 // ./test/core/table_copy.wast:1461
3380 assert_return(() => invoke($16, `check_t1`, [5]), [value("i32", 1)]);
3381
3382 // ./test/core/table_copy.wast:1462
3383 assert_return(() => invoke($16, `check_t1`, [6]), [value("i32", 4)]);
3384
3385 // ./test/core/table_copy.wast:1463
3386 assert_trap(() => invoke($16, `check_t1`, [7]), `uninitialized element`);
3387
3388 // ./test/core/table_copy.wast:1464
3389 assert_trap(() => invoke($16, `check_t1`, [8]), `uninitialized element`);
3390
3391 // ./test/core/table_copy.wast:1465
3392 assert_trap(() => invoke($16, `check_t1`, [9]), `uninitialized element`);
3393
3394 // ./test/core/table_copy.wast:1466
3395 assert_trap(() => invoke($16, `check_t1`, [10]), `uninitialized element`);
3396
3397 // ./test/core/table_copy.wast:1467
3398 assert_return(() => invoke($16, `check_t1`, [11]), [value("i32", 6)]);
3399
3400 // ./test/core/table_copy.wast:1468
3401 assert_return(() => invoke($16, `check_t1`, [12]), [value("i32", 3)]);
3402
3403 // ./test/core/table_copy.wast:1469
3404 assert_return(() => invoke($16, `check_t1`, [13]), [value("i32", 2)]);
3405
3406 // ./test/core/table_copy.wast:1470
3407 assert_return(() => invoke($16, `check_t1`, [14]), [value("i32", 5)]);
3408
3409 // ./test/core/table_copy.wast:1471
3410 assert_return(() => invoke($16, `check_t1`, [15]), [value("i32", 7)]);
3411
3412 // ./test/core/table_copy.wast:1472
3413 assert_trap(() => invoke($16, `check_t1`, [16]), `uninitialized element`);
3414
3415 // ./test/core/table_copy.wast:1473
3416 assert_trap(() => invoke($16, `check_t1`, [17]), `uninitialized element`);
3417
3418 // ./test/core/table_copy.wast:1474
3419 assert_trap(() => invoke($16, `check_t1`, [18]), `uninitialized element`);
3420
3421 // ./test/core/table_copy.wast:1475
3422 assert_trap(() => invoke($16, `check_t1`, [19]), `uninitialized element`);
3423
3424 // ./test/core/table_copy.wast:1476
3425 assert_trap(() => invoke($16, `check_t1`, [20]), `uninitialized element`);
3426
3427 // ./test/core/table_copy.wast:1477
3428 assert_trap(() => invoke($16, `check_t1`, [21]), `uninitialized element`);
3429
3430 // ./test/core/table_copy.wast:1478
3431 assert_trap(() => invoke($16, `check_t1`, [22]), `uninitialized element`);
3432
3433 // ./test/core/table_copy.wast:1479
3434 assert_trap(() => invoke($16, `check_t1`, [23]), `uninitialized element`);
3435
3436 // ./test/core/table_copy.wast:1480
3437 assert_trap(() => invoke($16, `check_t1`, [24]), `uninitialized element`);
3438
3439 // ./test/core/table_copy.wast:1481
3440 assert_trap(() => invoke($16, `check_t1`, [25]), `uninitialized element`);
3441
3442 // ./test/core/table_copy.wast:1482
3443 assert_trap(() => invoke($16, `check_t1`, [26]), `uninitialized element`);
3444
3445 // ./test/core/table_copy.wast:1483
3446 assert_trap(() => invoke($16, `check_t1`, [27]), `uninitialized element`);
3447
3448 // ./test/core/table_copy.wast:1484
3449 assert_trap(() => invoke($16, `check_t1`, [28]), `uninitialized element`);
3450
3451 // ./test/core/table_copy.wast:1485
3452 assert_trap(() => invoke($16, `check_t1`, [29]), `uninitialized element`);
3453
3454 // ./test/core/table_copy.wast:1487
3455 let $17 = instantiate(`(module
3456 (type (func (result i32))) ;; type #0
3457 (import "a" "ef0" (func (result i32))) ;; index 0
3458 (import "a" "ef1" (func (result i32)))
3459 (import "a" "ef2" (func (result i32)))
3460 (import "a" "ef3" (func (result i32)))
3461 (import "a" "ef4" (func (result i32))) ;; index 4
3462 (table $$t0 30 30 funcref)
3463 (table $$t1 30 30 funcref)
3464 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
3465 (elem funcref
3466 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3467 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
3468 (elem funcref
3469 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3470 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
3471 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
3472 (func (result i32) (i32.const 5)) ;; index 5
3473 (func (result i32) (i32.const 6))
3474 (func (result i32) (i32.const 7))
3475 (func (result i32) (i32.const 8))
3476 (func (result i32) (i32.const 9)) ;; index 9
3477 (func (export "test")
3478 (table.copy $$t1 $$t1 (i32.const 12) (i32.const 10) (i32.const 7)))
3479 (func (export "check_t0") (param i32) (result i32)
3480 (call_indirect $$t1 (type 0) (local.get 0)))
3481 (func (export "check_t1") (param i32) (result i32)
3482 (call_indirect $$t0 (type 0) (local.get 0)))
3483 )`);
3484
3485 // ./test/core/table_copy.wast:1517
3486 invoke($17, `test`, []);
3487
3488 // ./test/core/table_copy.wast:1518
3489 assert_trap(() => invoke($17, `check_t0`, [0]), `uninitialized element`);
3490
3491 // ./test/core/table_copy.wast:1519
3492 assert_trap(() => invoke($17, `check_t0`, [1]), `uninitialized element`);
3493
3494 // ./test/core/table_copy.wast:1520
3495 assert_return(() => invoke($17, `check_t0`, [2]), [value("i32", 3)]);
3496
3497 // ./test/core/table_copy.wast:1521
3498 assert_return(() => invoke($17, `check_t0`, [3]), [value("i32", 1)]);
3499
3500 // ./test/core/table_copy.wast:1522
3501 assert_return(() => invoke($17, `check_t0`, [4]), [value("i32", 4)]);
3502
3503 // ./test/core/table_copy.wast:1523
3504 assert_return(() => invoke($17, `check_t0`, [5]), [value("i32", 1)]);
3505
3506 // ./test/core/table_copy.wast:1524
3507 assert_trap(() => invoke($17, `check_t0`, [6]), `uninitialized element`);
3508
3509 // ./test/core/table_copy.wast:1525
3510 assert_trap(() => invoke($17, `check_t0`, [7]), `uninitialized element`);
3511
3512 // ./test/core/table_copy.wast:1526
3513 assert_trap(() => invoke($17, `check_t0`, [8]), `uninitialized element`);
3514
3515 // ./test/core/table_copy.wast:1527
3516 assert_trap(() => invoke($17, `check_t0`, [9]), `uninitialized element`);
3517
3518 // ./test/core/table_copy.wast:1528
3519 assert_trap(() => invoke($17, `check_t0`, [10]), `uninitialized element`);
3520
3521 // ./test/core/table_copy.wast:1529
3522 assert_trap(() => invoke($17, `check_t0`, [11]), `uninitialized element`);
3523
3524 // ./test/core/table_copy.wast:1530
3525 assert_trap(() => invoke($17, `check_t0`, [12]), `uninitialized element`);
3526
3527 // ./test/core/table_copy.wast:1531
3528 assert_trap(() => invoke($17, `check_t0`, [13]), `uninitialized element`);
3529
3530 // ./test/core/table_copy.wast:1532
3531 assert_return(() => invoke($17, `check_t0`, [14]), [value("i32", 7)]);
3532
3533 // ./test/core/table_copy.wast:1533
3534 assert_return(() => invoke($17, `check_t0`, [15]), [value("i32", 5)]);
3535
3536 // ./test/core/table_copy.wast:1534
3537 assert_return(() => invoke($17, `check_t0`, [16]), [value("i32", 2)]);
3538
3539 // ./test/core/table_copy.wast:1535
3540 assert_return(() => invoke($17, `check_t0`, [17]), [value("i32", 3)]);
3541
3542 // ./test/core/table_copy.wast:1536
3543 assert_return(() => invoke($17, `check_t0`, [18]), [value("i32", 6)]);
3544
3545 // ./test/core/table_copy.wast:1537
3546 assert_trap(() => invoke($17, `check_t0`, [19]), `uninitialized element`);
3547
3548 // ./test/core/table_copy.wast:1538
3549 assert_trap(() => invoke($17, `check_t0`, [20]), `uninitialized element`);
3550
3551 // ./test/core/table_copy.wast:1539
3552 assert_trap(() => invoke($17, `check_t0`, [21]), `uninitialized element`);
3553
3554 // ./test/core/table_copy.wast:1540
3555 assert_trap(() => invoke($17, `check_t0`, [22]), `uninitialized element`);
3556
3557 // ./test/core/table_copy.wast:1541
3558 assert_trap(() => invoke($17, `check_t0`, [23]), `uninitialized element`);
3559
3560 // ./test/core/table_copy.wast:1542
3561 assert_trap(() => invoke($17, `check_t0`, [24]), `uninitialized element`);
3562
3563 // ./test/core/table_copy.wast:1543
3564 assert_trap(() => invoke($17, `check_t0`, [25]), `uninitialized element`);
3565
3566 // ./test/core/table_copy.wast:1544
3567 assert_trap(() => invoke($17, `check_t0`, [26]), `uninitialized element`);
3568
3569 // ./test/core/table_copy.wast:1545
3570 assert_trap(() => invoke($17, `check_t0`, [27]), `uninitialized element`);
3571
3572 // ./test/core/table_copy.wast:1546
3573 assert_trap(() => invoke($17, `check_t0`, [28]), `uninitialized element`);
3574
3575 // ./test/core/table_copy.wast:1547
3576 assert_trap(() => invoke($17, `check_t0`, [29]), `uninitialized element`);
3577
3578 // ./test/core/table_copy.wast:1548
3579 assert_trap(() => invoke($17, `check_t1`, [0]), `uninitialized element`);
3580
3581 // ./test/core/table_copy.wast:1549
3582 assert_trap(() => invoke($17, `check_t1`, [1]), `uninitialized element`);
3583
3584 // ./test/core/table_copy.wast:1550
3585 assert_trap(() => invoke($17, `check_t1`, [2]), `uninitialized element`);
3586
3587 // ./test/core/table_copy.wast:1551
3588 assert_return(() => invoke($17, `check_t1`, [3]), [value("i32", 1)]);
3589
3590 // ./test/core/table_copy.wast:1552
3591 assert_return(() => invoke($17, `check_t1`, [4]), [value("i32", 3)]);
3592
3593 // ./test/core/table_copy.wast:1553
3594 assert_return(() => invoke($17, `check_t1`, [5]), [value("i32", 1)]);
3595
3596 // ./test/core/table_copy.wast:1554
3597 assert_return(() => invoke($17, `check_t1`, [6]), [value("i32", 4)]);
3598
3599 // ./test/core/table_copy.wast:1555
3600 assert_trap(() => invoke($17, `check_t1`, [7]), `uninitialized element`);
3601
3602 // ./test/core/table_copy.wast:1556
3603 assert_trap(() => invoke($17, `check_t1`, [8]), `uninitialized element`);
3604
3605 // ./test/core/table_copy.wast:1557
3606 assert_trap(() => invoke($17, `check_t1`, [9]), `uninitialized element`);
3607
3608 // ./test/core/table_copy.wast:1558
3609 assert_trap(() => invoke($17, `check_t1`, [10]), `uninitialized element`);
3610
3611 // ./test/core/table_copy.wast:1559
3612 assert_return(() => invoke($17, `check_t1`, [11]), [value("i32", 6)]);
3613
3614 // ./test/core/table_copy.wast:1560
3615 assert_return(() => invoke($17, `check_t1`, [12]), [value("i32", 3)]);
3616
3617 // ./test/core/table_copy.wast:1561
3618 assert_return(() => invoke($17, `check_t1`, [13]), [value("i32", 2)]);
3619
3620 // ./test/core/table_copy.wast:1562
3621 assert_return(() => invoke($17, `check_t1`, [14]), [value("i32", 5)]);
3622
3623 // ./test/core/table_copy.wast:1563
3624 assert_return(() => invoke($17, `check_t1`, [15]), [value("i32", 7)]);
3625
3626 // ./test/core/table_copy.wast:1564
3627 assert_trap(() => invoke($17, `check_t1`, [16]), `uninitialized element`);
3628
3629 // ./test/core/table_copy.wast:1565
3630 assert_trap(() => invoke($17, `check_t1`, [17]), `uninitialized element`);
3631
3632 // ./test/core/table_copy.wast:1566
3633 assert_trap(() => invoke($17, `check_t1`, [18]), `uninitialized element`);
3634
3635 // ./test/core/table_copy.wast:1567
3636 assert_trap(() => invoke($17, `check_t1`, [19]), `uninitialized element`);
3637
3638 // ./test/core/table_copy.wast:1568
3639 assert_trap(() => invoke($17, `check_t1`, [20]), `uninitialized element`);
3640
3641 // ./test/core/table_copy.wast:1569
3642 assert_trap(() => invoke($17, `check_t1`, [21]), `uninitialized element`);
3643
3644 // ./test/core/table_copy.wast:1570
3645 assert_trap(() => invoke($17, `check_t1`, [22]), `uninitialized element`);
3646
3647 // ./test/core/table_copy.wast:1571
3648 assert_trap(() => invoke($17, `check_t1`, [23]), `uninitialized element`);
3649
3650 // ./test/core/table_copy.wast:1572
3651 assert_trap(() => invoke($17, `check_t1`, [24]), `uninitialized element`);
3652
3653 // ./test/core/table_copy.wast:1573
3654 assert_trap(() => invoke($17, `check_t1`, [25]), `uninitialized element`);
3655
3656 // ./test/core/table_copy.wast:1574
3657 assert_trap(() => invoke($17, `check_t1`, [26]), `uninitialized element`);
3658
3659 // ./test/core/table_copy.wast:1575
3660 assert_trap(() => invoke($17, `check_t1`, [27]), `uninitialized element`);
3661
3662 // ./test/core/table_copy.wast:1576
3663 assert_trap(() => invoke($17, `check_t1`, [28]), `uninitialized element`);
3664
3665 // ./test/core/table_copy.wast:1577
3666 assert_trap(() => invoke($17, `check_t1`, [29]), `uninitialized element`);
3667
3668 // ./test/core/table_copy.wast:1579
3669 let $18 = instantiate(`(module
3670 (type (func (result i32))) ;; type #0
3671 (import "a" "ef0" (func (result i32))) ;; index 0
3672 (import "a" "ef1" (func (result i32)))
3673 (import "a" "ef2" (func (result i32)))
3674 (import "a" "ef3" (func (result i32)))
3675 (import "a" "ef4" (func (result i32))) ;; index 4
3676 (table $$t0 30 30 funcref)
3677 (table $$t1 30 30 funcref)
3678 (elem (table $$t1) (i32.const 2) func 3 1 4 1)
3679 (elem funcref
3680 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3681 (elem (table $$t1) (i32.const 12) func 7 5 2 3 6)
3682 (elem funcref
3683 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3684 (elem (table $$t0) (i32.const 3) func 1 3 1 4)
3685 (elem (table $$t0) (i32.const 11) func 6 3 2 5 7)
3686 (func (result i32) (i32.const 5)) ;; index 5
3687 (func (result i32) (i32.const 6))
3688 (func (result i32) (i32.const 7))
3689 (func (result i32) (i32.const 8))
3690 (func (result i32) (i32.const 9)) ;; index 9
3691 (func (export "test")
3692 (table.copy $$t0 $$t1 (i32.const 10) (i32.const 0) (i32.const 20)))
3693 (func (export "check_t0") (param i32) (result i32)
3694 (call_indirect $$t1 (type 0) (local.get 0)))
3695 (func (export "check_t1") (param i32) (result i32)
3696 (call_indirect $$t0 (type 0) (local.get 0)))
3697 )`);
3698
3699 // ./test/core/table_copy.wast:1609
3700 invoke($18, `test`, []);
3701
3702 // ./test/core/table_copy.wast:1610
3703 assert_trap(() => invoke($18, `check_t0`, [0]), `uninitialized element`);
3704
3705 // ./test/core/table_copy.wast:1611
3706 assert_trap(() => invoke($18, `check_t0`, [1]), `uninitialized element`);
3707
3708 // ./test/core/table_copy.wast:1612
3709 assert_return(() => invoke($18, `check_t0`, [2]), [value("i32", 3)]);
3710
3711 // ./test/core/table_copy.wast:1613
3712 assert_return(() => invoke($18, `check_t0`, [3]), [value("i32", 1)]);
3713
3714 // ./test/core/table_copy.wast:1614
3715 assert_return(() => invoke($18, `check_t0`, [4]), [value("i32", 4)]);
3716
3717 // ./test/core/table_copy.wast:1615
3718 assert_return(() => invoke($18, `check_t0`, [5]), [value("i32", 1)]);
3719
3720 // ./test/core/table_copy.wast:1616
3721 assert_trap(() => invoke($18, `check_t0`, [6]), `uninitialized element`);
3722
3723 // ./test/core/table_copy.wast:1617
3724 assert_trap(() => invoke($18, `check_t0`, [7]), `uninitialized element`);
3725
3726 // ./test/core/table_copy.wast:1618
3727 assert_trap(() => invoke($18, `check_t0`, [8]), `uninitialized element`);
3728
3729 // ./test/core/table_copy.wast:1619
3730 assert_trap(() => invoke($18, `check_t0`, [9]), `uninitialized element`);
3731
3732 // ./test/core/table_copy.wast:1620
3733 assert_trap(() => invoke($18, `check_t0`, [10]), `uninitialized element`);
3734
3735 // ./test/core/table_copy.wast:1621
3736 assert_trap(() => invoke($18, `check_t0`, [11]), `uninitialized element`);
3737
3738 // ./test/core/table_copy.wast:1622
3739 assert_return(() => invoke($18, `check_t0`, [12]), [value("i32", 7)]);
3740
3741 // ./test/core/table_copy.wast:1623
3742 assert_return(() => invoke($18, `check_t0`, [13]), [value("i32", 5)]);
3743
3744 // ./test/core/table_copy.wast:1624
3745 assert_return(() => invoke($18, `check_t0`, [14]), [value("i32", 2)]);
3746
3747 // ./test/core/table_copy.wast:1625
3748 assert_return(() => invoke($18, `check_t0`, [15]), [value("i32", 3)]);
3749
3750 // ./test/core/table_copy.wast:1626
3751 assert_return(() => invoke($18, `check_t0`, [16]), [value("i32", 6)]);
3752
3753 // ./test/core/table_copy.wast:1627
3754 assert_trap(() => invoke($18, `check_t0`, [17]), `uninitialized element`);
3755
3756 // ./test/core/table_copy.wast:1628
3757 assert_trap(() => invoke($18, `check_t0`, [18]), `uninitialized element`);
3758
3759 // ./test/core/table_copy.wast:1629
3760 assert_trap(() => invoke($18, `check_t0`, [19]), `uninitialized element`);
3761
3762 // ./test/core/table_copy.wast:1630
3763 assert_trap(() => invoke($18, `check_t0`, [20]), `uninitialized element`);
3764
3765 // ./test/core/table_copy.wast:1631
3766 assert_trap(() => invoke($18, `check_t0`, [21]), `uninitialized element`);
3767
3768 // ./test/core/table_copy.wast:1632
3769 assert_trap(() => invoke($18, `check_t0`, [22]), `uninitialized element`);
3770
3771 // ./test/core/table_copy.wast:1633
3772 assert_trap(() => invoke($18, `check_t0`, [23]), `uninitialized element`);
3773
3774 // ./test/core/table_copy.wast:1634
3775 assert_trap(() => invoke($18, `check_t0`, [24]), `uninitialized element`);
3776
3777 // ./test/core/table_copy.wast:1635
3778 assert_trap(() => invoke($18, `check_t0`, [25]), `uninitialized element`);
3779
3780 // ./test/core/table_copy.wast:1636
3781 assert_trap(() => invoke($18, `check_t0`, [26]), `uninitialized element`);
3782
3783 // ./test/core/table_copy.wast:1637
3784 assert_trap(() => invoke($18, `check_t0`, [27]), `uninitialized element`);
3785
3786 // ./test/core/table_copy.wast:1638
3787 assert_trap(() => invoke($18, `check_t0`, [28]), `uninitialized element`);
3788
3789 // ./test/core/table_copy.wast:1639
3790 assert_trap(() => invoke($18, `check_t0`, [29]), `uninitialized element`);
3791
3792 // ./test/core/table_copy.wast:1640
3793 assert_trap(() => invoke($18, `check_t1`, [0]), `uninitialized element`);
3794
3795 // ./test/core/table_copy.wast:1641
3796 assert_trap(() => invoke($18, `check_t1`, [1]), `uninitialized element`);
3797
3798 // ./test/core/table_copy.wast:1642
3799 assert_trap(() => invoke($18, `check_t1`, [2]), `uninitialized element`);
3800
3801 // ./test/core/table_copy.wast:1643
3802 assert_return(() => invoke($18, `check_t1`, [3]), [value("i32", 1)]);
3803
3804 // ./test/core/table_copy.wast:1644
3805 assert_return(() => invoke($18, `check_t1`, [4]), [value("i32", 3)]);
3806
3807 // ./test/core/table_copy.wast:1645
3808 assert_return(() => invoke($18, `check_t1`, [5]), [value("i32", 1)]);
3809
3810 // ./test/core/table_copy.wast:1646
3811 assert_return(() => invoke($18, `check_t1`, [6]), [value("i32", 4)]);
3812
3813 // ./test/core/table_copy.wast:1647
3814 assert_trap(() => invoke($18, `check_t1`, [7]), `uninitialized element`);
3815
3816 // ./test/core/table_copy.wast:1648
3817 assert_trap(() => invoke($18, `check_t1`, [8]), `uninitialized element`);
3818
3819 // ./test/core/table_copy.wast:1649
3820 assert_trap(() => invoke($18, `check_t1`, [9]), `uninitialized element`);
3821
3822 // ./test/core/table_copy.wast:1650
3823 assert_trap(() => invoke($18, `check_t1`, [10]), `uninitialized element`);
3824
3825 // ./test/core/table_copy.wast:1651
3826 assert_trap(() => invoke($18, `check_t1`, [11]), `uninitialized element`);
3827
3828 // ./test/core/table_copy.wast:1652
3829 assert_return(() => invoke($18, `check_t1`, [12]), [value("i32", 3)]);
3830
3831 // ./test/core/table_copy.wast:1653
3832 assert_return(() => invoke($18, `check_t1`, [13]), [value("i32", 1)]);
3833
3834 // ./test/core/table_copy.wast:1654
3835 assert_return(() => invoke($18, `check_t1`, [14]), [value("i32", 4)]);
3836
3837 // ./test/core/table_copy.wast:1655
3838 assert_return(() => invoke($18, `check_t1`, [15]), [value("i32", 1)]);
3839
3840 // ./test/core/table_copy.wast:1656
3841 assert_trap(() => invoke($18, `check_t1`, [16]), `uninitialized element`);
3842
3843 // ./test/core/table_copy.wast:1657
3844 assert_trap(() => invoke($18, `check_t1`, [17]), `uninitialized element`);
3845
3846 // ./test/core/table_copy.wast:1658
3847 assert_trap(() => invoke($18, `check_t1`, [18]), `uninitialized element`);
3848
3849 // ./test/core/table_copy.wast:1659
3850 assert_trap(() => invoke($18, `check_t1`, [19]), `uninitialized element`);
3851
3852 // ./test/core/table_copy.wast:1660
3853 assert_trap(() => invoke($18, `check_t1`, [20]), `uninitialized element`);
3854
3855 // ./test/core/table_copy.wast:1661
3856 assert_trap(() => invoke($18, `check_t1`, [21]), `uninitialized element`);
3857
3858 // ./test/core/table_copy.wast:1662
3859 assert_return(() => invoke($18, `check_t1`, [22]), [value("i32", 7)]);
3860
3861 // ./test/core/table_copy.wast:1663
3862 assert_return(() => invoke($18, `check_t1`, [23]), [value("i32", 5)]);
3863
3864 // ./test/core/table_copy.wast:1664
3865 assert_return(() => invoke($18, `check_t1`, [24]), [value("i32", 2)]);
3866
3867 // ./test/core/table_copy.wast:1665
3868 assert_return(() => invoke($18, `check_t1`, [25]), [value("i32", 3)]);
3869
3870 // ./test/core/table_copy.wast:1666
3871 assert_return(() => invoke($18, `check_t1`, [26]), [value("i32", 6)]);
3872
3873 // ./test/core/table_copy.wast:1667
3874 assert_trap(() => invoke($18, `check_t1`, [27]), `uninitialized element`);
3875
3876 // ./test/core/table_copy.wast:1668
3877 assert_trap(() => invoke($18, `check_t1`, [28]), `uninitialized element`);
3878
3879 // ./test/core/table_copy.wast:1669
3880 assert_trap(() => invoke($18, `check_t1`, [29]), `uninitialized element`);
3881
3882 // ./test/core/table_copy.wast:1671
3883 let $19 = instantiate(`(module
3884 (table $$t0 30 30 funcref)
3885 (table $$t1 30 30 funcref)
3886 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
3887 (elem funcref
3888 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3889 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
3890 (elem funcref
3891 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3892 (func (result i32) (i32.const 0))
3893 (func (result i32) (i32.const 1))
3894 (func (result i32) (i32.const 2))
3895 (func (result i32) (i32.const 3))
3896 (func (result i32) (i32.const 4))
3897 (func (result i32) (i32.const 5))
3898 (func (result i32) (i32.const 6))
3899 (func (result i32) (i32.const 7))
3900 (func (result i32) (i32.const 8))
3901 (func (result i32) (i32.const 9))
3902 (func (export "test")
3903 (table.copy $$t0 $$t0 (i32.const 28) (i32.const 1) (i32.const 3))
3904 ))`);
3905
3906 // ./test/core/table_copy.wast:1694
3907 assert_trap(() => invoke($19, `test`, []), `out of bounds table access`);
3908
3909 // ./test/core/table_copy.wast:1696
3910 let $20 = instantiate(`(module
3911 (table $$t0 30 30 funcref)
3912 (table $$t1 30 30 funcref)
3913 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
3914 (elem funcref
3915 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3916 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
3917 (elem funcref
3918 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3919 (func (result i32) (i32.const 0))
3920 (func (result i32) (i32.const 1))
3921 (func (result i32) (i32.const 2))
3922 (func (result i32) (i32.const 3))
3923 (func (result i32) (i32.const 4))
3924 (func (result i32) (i32.const 5))
3925 (func (result i32) (i32.const 6))
3926 (func (result i32) (i32.const 7))
3927 (func (result i32) (i32.const 8))
3928 (func (result i32) (i32.const 9))
3929 (func (export "test")
3930 (table.copy $$t0 $$t0 (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2))
3931 ))`);
3932
3933 // ./test/core/table_copy.wast:1719
3934 assert_trap(() => invoke($20, `test`, []), `out of bounds table access`);
3935
3936 // ./test/core/table_copy.wast:1721
3937 let $21 = instantiate(`(module
3938 (table $$t0 30 30 funcref)
3939 (table $$t1 30 30 funcref)
3940 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
3941 (elem funcref
3942 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3943 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
3944 (elem funcref
3945 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3946 (func (result i32) (i32.const 0))
3947 (func (result i32) (i32.const 1))
3948 (func (result i32) (i32.const 2))
3949 (func (result i32) (i32.const 3))
3950 (func (result i32) (i32.const 4))
3951 (func (result i32) (i32.const 5))
3952 (func (result i32) (i32.const 6))
3953 (func (result i32) (i32.const 7))
3954 (func (result i32) (i32.const 8))
3955 (func (result i32) (i32.const 9))
3956 (func (export "test")
3957 (table.copy $$t0 $$t0 (i32.const 15) (i32.const 25) (i32.const 6))
3958 ))`);
3959
3960 // ./test/core/table_copy.wast:1744
3961 assert_trap(() => invoke($21, `test`, []), `out of bounds table access`);
3962
3963 // ./test/core/table_copy.wast:1746
3964 let $22 = instantiate(`(module
3965 (table $$t0 30 30 funcref)
3966 (table $$t1 30 30 funcref)
3967 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
3968 (elem funcref
3969 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3970 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
3971 (elem funcref
3972 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
3973 (func (result i32) (i32.const 0))
3974 (func (result i32) (i32.const 1))
3975 (func (result i32) (i32.const 2))
3976 (func (result i32) (i32.const 3))
3977 (func (result i32) (i32.const 4))
3978 (func (result i32) (i32.const 5))
3979 (func (result i32) (i32.const 6))
3980 (func (result i32) (i32.const 7))
3981 (func (result i32) (i32.const 8))
3982 (func (result i32) (i32.const 9))
3983 (func (export "test")
3984 (table.copy $$t0 $$t0 (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2))
3985 ))`);
3986
3987 // ./test/core/table_copy.wast:1769
3988 assert_trap(() => invoke($22, `test`, []), `out of bounds table access`);
3989
3990 // ./test/core/table_copy.wast:1771
3991 let $23 = instantiate(`(module
3992 (table $$t0 30 30 funcref)
3993 (table $$t1 30 30 funcref)
3994 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
3995 (elem funcref
3996 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
3997 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
3998 (elem funcref
3999 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4000 (func (result i32) (i32.const 0))
4001 (func (result i32) (i32.const 1))
4002 (func (result i32) (i32.const 2))
4003 (func (result i32) (i32.const 3))
4004 (func (result i32) (i32.const 4))
4005 (func (result i32) (i32.const 5))
4006 (func (result i32) (i32.const 6))
4007 (func (result i32) (i32.const 7))
4008 (func (result i32) (i32.const 8))
4009 (func (result i32) (i32.const 9))
4010 (func (export "test")
4011 (table.copy $$t0 $$t0 (i32.const 15) (i32.const 25) (i32.const 0))
4012 ))`);
4013
4014 // ./test/core/table_copy.wast:1794
4015 invoke($23, `test`, []);
4016
4017 // ./test/core/table_copy.wast:1796
4018 let $24 = instantiate(`(module
4019 (table $$t0 30 30 funcref)
4020 (table $$t1 30 30 funcref)
4021 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4022 (elem funcref
4023 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4024 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4025 (elem funcref
4026 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4027 (func (result i32) (i32.const 0))
4028 (func (result i32) (i32.const 1))
4029 (func (result i32) (i32.const 2))
4030 (func (result i32) (i32.const 3))
4031 (func (result i32) (i32.const 4))
4032 (func (result i32) (i32.const 5))
4033 (func (result i32) (i32.const 6))
4034 (func (result i32) (i32.const 7))
4035 (func (result i32) (i32.const 8))
4036 (func (result i32) (i32.const 9))
4037 (func (export "test")
4038 (table.copy $$t0 $$t0 (i32.const 30) (i32.const 15) (i32.const 0))
4039 ))`);
4040
4041 // ./test/core/table_copy.wast:1819
4042 invoke($24, `test`, []);
4043
4044 // ./test/core/table_copy.wast:1821
4045 let $25 = instantiate(`(module
4046 (table $$t0 30 30 funcref)
4047 (table $$t1 30 30 funcref)
4048 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4049 (elem funcref
4050 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4051 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4052 (elem funcref
4053 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4054 (func (result i32) (i32.const 0))
4055 (func (result i32) (i32.const 1))
4056 (func (result i32) (i32.const 2))
4057 (func (result i32) (i32.const 3))
4058 (func (result i32) (i32.const 4))
4059 (func (result i32) (i32.const 5))
4060 (func (result i32) (i32.const 6))
4061 (func (result i32) (i32.const 7))
4062 (func (result i32) (i32.const 8))
4063 (func (result i32) (i32.const 9))
4064 (func (export "test")
4065 (table.copy $$t0 $$t0 (i32.const 31) (i32.const 15) (i32.const 0))
4066 ))`);
4067
4068 // ./test/core/table_copy.wast:1844
4069 assert_trap(() => invoke($25, `test`, []), `out of bounds table access`);
4070
4071 // ./test/core/table_copy.wast:1846
4072 let $26 = instantiate(`(module
4073 (table $$t0 30 30 funcref)
4074 (table $$t1 30 30 funcref)
4075 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4076 (elem funcref
4077 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4078 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4079 (elem funcref
4080 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4081 (func (result i32) (i32.const 0))
4082 (func (result i32) (i32.const 1))
4083 (func (result i32) (i32.const 2))
4084 (func (result i32) (i32.const 3))
4085 (func (result i32) (i32.const 4))
4086 (func (result i32) (i32.const 5))
4087 (func (result i32) (i32.const 6))
4088 (func (result i32) (i32.const 7))
4089 (func (result i32) (i32.const 8))
4090 (func (result i32) (i32.const 9))
4091 (func (export "test")
4092 (table.copy $$t0 $$t0 (i32.const 15) (i32.const 30) (i32.const 0))
4093 ))`);
4094
4095 // ./test/core/table_copy.wast:1869
4096 invoke($26, `test`, []);
4097
4098 // ./test/core/table_copy.wast:1871
4099 let $27 = instantiate(`(module
4100 (table $$t0 30 30 funcref)
4101 (table $$t1 30 30 funcref)
4102 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4103 (elem funcref
4104 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4105 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4106 (elem funcref
4107 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4108 (func (result i32) (i32.const 0))
4109 (func (result i32) (i32.const 1))
4110 (func (result i32) (i32.const 2))
4111 (func (result i32) (i32.const 3))
4112 (func (result i32) (i32.const 4))
4113 (func (result i32) (i32.const 5))
4114 (func (result i32) (i32.const 6))
4115 (func (result i32) (i32.const 7))
4116 (func (result i32) (i32.const 8))
4117 (func (result i32) (i32.const 9))
4118 (func (export "test")
4119 (table.copy $$t0 $$t0 (i32.const 15) (i32.const 31) (i32.const 0))
4120 ))`);
4121
4122 // ./test/core/table_copy.wast:1894
4123 assert_trap(() => invoke($27, `test`, []), `out of bounds table access`);
4124
4125 // ./test/core/table_copy.wast:1896
4126 let $28 = instantiate(`(module
4127 (table $$t0 30 30 funcref)
4128 (table $$t1 30 30 funcref)
4129 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4130 (elem funcref
4131 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4132 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4133 (elem funcref
4134 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4135 (func (result i32) (i32.const 0))
4136 (func (result i32) (i32.const 1))
4137 (func (result i32) (i32.const 2))
4138 (func (result i32) (i32.const 3))
4139 (func (result i32) (i32.const 4))
4140 (func (result i32) (i32.const 5))
4141 (func (result i32) (i32.const 6))
4142 (func (result i32) (i32.const 7))
4143 (func (result i32) (i32.const 8))
4144 (func (result i32) (i32.const 9))
4145 (func (export "test")
4146 (table.copy $$t0 $$t0 (i32.const 30) (i32.const 30) (i32.const 0))
4147 ))`);
4148
4149 // ./test/core/table_copy.wast:1919
4150 invoke($28, `test`, []);
4151
4152 // ./test/core/table_copy.wast:1921
4153 let $29 = instantiate(`(module
4154 (table $$t0 30 30 funcref)
4155 (table $$t1 30 30 funcref)
4156 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4157 (elem funcref
4158 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4159 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4160 (elem funcref
4161 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4162 (func (result i32) (i32.const 0))
4163 (func (result i32) (i32.const 1))
4164 (func (result i32) (i32.const 2))
4165 (func (result i32) (i32.const 3))
4166 (func (result i32) (i32.const 4))
4167 (func (result i32) (i32.const 5))
4168 (func (result i32) (i32.const 6))
4169 (func (result i32) (i32.const 7))
4170 (func (result i32) (i32.const 8))
4171 (func (result i32) (i32.const 9))
4172 (func (export "test")
4173 (table.copy $$t0 $$t0 (i32.const 31) (i32.const 31) (i32.const 0))
4174 ))`);
4175
4176 // ./test/core/table_copy.wast:1944
4177 assert_trap(() => invoke($29, `test`, []), `out of bounds table access`);
4178
4179 // ./test/core/table_copy.wast:1946
4180 let $30 = instantiate(`(module
4181 (table $$t0 30 30 funcref)
4182 (table $$t1 30 30 funcref)
4183 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4184 (elem funcref
4185 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4186 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4187 (elem funcref
4188 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4189 (func (result i32) (i32.const 0))
4190 (func (result i32) (i32.const 1))
4191 (func (result i32) (i32.const 2))
4192 (func (result i32) (i32.const 3))
4193 (func (result i32) (i32.const 4))
4194 (func (result i32) (i32.const 5))
4195 (func (result i32) (i32.const 6))
4196 (func (result i32) (i32.const 7))
4197 (func (result i32) (i32.const 8))
4198 (func (result i32) (i32.const 9))
4199 (func (export "test")
4200 (table.copy $$t1 $$t0 (i32.const 28) (i32.const 1) (i32.const 3))
4201 ))`);
4202
4203 // ./test/core/table_copy.wast:1969
4204 assert_trap(() => invoke($30, `test`, []), `out of bounds table access`);
4205
4206 // ./test/core/table_copy.wast:1971
4207 let $31 = instantiate(`(module
4208 (table $$t0 30 30 funcref)
4209 (table $$t1 30 30 funcref)
4210 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4211 (elem funcref
4212 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4213 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4214 (elem funcref
4215 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4216 (func (result i32) (i32.const 0))
4217 (func (result i32) (i32.const 1))
4218 (func (result i32) (i32.const 2))
4219 (func (result i32) (i32.const 3))
4220 (func (result i32) (i32.const 4))
4221 (func (result i32) (i32.const 5))
4222 (func (result i32) (i32.const 6))
4223 (func (result i32) (i32.const 7))
4224 (func (result i32) (i32.const 8))
4225 (func (result i32) (i32.const 9))
4226 (func (export "test")
4227 (table.copy $$t1 $$t0 (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2))
4228 ))`);
4229
4230 // ./test/core/table_copy.wast:1994
4231 assert_trap(() => invoke($31, `test`, []), `out of bounds table access`);
4232
4233 // ./test/core/table_copy.wast:1996
4234 let $32 = instantiate(`(module
4235 (table $$t0 30 30 funcref)
4236 (table $$t1 30 30 funcref)
4237 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4238 (elem funcref
4239 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4240 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4241 (elem funcref
4242 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4243 (func (result i32) (i32.const 0))
4244 (func (result i32) (i32.const 1))
4245 (func (result i32) (i32.const 2))
4246 (func (result i32) (i32.const 3))
4247 (func (result i32) (i32.const 4))
4248 (func (result i32) (i32.const 5))
4249 (func (result i32) (i32.const 6))
4250 (func (result i32) (i32.const 7))
4251 (func (result i32) (i32.const 8))
4252 (func (result i32) (i32.const 9))
4253 (func (export "test")
4254 (table.copy $$t1 $$t0 (i32.const 15) (i32.const 25) (i32.const 6))
4255 ))`);
4256
4257 // ./test/core/table_copy.wast:2019
4258 assert_trap(() => invoke($32, `test`, []), `out of bounds table access`);
4259
4260 // ./test/core/table_copy.wast:2021
4261 let $33 = instantiate(`(module
4262 (table $$t0 30 30 funcref)
4263 (table $$t1 30 30 funcref)
4264 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4265 (elem funcref
4266 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4267 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4268 (elem funcref
4269 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4270 (func (result i32) (i32.const 0))
4271 (func (result i32) (i32.const 1))
4272 (func (result i32) (i32.const 2))
4273 (func (result i32) (i32.const 3))
4274 (func (result i32) (i32.const 4))
4275 (func (result i32) (i32.const 5))
4276 (func (result i32) (i32.const 6))
4277 (func (result i32) (i32.const 7))
4278 (func (result i32) (i32.const 8))
4279 (func (result i32) (i32.const 9))
4280 (func (export "test")
4281 (table.copy $$t1 $$t0 (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2))
4282 ))`);
4283
4284 // ./test/core/table_copy.wast:2044
4285 assert_trap(() => invoke($33, `test`, []), `out of bounds table access`);
4286
4287 // ./test/core/table_copy.wast:2046
4288 let $34 = instantiate(`(module
4289 (table $$t0 30 30 funcref)
4290 (table $$t1 30 30 funcref)
4291 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4292 (elem funcref
4293 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4294 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4295 (elem funcref
4296 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4297 (func (result i32) (i32.const 0))
4298 (func (result i32) (i32.const 1))
4299 (func (result i32) (i32.const 2))
4300 (func (result i32) (i32.const 3))
4301 (func (result i32) (i32.const 4))
4302 (func (result i32) (i32.const 5))
4303 (func (result i32) (i32.const 6))
4304 (func (result i32) (i32.const 7))
4305 (func (result i32) (i32.const 8))
4306 (func (result i32) (i32.const 9))
4307 (func (export "test")
4308 (table.copy $$t1 $$t0 (i32.const 15) (i32.const 25) (i32.const 0))
4309 ))`);
4310
4311 // ./test/core/table_copy.wast:2069
4312 invoke($34, `test`, []);
4313
4314 // ./test/core/table_copy.wast:2071
4315 let $35 = instantiate(`(module
4316 (table $$t0 30 30 funcref)
4317 (table $$t1 30 30 funcref)
4318 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4319 (elem funcref
4320 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4321 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4322 (elem funcref
4323 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4324 (func (result i32) (i32.const 0))
4325 (func (result i32) (i32.const 1))
4326 (func (result i32) (i32.const 2))
4327 (func (result i32) (i32.const 3))
4328 (func (result i32) (i32.const 4))
4329 (func (result i32) (i32.const 5))
4330 (func (result i32) (i32.const 6))
4331 (func (result i32) (i32.const 7))
4332 (func (result i32) (i32.const 8))
4333 (func (result i32) (i32.const 9))
4334 (func (export "test")
4335 (table.copy $$t1 $$t0 (i32.const 30) (i32.const 15) (i32.const 0))
4336 ))`);
4337
4338 // ./test/core/table_copy.wast:2094
4339 invoke($35, `test`, []);
4340
4341 // ./test/core/table_copy.wast:2096
4342 let $36 = instantiate(`(module
4343 (table $$t0 30 30 funcref)
4344 (table $$t1 30 30 funcref)
4345 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4346 (elem funcref
4347 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4348 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4349 (elem funcref
4350 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4351 (func (result i32) (i32.const 0))
4352 (func (result i32) (i32.const 1))
4353 (func (result i32) (i32.const 2))
4354 (func (result i32) (i32.const 3))
4355 (func (result i32) (i32.const 4))
4356 (func (result i32) (i32.const 5))
4357 (func (result i32) (i32.const 6))
4358 (func (result i32) (i32.const 7))
4359 (func (result i32) (i32.const 8))
4360 (func (result i32) (i32.const 9))
4361 (func (export "test")
4362 (table.copy $$t1 $$t0 (i32.const 31) (i32.const 15) (i32.const 0))
4363 ))`);
4364
4365 // ./test/core/table_copy.wast:2119
4366 assert_trap(() => invoke($36, `test`, []), `out of bounds table access`);
4367
4368 // ./test/core/table_copy.wast:2121
4369 let $37 = instantiate(`(module
4370 (table $$t0 30 30 funcref)
4371 (table $$t1 30 30 funcref)
4372 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4373 (elem funcref
4374 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4375 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4376 (elem funcref
4377 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4378 (func (result i32) (i32.const 0))
4379 (func (result i32) (i32.const 1))
4380 (func (result i32) (i32.const 2))
4381 (func (result i32) (i32.const 3))
4382 (func (result i32) (i32.const 4))
4383 (func (result i32) (i32.const 5))
4384 (func (result i32) (i32.const 6))
4385 (func (result i32) (i32.const 7))
4386 (func (result i32) (i32.const 8))
4387 (func (result i32) (i32.const 9))
4388 (func (export "test")
4389 (table.copy $$t1 $$t0 (i32.const 15) (i32.const 30) (i32.const 0))
4390 ))`);
4391
4392 // ./test/core/table_copy.wast:2144
4393 invoke($37, `test`, []);
4394
4395 // ./test/core/table_copy.wast:2146
4396 let $38 = instantiate(`(module
4397 (table $$t0 30 30 funcref)
4398 (table $$t1 30 30 funcref)
4399 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4400 (elem funcref
4401 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4402 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4403 (elem funcref
4404 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4405 (func (result i32) (i32.const 0))
4406 (func (result i32) (i32.const 1))
4407 (func (result i32) (i32.const 2))
4408 (func (result i32) (i32.const 3))
4409 (func (result i32) (i32.const 4))
4410 (func (result i32) (i32.const 5))
4411 (func (result i32) (i32.const 6))
4412 (func (result i32) (i32.const 7))
4413 (func (result i32) (i32.const 8))
4414 (func (result i32) (i32.const 9))
4415 (func (export "test")
4416 (table.copy $$t1 $$t0 (i32.const 15) (i32.const 31) (i32.const 0))
4417 ))`);
4418
4419 // ./test/core/table_copy.wast:2169
4420 assert_trap(() => invoke($38, `test`, []), `out of bounds table access`);
4421
4422 // ./test/core/table_copy.wast:2171
4423 let $39 = instantiate(`(module
4424 (table $$t0 30 30 funcref)
4425 (table $$t1 30 30 funcref)
4426 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4427 (elem funcref
4428 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4429 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4430 (elem funcref
4431 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4432 (func (result i32) (i32.const 0))
4433 (func (result i32) (i32.const 1))
4434 (func (result i32) (i32.const 2))
4435 (func (result i32) (i32.const 3))
4436 (func (result i32) (i32.const 4))
4437 (func (result i32) (i32.const 5))
4438 (func (result i32) (i32.const 6))
4439 (func (result i32) (i32.const 7))
4440 (func (result i32) (i32.const 8))
4441 (func (result i32) (i32.const 9))
4442 (func (export "test")
4443 (table.copy $$t1 $$t0 (i32.const 30) (i32.const 30) (i32.const 0))
4444 ))`);
4445
4446 // ./test/core/table_copy.wast:2194
4447 invoke($39, `test`, []);
4448
4449 // ./test/core/table_copy.wast:2196
4450 let $40 = instantiate(`(module
4451 (table $$t0 30 30 funcref)
4452 (table $$t1 30 30 funcref)
4453 (elem (table $$t0) (i32.const 2) func 3 1 4 1)
4454 (elem funcref
4455 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4456 (elem (table $$t0) (i32.const 12) func 7 5 2 3 6)
4457 (elem funcref
4458 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4459 (func (result i32) (i32.const 0))
4460 (func (result i32) (i32.const 1))
4461 (func (result i32) (i32.const 2))
4462 (func (result i32) (i32.const 3))
4463 (func (result i32) (i32.const 4))
4464 (func (result i32) (i32.const 5))
4465 (func (result i32) (i32.const 6))
4466 (func (result i32) (i32.const 7))
4467 (func (result i32) (i32.const 8))
4468 (func (result i32) (i32.const 9))
4469 (func (export "test")
4470 (table.copy $$t1 $$t0 (i32.const 31) (i32.const 31) (i32.const 0))
4471 ))`);
4472
4473 // ./test/core/table_copy.wast:2219
4474 assert_trap(() => invoke($40, `test`, []), `out of bounds table access`);
4475
4476 // ./test/core/table_copy.wast:2221
4477 let $41 = instantiate(`(module
4478 (table $$t0 i64 30 30 funcref)
4479 (table $$t1 i64 30 30 funcref)
4480 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4481 (elem funcref
4482 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4483 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4484 (elem funcref
4485 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4486 (func (result i32) (i32.const 0))
4487 (func (result i32) (i32.const 1))
4488 (func (result i32) (i32.const 2))
4489 (func (result i32) (i32.const 3))
4490 (func (result i32) (i32.const 4))
4491 (func (result i32) (i32.const 5))
4492 (func (result i32) (i32.const 6))
4493 (func (result i32) (i32.const 7))
4494 (func (result i32) (i32.const 8))
4495 (func (result i32) (i32.const 9))
4496 (func (export "test")
4497 (table.copy $$t0 $$t0 (i64.const 28) (i64.const 1) (i64.const 3))
4498 ))`);
4499
4500 // ./test/core/table_copy.wast:2244
4501 assert_trap(() => invoke($41, `test`, []), `out of bounds table access`);
4502
4503 // ./test/core/table_copy.wast:2246
4504 let $42 = instantiate(`(module
4505 (table $$t0 i64 30 30 funcref)
4506 (table $$t1 i64 30 30 funcref)
4507 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4508 (elem funcref
4509 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4510 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4511 (elem funcref
4512 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4513 (func (result i32) (i32.const 0))
4514 (func (result i32) (i32.const 1))
4515 (func (result i32) (i32.const 2))
4516 (func (result i32) (i32.const 3))
4517 (func (result i32) (i32.const 4))
4518 (func (result i32) (i32.const 5))
4519 (func (result i32) (i32.const 6))
4520 (func (result i32) (i32.const 7))
4521 (func (result i32) (i32.const 8))
4522 (func (result i32) (i32.const 9))
4523 (func (export "test")
4524 (table.copy $$t0 $$t0 (i64.const 0xFFFFFFFE) (i64.const 1) (i64.const 2))
4525 ))`);
4526
4527 // ./test/core/table_copy.wast:2269
4528 assert_trap(() => invoke($42, `test`, []), `out of bounds table access`);
4529
4530 // ./test/core/table_copy.wast:2271
4531 let $43 = instantiate(`(module
4532 (table $$t0 i64 30 30 funcref)
4533 (table $$t1 i64 30 30 funcref)
4534 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4535 (elem funcref
4536 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4537 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4538 (elem funcref
4539 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4540 (func (result i32) (i32.const 0))
4541 (func (result i32) (i32.const 1))
4542 (func (result i32) (i32.const 2))
4543 (func (result i32) (i32.const 3))
4544 (func (result i32) (i32.const 4))
4545 (func (result i32) (i32.const 5))
4546 (func (result i32) (i32.const 6))
4547 (func (result i32) (i32.const 7))
4548 (func (result i32) (i32.const 8))
4549 (func (result i32) (i32.const 9))
4550 (func (export "test")
4551 (table.copy $$t0 $$t0 (i64.const 15) (i64.const 25) (i64.const 6))
4552 ))`);
4553
4554 // ./test/core/table_copy.wast:2294
4555 assert_trap(() => invoke($43, `test`, []), `out of bounds table access`);
4556
4557 // ./test/core/table_copy.wast:2296
4558 let $44 = instantiate(`(module
4559 (table $$t0 i64 30 30 funcref)
4560 (table $$t1 i64 30 30 funcref)
4561 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4562 (elem funcref
4563 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4564 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4565 (elem funcref
4566 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4567 (func (result i32) (i32.const 0))
4568 (func (result i32) (i32.const 1))
4569 (func (result i32) (i32.const 2))
4570 (func (result i32) (i32.const 3))
4571 (func (result i32) (i32.const 4))
4572 (func (result i32) (i32.const 5))
4573 (func (result i32) (i32.const 6))
4574 (func (result i32) (i32.const 7))
4575 (func (result i32) (i32.const 8))
4576 (func (result i32) (i32.const 9))
4577 (func (export "test")
4578 (table.copy $$t0 $$t0 (i64.const 15) (i64.const 0xFFFFFFFE) (i64.const 2))
4579 ))`);
4580
4581 // ./test/core/table_copy.wast:2319
4582 assert_trap(() => invoke($44, `test`, []), `out of bounds table access`);
4583
4584 // ./test/core/table_copy.wast:2321
4585 let $45 = instantiate(`(module
4586 (table $$t0 i64 30 30 funcref)
4587 (table $$t1 i64 30 30 funcref)
4588 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4589 (elem funcref
4590 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4591 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4592 (elem funcref
4593 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4594 (func (result i32) (i32.const 0))
4595 (func (result i32) (i32.const 1))
4596 (func (result i32) (i32.const 2))
4597 (func (result i32) (i32.const 3))
4598 (func (result i32) (i32.const 4))
4599 (func (result i32) (i32.const 5))
4600 (func (result i32) (i32.const 6))
4601 (func (result i32) (i32.const 7))
4602 (func (result i32) (i32.const 8))
4603 (func (result i32) (i32.const 9))
4604 (func (export "test")
4605 (table.copy $$t0 $$t0 (i64.const 15) (i64.const 25) (i64.const 0))
4606 ))`);
4607
4608 // ./test/core/table_copy.wast:2344
4609 invoke($45, `test`, []);
4610
4611 // ./test/core/table_copy.wast:2346
4612 let $46 = instantiate(`(module
4613 (table $$t0 i64 30 30 funcref)
4614 (table $$t1 i64 30 30 funcref)
4615 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4616 (elem funcref
4617 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4618 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4619 (elem funcref
4620 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4621 (func (result i32) (i32.const 0))
4622 (func (result i32) (i32.const 1))
4623 (func (result i32) (i32.const 2))
4624 (func (result i32) (i32.const 3))
4625 (func (result i32) (i32.const 4))
4626 (func (result i32) (i32.const 5))
4627 (func (result i32) (i32.const 6))
4628 (func (result i32) (i32.const 7))
4629 (func (result i32) (i32.const 8))
4630 (func (result i32) (i32.const 9))
4631 (func (export "test")
4632 (table.copy $$t0 $$t0 (i64.const 30) (i64.const 15) (i64.const 0))
4633 ))`);
4634
4635 // ./test/core/table_copy.wast:2369
4636 invoke($46, `test`, []);
4637
4638 // ./test/core/table_copy.wast:2371
4639 let $47 = instantiate(`(module
4640 (table $$t0 i64 30 30 funcref)
4641 (table $$t1 i64 30 30 funcref)
4642 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4643 (elem funcref
4644 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4645 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4646 (elem funcref
4647 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4648 (func (result i32) (i32.const 0))
4649 (func (result i32) (i32.const 1))
4650 (func (result i32) (i32.const 2))
4651 (func (result i32) (i32.const 3))
4652 (func (result i32) (i32.const 4))
4653 (func (result i32) (i32.const 5))
4654 (func (result i32) (i32.const 6))
4655 (func (result i32) (i32.const 7))
4656 (func (result i32) (i32.const 8))
4657 (func (result i32) (i32.const 9))
4658 (func (export "test")
4659 (table.copy $$t0 $$t0 (i64.const 31) (i64.const 15) (i64.const 0))
4660 ))`);
4661
4662 // ./test/core/table_copy.wast:2394
4663 assert_trap(() => invoke($47, `test`, []), `out of bounds table access`);
4664
4665 // ./test/core/table_copy.wast:2396
4666 let $48 = instantiate(`(module
4667 (table $$t0 i64 30 30 funcref)
4668 (table $$t1 i64 30 30 funcref)
4669 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4670 (elem funcref
4671 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4672 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4673 (elem funcref
4674 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4675 (func (result i32) (i32.const 0))
4676 (func (result i32) (i32.const 1))
4677 (func (result i32) (i32.const 2))
4678 (func (result i32) (i32.const 3))
4679 (func (result i32) (i32.const 4))
4680 (func (result i32) (i32.const 5))
4681 (func (result i32) (i32.const 6))
4682 (func (result i32) (i32.const 7))
4683 (func (result i32) (i32.const 8))
4684 (func (result i32) (i32.const 9))
4685 (func (export "test")
4686 (table.copy $$t0 $$t0 (i64.const 15) (i64.const 30) (i64.const 0))
4687 ))`);
4688
4689 // ./test/core/table_copy.wast:2419
4690 invoke($48, `test`, []);
4691
4692 // ./test/core/table_copy.wast:2421
4693 let $49 = instantiate(`(module
4694 (table $$t0 i64 30 30 funcref)
4695 (table $$t1 i64 30 30 funcref)
4696 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4697 (elem funcref
4698 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4699 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4700 (elem funcref
4701 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4702 (func (result i32) (i32.const 0))
4703 (func (result i32) (i32.const 1))
4704 (func (result i32) (i32.const 2))
4705 (func (result i32) (i32.const 3))
4706 (func (result i32) (i32.const 4))
4707 (func (result i32) (i32.const 5))
4708 (func (result i32) (i32.const 6))
4709 (func (result i32) (i32.const 7))
4710 (func (result i32) (i32.const 8))
4711 (func (result i32) (i32.const 9))
4712 (func (export "test")
4713 (table.copy $$t0 $$t0 (i64.const 15) (i64.const 31) (i64.const 0))
4714 ))`);
4715
4716 // ./test/core/table_copy.wast:2444
4717 assert_trap(() => invoke($49, `test`, []), `out of bounds table access`);
4718
4719 // ./test/core/table_copy.wast:2446
4720 let $50 = instantiate(`(module
4721 (table $$t0 i64 30 30 funcref)
4722 (table $$t1 i64 30 30 funcref)
4723 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4724 (elem funcref
4725 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4726 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4727 (elem funcref
4728 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4729 (func (result i32) (i32.const 0))
4730 (func (result i32) (i32.const 1))
4731 (func (result i32) (i32.const 2))
4732 (func (result i32) (i32.const 3))
4733 (func (result i32) (i32.const 4))
4734 (func (result i32) (i32.const 5))
4735 (func (result i32) (i32.const 6))
4736 (func (result i32) (i32.const 7))
4737 (func (result i32) (i32.const 8))
4738 (func (result i32) (i32.const 9))
4739 (func (export "test")
4740 (table.copy $$t0 $$t0 (i64.const 30) (i64.const 30) (i64.const 0))
4741 ))`);
4742
4743 // ./test/core/table_copy.wast:2469
4744 invoke($50, `test`, []);
4745
4746 // ./test/core/table_copy.wast:2471
4747 let $51 = instantiate(`(module
4748 (table $$t0 i64 30 30 funcref)
4749 (table $$t1 i64 30 30 funcref)
4750 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4751 (elem funcref
4752 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4753 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4754 (elem funcref
4755 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4756 (func (result i32) (i32.const 0))
4757 (func (result i32) (i32.const 1))
4758 (func (result i32) (i32.const 2))
4759 (func (result i32) (i32.const 3))
4760 (func (result i32) (i32.const 4))
4761 (func (result i32) (i32.const 5))
4762 (func (result i32) (i32.const 6))
4763 (func (result i32) (i32.const 7))
4764 (func (result i32) (i32.const 8))
4765 (func (result i32) (i32.const 9))
4766 (func (export "test")
4767 (table.copy $$t0 $$t0 (i64.const 31) (i64.const 31) (i64.const 0))
4768 ))`);
4769
4770 // ./test/core/table_copy.wast:2494
4771 assert_trap(() => invoke($51, `test`, []), `out of bounds table access`);
4772
4773 // ./test/core/table_copy.wast:2496
4774 let $52 = instantiate(`(module
4775 (table $$t0 i64 30 30 funcref)
4776 (table $$t1 i64 30 30 funcref)
4777 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4778 (elem funcref
4779 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4780 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4781 (elem funcref
4782 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4783 (func (result i32) (i32.const 0))
4784 (func (result i32) (i32.const 1))
4785 (func (result i32) (i32.const 2))
4786 (func (result i32) (i32.const 3))
4787 (func (result i32) (i32.const 4))
4788 (func (result i32) (i32.const 5))
4789 (func (result i32) (i32.const 6))
4790 (func (result i32) (i32.const 7))
4791 (func (result i32) (i32.const 8))
4792 (func (result i32) (i32.const 9))
4793 (func (export "test")
4794 (table.copy $$t1 $$t0 (i64.const 28) (i64.const 1) (i64.const 3))
4795 ))`);
4796
4797 // ./test/core/table_copy.wast:2519
4798 assert_trap(() => invoke($52, `test`, []), `out of bounds table access`);
4799
4800 // ./test/core/table_copy.wast:2521
4801 let $53 = instantiate(`(module
4802 (table $$t0 i64 30 30 funcref)
4803 (table $$t1 i64 30 30 funcref)
4804 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4805 (elem funcref
4806 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4807 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4808 (elem funcref
4809 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4810 (func (result i32) (i32.const 0))
4811 (func (result i32) (i32.const 1))
4812 (func (result i32) (i32.const 2))
4813 (func (result i32) (i32.const 3))
4814 (func (result i32) (i32.const 4))
4815 (func (result i32) (i32.const 5))
4816 (func (result i32) (i32.const 6))
4817 (func (result i32) (i32.const 7))
4818 (func (result i32) (i32.const 8))
4819 (func (result i32) (i32.const 9))
4820 (func (export "test")
4821 (table.copy $$t1 $$t0 (i64.const 0xFFFFFFFE) (i64.const 1) (i64.const 2))
4822 ))`);
4823
4824 // ./test/core/table_copy.wast:2544
4825 assert_trap(() => invoke($53, `test`, []), `out of bounds table access`);
4826
4827 // ./test/core/table_copy.wast:2546
4828 let $54 = instantiate(`(module
4829 (table $$t0 i64 30 30 funcref)
4830 (table $$t1 i64 30 30 funcref)
4831 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4832 (elem funcref
4833 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4834 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4835 (elem funcref
4836 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4837 (func (result i32) (i32.const 0))
4838 (func (result i32) (i32.const 1))
4839 (func (result i32) (i32.const 2))
4840 (func (result i32) (i32.const 3))
4841 (func (result i32) (i32.const 4))
4842 (func (result i32) (i32.const 5))
4843 (func (result i32) (i32.const 6))
4844 (func (result i32) (i32.const 7))
4845 (func (result i32) (i32.const 8))
4846 (func (result i32) (i32.const 9))
4847 (func (export "test")
4848 (table.copy $$t1 $$t0 (i64.const 15) (i64.const 25) (i64.const 6))
4849 ))`);
4850
4851 // ./test/core/table_copy.wast:2569
4852 assert_trap(() => invoke($54, `test`, []), `out of bounds table access`);
4853
4854 // ./test/core/table_copy.wast:2571
4855 let $55 = instantiate(`(module
4856 (table $$t0 i64 30 30 funcref)
4857 (table $$t1 i64 30 30 funcref)
4858 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4859 (elem funcref
4860 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4861 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4862 (elem funcref
4863 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4864 (func (result i32) (i32.const 0))
4865 (func (result i32) (i32.const 1))
4866 (func (result i32) (i32.const 2))
4867 (func (result i32) (i32.const 3))
4868 (func (result i32) (i32.const 4))
4869 (func (result i32) (i32.const 5))
4870 (func (result i32) (i32.const 6))
4871 (func (result i32) (i32.const 7))
4872 (func (result i32) (i32.const 8))
4873 (func (result i32) (i32.const 9))
4874 (func (export "test")
4875 (table.copy $$t1 $$t0 (i64.const 15) (i64.const 0xFFFFFFFE) (i64.const 2))
4876 ))`);
4877
4878 // ./test/core/table_copy.wast:2594
4879 assert_trap(() => invoke($55, `test`, []), `out of bounds table access`);
4880
4881 // ./test/core/table_copy.wast:2596
4882 let $56 = instantiate(`(module
4883 (table $$t0 i64 30 30 funcref)
4884 (table $$t1 i64 30 30 funcref)
4885 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4886 (elem funcref
4887 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4888 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4889 (elem funcref
4890 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4891 (func (result i32) (i32.const 0))
4892 (func (result i32) (i32.const 1))
4893 (func (result i32) (i32.const 2))
4894 (func (result i32) (i32.const 3))
4895 (func (result i32) (i32.const 4))
4896 (func (result i32) (i32.const 5))
4897 (func (result i32) (i32.const 6))
4898 (func (result i32) (i32.const 7))
4899 (func (result i32) (i32.const 8))
4900 (func (result i32) (i32.const 9))
4901 (func (export "test")
4902 (table.copy $$t1 $$t0 (i64.const 15) (i64.const 25) (i64.const 0))
4903 ))`);
4904
4905 // ./test/core/table_copy.wast:2619
4906 invoke($56, `test`, []);
4907
4908 // ./test/core/table_copy.wast:2621
4909 let $57 = instantiate(`(module
4910 (table $$t0 i64 30 30 funcref)
4911 (table $$t1 i64 30 30 funcref)
4912 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4913 (elem funcref
4914 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4915 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4916 (elem funcref
4917 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4918 (func (result i32) (i32.const 0))
4919 (func (result i32) (i32.const 1))
4920 (func (result i32) (i32.const 2))
4921 (func (result i32) (i32.const 3))
4922 (func (result i32) (i32.const 4))
4923 (func (result i32) (i32.const 5))
4924 (func (result i32) (i32.const 6))
4925 (func (result i32) (i32.const 7))
4926 (func (result i32) (i32.const 8))
4927 (func (result i32) (i32.const 9))
4928 (func (export "test")
4929 (table.copy $$t1 $$t0 (i64.const 30) (i64.const 15) (i64.const 0))
4930 ))`);
4931
4932 // ./test/core/table_copy.wast:2644
4933 invoke($57, `test`, []);
4934
4935 // ./test/core/table_copy.wast:2646
4936 let $58 = instantiate(`(module
4937 (table $$t0 i64 30 30 funcref)
4938 (table $$t1 i64 30 30 funcref)
4939 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4940 (elem funcref
4941 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4942 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4943 (elem funcref
4944 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4945 (func (result i32) (i32.const 0))
4946 (func (result i32) (i32.const 1))
4947 (func (result i32) (i32.const 2))
4948 (func (result i32) (i32.const 3))
4949 (func (result i32) (i32.const 4))
4950 (func (result i32) (i32.const 5))
4951 (func (result i32) (i32.const 6))
4952 (func (result i32) (i32.const 7))
4953 (func (result i32) (i32.const 8))
4954 (func (result i32) (i32.const 9))
4955 (func (export "test")
4956 (table.copy $$t1 $$t0 (i64.const 31) (i64.const 15) (i64.const 0))
4957 ))`);
4958
4959 // ./test/core/table_copy.wast:2669
4960 assert_trap(() => invoke($58, `test`, []), `out of bounds table access`);
4961
4962 // ./test/core/table_copy.wast:2671
4963 let $59 = instantiate(`(module
4964 (table $$t0 i64 30 30 funcref)
4965 (table $$t1 i64 30 30 funcref)
4966 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4967 (elem funcref
4968 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4969 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4970 (elem funcref
4971 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4972 (func (result i32) (i32.const 0))
4973 (func (result i32) (i32.const 1))
4974 (func (result i32) (i32.const 2))
4975 (func (result i32) (i32.const 3))
4976 (func (result i32) (i32.const 4))
4977 (func (result i32) (i32.const 5))
4978 (func (result i32) (i32.const 6))
4979 (func (result i32) (i32.const 7))
4980 (func (result i32) (i32.const 8))
4981 (func (result i32) (i32.const 9))
4982 (func (export "test")
4983 (table.copy $$t1 $$t0 (i64.const 15) (i64.const 30) (i64.const 0))
4984 ))`);
4985
4986 // ./test/core/table_copy.wast:2694
4987 invoke($59, `test`, []);
4988
4989 // ./test/core/table_copy.wast:2696
4990 let $60 = instantiate(`(module
4991 (table $$t0 i64 30 30 funcref)
4992 (table $$t1 i64 30 30 funcref)
4993 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
4994 (elem funcref
4995 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
4996 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
4997 (elem funcref
4998 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
4999 (func (result i32) (i32.const 0))
5000 (func (result i32) (i32.const 1))
5001 (func (result i32) (i32.const 2))
5002 (func (result i32) (i32.const 3))
5003 (func (result i32) (i32.const 4))
5004 (func (result i32) (i32.const 5))
5005 (func (result i32) (i32.const 6))
5006 (func (result i32) (i32.const 7))
5007 (func (result i32) (i32.const 8))
5008 (func (result i32) (i32.const 9))
5009 (func (export "test")
5010 (table.copy $$t1 $$t0 (i64.const 15) (i64.const 31) (i64.const 0))
5011 ))`);
5012
5013 // ./test/core/table_copy.wast:2719
5014 assert_trap(() => invoke($60, `test`, []), `out of bounds table access`);
5015
5016 // ./test/core/table_copy.wast:2721
5017 let $61 = instantiate(`(module
5018 (table $$t0 i64 30 30 funcref)
5019 (table $$t1 i64 30 30 funcref)
5020 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
5021 (elem funcref
5022 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
5023 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
5024 (elem funcref
5025 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
5026 (func (result i32) (i32.const 0))
5027 (func (result i32) (i32.const 1))
5028 (func (result i32) (i32.const 2))
5029 (func (result i32) (i32.const 3))
5030 (func (result i32) (i32.const 4))
5031 (func (result i32) (i32.const 5))
5032 (func (result i32) (i32.const 6))
5033 (func (result i32) (i32.const 7))
5034 (func (result i32) (i32.const 8))
5035 (func (result i32) (i32.const 9))
5036 (func (export "test")
5037 (table.copy $$t1 $$t0 (i64.const 30) (i64.const 30) (i64.const 0))
5038 ))`);
5039
5040 // ./test/core/table_copy.wast:2744
5041 invoke($61, `test`, []);
5042
5043 // ./test/core/table_copy.wast:2746
5044 let $62 = instantiate(`(module
5045 (table $$t0 i64 30 30 funcref)
5046 (table $$t1 i64 30 30 funcref)
5047 (elem (table $$t0) (i64.const 2) func 3 1 4 1)
5048 (elem funcref
5049 (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))
5050 (elem (table $$t0) (i64.const 12) func 7 5 2 3 6)
5051 (elem funcref
5052 (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))
5053 (func (result i32) (i32.const 0))
5054 (func (result i32) (i32.const 1))
5055 (func (result i32) (i32.const 2))
5056 (func (result i32) (i32.const 3))
5057 (func (result i32) (i32.const 4))
5058 (func (result i32) (i32.const 5))
5059 (func (result i32) (i32.const 6))
5060 (func (result i32) (i32.const 7))
5061 (func (result i32) (i32.const 8))
5062 (func (result i32) (i32.const 9))
5063 (func (export "test")
5064 (table.copy $$t1 $$t0 (i64.const 31) (i64.const 31) (i64.const 0))
5065 ))`);
5066
5067 // ./test/core/table_copy.wast:2769
5068 assert_trap(() => invoke($62, `test`, []), `out of bounds table access`);
5069
5070 // ./test/core/table_copy.wast:2771
5071 let $63 = instantiate(`(module
5072 (type (func (result i32)))
5073 (table 32 64 funcref)
5074 (elem (i32.const 0)
5075 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7)
5076 (func $$f0 (export "f0") (result i32) (i32.const 0))
5077 (func $$f1 (export "f1") (result i32) (i32.const 1))
5078 (func $$f2 (export "f2") (result i32) (i32.const 2))
5079 (func $$f3 (export "f3") (result i32) (i32.const 3))
5080 (func $$f4 (export "f4") (result i32) (i32.const 4))
5081 (func $$f5 (export "f5") (result i32) (i32.const 5))
5082 (func $$f6 (export "f6") (result i32) (i32.const 6))
5083 (func $$f7 (export "f7") (result i32) (i32.const 7))
5084 (func $$f8 (export "f8") (result i32) (i32.const 8))
5085 (func $$f9 (export "f9") (result i32) (i32.const 9))
5086 (func $$f10 (export "f10") (result i32) (i32.const 10))
5087 (func $$f11 (export "f11") (result i32) (i32.const 11))
5088 (func $$f12 (export "f12") (result i32) (i32.const 12))
5089 (func $$f13 (export "f13") (result i32) (i32.const 13))
5090 (func $$f14 (export "f14") (result i32) (i32.const 14))
5091 (func $$f15 (export "f15") (result i32) (i32.const 15))
5092 (func (export "test") (param $$n i32) (result i32)
5093 (call_indirect (type 0) (local.get $$n)))
5094 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5095 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5096
5097 // ./test/core/table_copy.wast:2797
5098 assert_trap(() => invoke($63, `run`, [24, 0, 16]), `out of bounds table access`);
5099
5100 // ./test/core/table_copy.wast:2799
5101 assert_return(() => invoke($63, `test`, [0]), [value("i32", 0)]);
5102
5103 // ./test/core/table_copy.wast:2800
5104 assert_return(() => invoke($63, `test`, [1]), [value("i32", 1)]);
5105
5106 // ./test/core/table_copy.wast:2801
5107 assert_return(() => invoke($63, `test`, [2]), [value("i32", 2)]);
5108
5109 // ./test/core/table_copy.wast:2802
5110 assert_return(() => invoke($63, `test`, [3]), [value("i32", 3)]);
5111
5112 // ./test/core/table_copy.wast:2803
5113 assert_return(() => invoke($63, `test`, [4]), [value("i32", 4)]);
5114
5115 // ./test/core/table_copy.wast:2804
5116 assert_return(() => invoke($63, `test`, [5]), [value("i32", 5)]);
5117
5118 // ./test/core/table_copy.wast:2805
5119 assert_return(() => invoke($63, `test`, [6]), [value("i32", 6)]);
5120
5121 // ./test/core/table_copy.wast:2806
5122 assert_return(() => invoke($63, `test`, [7]), [value("i32", 7)]);
5123
5124 // ./test/core/table_copy.wast:2807
5125 assert_trap(() => invoke($63, `test`, [8]), `uninitialized element`);
5126
5127 // ./test/core/table_copy.wast:2808
5128 assert_trap(() => invoke($63, `test`, [9]), `uninitialized element`);
5129
5130 // ./test/core/table_copy.wast:2809
5131 assert_trap(() => invoke($63, `test`, [10]), `uninitialized element`);
5132
5133 // ./test/core/table_copy.wast:2810
5134 assert_trap(() => invoke($63, `test`, [11]), `uninitialized element`);
5135
5136 // ./test/core/table_copy.wast:2811
5137 assert_trap(() => invoke($63, `test`, [12]), `uninitialized element`);
5138
5139 // ./test/core/table_copy.wast:2812
5140 assert_trap(() => invoke($63, `test`, [13]), `uninitialized element`);
5141
5142 // ./test/core/table_copy.wast:2813
5143 assert_trap(() => invoke($63, `test`, [14]), `uninitialized element`);
5144
5145 // ./test/core/table_copy.wast:2814
5146 assert_trap(() => invoke($63, `test`, [15]), `uninitialized element`);
5147
5148 // ./test/core/table_copy.wast:2815
5149 assert_trap(() => invoke($63, `test`, [16]), `uninitialized element`);
5150
5151 // ./test/core/table_copy.wast:2816
5152 assert_trap(() => invoke($63, `test`, [17]), `uninitialized element`);
5153
5154 // ./test/core/table_copy.wast:2817
5155 assert_trap(() => invoke($63, `test`, [18]), `uninitialized element`);
5156
5157 // ./test/core/table_copy.wast:2818
5158 assert_trap(() => invoke($63, `test`, [19]), `uninitialized element`);
5159
5160 // ./test/core/table_copy.wast:2819
5161 assert_trap(() => invoke($63, `test`, [20]), `uninitialized element`);
5162
5163 // ./test/core/table_copy.wast:2820
5164 assert_trap(() => invoke($63, `test`, [21]), `uninitialized element`);
5165
5166 // ./test/core/table_copy.wast:2821
5167 assert_trap(() => invoke($63, `test`, [22]), `uninitialized element`);
5168
5169 // ./test/core/table_copy.wast:2822
5170 assert_trap(() => invoke($63, `test`, [23]), `uninitialized element`);
5171
5172 // ./test/core/table_copy.wast:2823
5173 assert_trap(() => invoke($63, `test`, [24]), `uninitialized element`);
5174
5175 // ./test/core/table_copy.wast:2824
5176 assert_trap(() => invoke($63, `test`, [25]), `uninitialized element`);
5177
5178 // ./test/core/table_copy.wast:2825
5179 assert_trap(() => invoke($63, `test`, [26]), `uninitialized element`);
5180
5181 // ./test/core/table_copy.wast:2826
5182 assert_trap(() => invoke($63, `test`, [27]), `uninitialized element`);
5183
5184 // ./test/core/table_copy.wast:2827
5185 assert_trap(() => invoke($63, `test`, [28]), `uninitialized element`);
5186
5187 // ./test/core/table_copy.wast:2828
5188 assert_trap(() => invoke($63, `test`, [29]), `uninitialized element`);
5189
5190 // ./test/core/table_copy.wast:2829
5191 assert_trap(() => invoke($63, `test`, [30]), `uninitialized element`);
5192
5193 // ./test/core/table_copy.wast:2830
5194 assert_trap(() => invoke($63, `test`, [31]), `uninitialized element`);
5195
5196 // ./test/core/table_copy.wast:2832
5197 let $64 = instantiate(`(module
5198 (type (func (result i32)))
5199 (table 32 64 funcref)
5200 (elem (i32.const 0)
5201 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8)
5202 (func $$f0 (export "f0") (result i32) (i32.const 0))
5203 (func $$f1 (export "f1") (result i32) (i32.const 1))
5204 (func $$f2 (export "f2") (result i32) (i32.const 2))
5205 (func $$f3 (export "f3") (result i32) (i32.const 3))
5206 (func $$f4 (export "f4") (result i32) (i32.const 4))
5207 (func $$f5 (export "f5") (result i32) (i32.const 5))
5208 (func $$f6 (export "f6") (result i32) (i32.const 6))
5209 (func $$f7 (export "f7") (result i32) (i32.const 7))
5210 (func $$f8 (export "f8") (result i32) (i32.const 8))
5211 (func $$f9 (export "f9") (result i32) (i32.const 9))
5212 (func $$f10 (export "f10") (result i32) (i32.const 10))
5213 (func $$f11 (export "f11") (result i32) (i32.const 11))
5214 (func $$f12 (export "f12") (result i32) (i32.const 12))
5215 (func $$f13 (export "f13") (result i32) (i32.const 13))
5216 (func $$f14 (export "f14") (result i32) (i32.const 14))
5217 (func $$f15 (export "f15") (result i32) (i32.const 15))
5218 (func (export "test") (param $$n i32) (result i32)
5219 (call_indirect (type 0) (local.get $$n)))
5220 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5221 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5222
5223 // ./test/core/table_copy.wast:2858
5224 assert_trap(() => invoke($64, `run`, [23, 0, 15]), `out of bounds table access`);
5225
5226 // ./test/core/table_copy.wast:2860
5227 assert_return(() => invoke($64, `test`, [0]), [value("i32", 0)]);
5228
5229 // ./test/core/table_copy.wast:2861
5230 assert_return(() => invoke($64, `test`, [1]), [value("i32", 1)]);
5231
5232 // ./test/core/table_copy.wast:2862
5233 assert_return(() => invoke($64, `test`, [2]), [value("i32", 2)]);
5234
5235 // ./test/core/table_copy.wast:2863
5236 assert_return(() => invoke($64, `test`, [3]), [value("i32", 3)]);
5237
5238 // ./test/core/table_copy.wast:2864
5239 assert_return(() => invoke($64, `test`, [4]), [value("i32", 4)]);
5240
5241 // ./test/core/table_copy.wast:2865
5242 assert_return(() => invoke($64, `test`, [5]), [value("i32", 5)]);
5243
5244 // ./test/core/table_copy.wast:2866
5245 assert_return(() => invoke($64, `test`, [6]), [value("i32", 6)]);
5246
5247 // ./test/core/table_copy.wast:2867
5248 assert_return(() => invoke($64, `test`, [7]), [value("i32", 7)]);
5249
5250 // ./test/core/table_copy.wast:2868
5251 assert_return(() => invoke($64, `test`, [8]), [value("i32", 8)]);
5252
5253 // ./test/core/table_copy.wast:2869
5254 assert_trap(() => invoke($64, `test`, [9]), `uninitialized element`);
5255
5256 // ./test/core/table_copy.wast:2870
5257 assert_trap(() => invoke($64, `test`, [10]), `uninitialized element`);
5258
5259 // ./test/core/table_copy.wast:2871
5260 assert_trap(() => invoke($64, `test`, [11]), `uninitialized element`);
5261
5262 // ./test/core/table_copy.wast:2872
5263 assert_trap(() => invoke($64, `test`, [12]), `uninitialized element`);
5264
5265 // ./test/core/table_copy.wast:2873
5266 assert_trap(() => invoke($64, `test`, [13]), `uninitialized element`);
5267
5268 // ./test/core/table_copy.wast:2874
5269 assert_trap(() => invoke($64, `test`, [14]), `uninitialized element`);
5270
5271 // ./test/core/table_copy.wast:2875
5272 assert_trap(() => invoke($64, `test`, [15]), `uninitialized element`);
5273
5274 // ./test/core/table_copy.wast:2876
5275 assert_trap(() => invoke($64, `test`, [16]), `uninitialized element`);
5276
5277 // ./test/core/table_copy.wast:2877
5278 assert_trap(() => invoke($64, `test`, [17]), `uninitialized element`);
5279
5280 // ./test/core/table_copy.wast:2878
5281 assert_trap(() => invoke($64, `test`, [18]), `uninitialized element`);
5282
5283 // ./test/core/table_copy.wast:2879
5284 assert_trap(() => invoke($64, `test`, [19]), `uninitialized element`);
5285
5286 // ./test/core/table_copy.wast:2880
5287 assert_trap(() => invoke($64, `test`, [20]), `uninitialized element`);
5288
5289 // ./test/core/table_copy.wast:2881
5290 assert_trap(() => invoke($64, `test`, [21]), `uninitialized element`);
5291
5292 // ./test/core/table_copy.wast:2882
5293 assert_trap(() => invoke($64, `test`, [22]), `uninitialized element`);
5294
5295 // ./test/core/table_copy.wast:2883
5296 assert_trap(() => invoke($64, `test`, [23]), `uninitialized element`);
5297
5298 // ./test/core/table_copy.wast:2884
5299 assert_trap(() => invoke($64, `test`, [24]), `uninitialized element`);
5300
5301 // ./test/core/table_copy.wast:2885
5302 assert_trap(() => invoke($64, `test`, [25]), `uninitialized element`);
5303
5304 // ./test/core/table_copy.wast:2886
5305 assert_trap(() => invoke($64, `test`, [26]), `uninitialized element`);
5306
5307 // ./test/core/table_copy.wast:2887
5308 assert_trap(() => invoke($64, `test`, [27]), `uninitialized element`);
5309
5310 // ./test/core/table_copy.wast:2888
5311 assert_trap(() => invoke($64, `test`, [28]), `uninitialized element`);
5312
5313 // ./test/core/table_copy.wast:2889
5314 assert_trap(() => invoke($64, `test`, [29]), `uninitialized element`);
5315
5316 // ./test/core/table_copy.wast:2890
5317 assert_trap(() => invoke($64, `test`, [30]), `uninitialized element`);
5318
5319 // ./test/core/table_copy.wast:2891
5320 assert_trap(() => invoke($64, `test`, [31]), `uninitialized element`);
5321
5322 // ./test/core/table_copy.wast:2893
5323 let $65 = instantiate(`(module
5324 (type (func (result i32)))
5325 (table 32 64 funcref)
5326 (elem (i32.const 24)
5327 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7)
5328 (func $$f0 (export "f0") (result i32) (i32.const 0))
5329 (func $$f1 (export "f1") (result i32) (i32.const 1))
5330 (func $$f2 (export "f2") (result i32) (i32.const 2))
5331 (func $$f3 (export "f3") (result i32) (i32.const 3))
5332 (func $$f4 (export "f4") (result i32) (i32.const 4))
5333 (func $$f5 (export "f5") (result i32) (i32.const 5))
5334 (func $$f6 (export "f6") (result i32) (i32.const 6))
5335 (func $$f7 (export "f7") (result i32) (i32.const 7))
5336 (func $$f8 (export "f8") (result i32) (i32.const 8))
5337 (func $$f9 (export "f9") (result i32) (i32.const 9))
5338 (func $$f10 (export "f10") (result i32) (i32.const 10))
5339 (func $$f11 (export "f11") (result i32) (i32.const 11))
5340 (func $$f12 (export "f12") (result i32) (i32.const 12))
5341 (func $$f13 (export "f13") (result i32) (i32.const 13))
5342 (func $$f14 (export "f14") (result i32) (i32.const 14))
5343 (func $$f15 (export "f15") (result i32) (i32.const 15))
5344 (func (export "test") (param $$n i32) (result i32)
5345 (call_indirect (type 0) (local.get $$n)))
5346 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5347 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5348
5349 // ./test/core/table_copy.wast:2919
5350 assert_trap(() => invoke($65, `run`, [0, 24, 16]), `out of bounds table access`);
5351
5352 // ./test/core/table_copy.wast:2921
5353 assert_trap(() => invoke($65, `test`, [0]), `uninitialized element`);
5354
5355 // ./test/core/table_copy.wast:2922
5356 assert_trap(() => invoke($65, `test`, [1]), `uninitialized element`);
5357
5358 // ./test/core/table_copy.wast:2923
5359 assert_trap(() => invoke($65, `test`, [2]), `uninitialized element`);
5360
5361 // ./test/core/table_copy.wast:2924
5362 assert_trap(() => invoke($65, `test`, [3]), `uninitialized element`);
5363
5364 // ./test/core/table_copy.wast:2925
5365 assert_trap(() => invoke($65, `test`, [4]), `uninitialized element`);
5366
5367 // ./test/core/table_copy.wast:2926
5368 assert_trap(() => invoke($65, `test`, [5]), `uninitialized element`);
5369
5370 // ./test/core/table_copy.wast:2927
5371 assert_trap(() => invoke($65, `test`, [6]), `uninitialized element`);
5372
5373 // ./test/core/table_copy.wast:2928
5374 assert_trap(() => invoke($65, `test`, [7]), `uninitialized element`);
5375
5376 // ./test/core/table_copy.wast:2929
5377 assert_trap(() => invoke($65, `test`, [8]), `uninitialized element`);
5378
5379 // ./test/core/table_copy.wast:2930
5380 assert_trap(() => invoke($65, `test`, [9]), `uninitialized element`);
5381
5382 // ./test/core/table_copy.wast:2931
5383 assert_trap(() => invoke($65, `test`, [10]), `uninitialized element`);
5384
5385 // ./test/core/table_copy.wast:2932
5386 assert_trap(() => invoke($65, `test`, [11]), `uninitialized element`);
5387
5388 // ./test/core/table_copy.wast:2933
5389 assert_trap(() => invoke($65, `test`, [12]), `uninitialized element`);
5390
5391 // ./test/core/table_copy.wast:2934
5392 assert_trap(() => invoke($65, `test`, [13]), `uninitialized element`);
5393
5394 // ./test/core/table_copy.wast:2935
5395 assert_trap(() => invoke($65, `test`, [14]), `uninitialized element`);
5396
5397 // ./test/core/table_copy.wast:2936
5398 assert_trap(() => invoke($65, `test`, [15]), `uninitialized element`);
5399
5400 // ./test/core/table_copy.wast:2937
5401 assert_trap(() => invoke($65, `test`, [16]), `uninitialized element`);
5402
5403 // ./test/core/table_copy.wast:2938
5404 assert_trap(() => invoke($65, `test`, [17]), `uninitialized element`);
5405
5406 // ./test/core/table_copy.wast:2939
5407 assert_trap(() => invoke($65, `test`, [18]), `uninitialized element`);
5408
5409 // ./test/core/table_copy.wast:2940
5410 assert_trap(() => invoke($65, `test`, [19]), `uninitialized element`);
5411
5412 // ./test/core/table_copy.wast:2941
5413 assert_trap(() => invoke($65, `test`, [20]), `uninitialized element`);
5414
5415 // ./test/core/table_copy.wast:2942
5416 assert_trap(() => invoke($65, `test`, [21]), `uninitialized element`);
5417
5418 // ./test/core/table_copy.wast:2943
5419 assert_trap(() => invoke($65, `test`, [22]), `uninitialized element`);
5420
5421 // ./test/core/table_copy.wast:2944
5422 assert_trap(() => invoke($65, `test`, [23]), `uninitialized element`);
5423
5424 // ./test/core/table_copy.wast:2945
5425 assert_return(() => invoke($65, `test`, [24]), [value("i32", 0)]);
5426
5427 // ./test/core/table_copy.wast:2946
5428 assert_return(() => invoke($65, `test`, [25]), [value("i32", 1)]);
5429
5430 // ./test/core/table_copy.wast:2947
5431 assert_return(() => invoke($65, `test`, [26]), [value("i32", 2)]);
5432
5433 // ./test/core/table_copy.wast:2948
5434 assert_return(() => invoke($65, `test`, [27]), [value("i32", 3)]);
5435
5436 // ./test/core/table_copy.wast:2949
5437 assert_return(() => invoke($65, `test`, [28]), [value("i32", 4)]);
5438
5439 // ./test/core/table_copy.wast:2950
5440 assert_return(() => invoke($65, `test`, [29]), [value("i32", 5)]);
5441
5442 // ./test/core/table_copy.wast:2951
5443 assert_return(() => invoke($65, `test`, [30]), [value("i32", 6)]);
5444
5445 // ./test/core/table_copy.wast:2952
5446 assert_return(() => invoke($65, `test`, [31]), [value("i32", 7)]);
5447
5448 // ./test/core/table_copy.wast:2954
5449 let $66 = instantiate(`(module
5450 (type (func (result i32)))
5451 (table 32 64 funcref)
5452 (elem (i32.const 23)
5453 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8)
5454 (func $$f0 (export "f0") (result i32) (i32.const 0))
5455 (func $$f1 (export "f1") (result i32) (i32.const 1))
5456 (func $$f2 (export "f2") (result i32) (i32.const 2))
5457 (func $$f3 (export "f3") (result i32) (i32.const 3))
5458 (func $$f4 (export "f4") (result i32) (i32.const 4))
5459 (func $$f5 (export "f5") (result i32) (i32.const 5))
5460 (func $$f6 (export "f6") (result i32) (i32.const 6))
5461 (func $$f7 (export "f7") (result i32) (i32.const 7))
5462 (func $$f8 (export "f8") (result i32) (i32.const 8))
5463 (func $$f9 (export "f9") (result i32) (i32.const 9))
5464 (func $$f10 (export "f10") (result i32) (i32.const 10))
5465 (func $$f11 (export "f11") (result i32) (i32.const 11))
5466 (func $$f12 (export "f12") (result i32) (i32.const 12))
5467 (func $$f13 (export "f13") (result i32) (i32.const 13))
5468 (func $$f14 (export "f14") (result i32) (i32.const 14))
5469 (func $$f15 (export "f15") (result i32) (i32.const 15))
5470 (func (export "test") (param $$n i32) (result i32)
5471 (call_indirect (type 0) (local.get $$n)))
5472 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5473 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5474
5475 // ./test/core/table_copy.wast:2980
5476 assert_trap(() => invoke($66, `run`, [0, 23, 15]), `out of bounds table access`);
5477
5478 // ./test/core/table_copy.wast:2982
5479 assert_trap(() => invoke($66, `test`, [0]), `uninitialized element`);
5480
5481 // ./test/core/table_copy.wast:2983
5482 assert_trap(() => invoke($66, `test`, [1]), `uninitialized element`);
5483
5484 // ./test/core/table_copy.wast:2984
5485 assert_trap(() => invoke($66, `test`, [2]), `uninitialized element`);
5486
5487 // ./test/core/table_copy.wast:2985
5488 assert_trap(() => invoke($66, `test`, [3]), `uninitialized element`);
5489
5490 // ./test/core/table_copy.wast:2986
5491 assert_trap(() => invoke($66, `test`, [4]), `uninitialized element`);
5492
5493 // ./test/core/table_copy.wast:2987
5494 assert_trap(() => invoke($66, `test`, [5]), `uninitialized element`);
5495
5496 // ./test/core/table_copy.wast:2988
5497 assert_trap(() => invoke($66, `test`, [6]), `uninitialized element`);
5498
5499 // ./test/core/table_copy.wast:2989
5500 assert_trap(() => invoke($66, `test`, [7]), `uninitialized element`);
5501
5502 // ./test/core/table_copy.wast:2990
5503 assert_trap(() => invoke($66, `test`, [8]), `uninitialized element`);
5504
5505 // ./test/core/table_copy.wast:2991
5506 assert_trap(() => invoke($66, `test`, [9]), `uninitialized element`);
5507
5508 // ./test/core/table_copy.wast:2992
5509 assert_trap(() => invoke($66, `test`, [10]), `uninitialized element`);
5510
5511 // ./test/core/table_copy.wast:2993
5512 assert_trap(() => invoke($66, `test`, [11]), `uninitialized element`);
5513
5514 // ./test/core/table_copy.wast:2994
5515 assert_trap(() => invoke($66, `test`, [12]), `uninitialized element`);
5516
5517 // ./test/core/table_copy.wast:2995
5518 assert_trap(() => invoke($66, `test`, [13]), `uninitialized element`);
5519
5520 // ./test/core/table_copy.wast:2996
5521 assert_trap(() => invoke($66, `test`, [14]), `uninitialized element`);
5522
5523 // ./test/core/table_copy.wast:2997
5524 assert_trap(() => invoke($66, `test`, [15]), `uninitialized element`);
5525
5526 // ./test/core/table_copy.wast:2998
5527 assert_trap(() => invoke($66, `test`, [16]), `uninitialized element`);
5528
5529 // ./test/core/table_copy.wast:2999
5530 assert_trap(() => invoke($66, `test`, [17]), `uninitialized element`);
5531
5532 // ./test/core/table_copy.wast:3000
5533 assert_trap(() => invoke($66, `test`, [18]), `uninitialized element`);
5534
5535 // ./test/core/table_copy.wast:3001
5536 assert_trap(() => invoke($66, `test`, [19]), `uninitialized element`);
5537
5538 // ./test/core/table_copy.wast:3002
5539 assert_trap(() => invoke($66, `test`, [20]), `uninitialized element`);
5540
5541 // ./test/core/table_copy.wast:3003
5542 assert_trap(() => invoke($66, `test`, [21]), `uninitialized element`);
5543
5544 // ./test/core/table_copy.wast:3004
5545 assert_trap(() => invoke($66, `test`, [22]), `uninitialized element`);
5546
5547 // ./test/core/table_copy.wast:3005
5548 assert_return(() => invoke($66, `test`, [23]), [value("i32", 0)]);
5549
5550 // ./test/core/table_copy.wast:3006
5551 assert_return(() => invoke($66, `test`, [24]), [value("i32", 1)]);
5552
5553 // ./test/core/table_copy.wast:3007
5554 assert_return(() => invoke($66, `test`, [25]), [value("i32", 2)]);
5555
5556 // ./test/core/table_copy.wast:3008
5557 assert_return(() => invoke($66, `test`, [26]), [value("i32", 3)]);
5558
5559 // ./test/core/table_copy.wast:3009
5560 assert_return(() => invoke($66, `test`, [27]), [value("i32", 4)]);
5561
5562 // ./test/core/table_copy.wast:3010
5563 assert_return(() => invoke($66, `test`, [28]), [value("i32", 5)]);
5564
5565 // ./test/core/table_copy.wast:3011
5566 assert_return(() => invoke($66, `test`, [29]), [value("i32", 6)]);
5567
5568 // ./test/core/table_copy.wast:3012
5569 assert_return(() => invoke($66, `test`, [30]), [value("i32", 7)]);
5570
5571 // ./test/core/table_copy.wast:3013
5572 assert_return(() => invoke($66, `test`, [31]), [value("i32", 8)]);
5573
5574 // ./test/core/table_copy.wast:3015
5575 let $67 = instantiate(`(module
5576 (type (func (result i32)))
5577 (table 32 64 funcref)
5578 (elem (i32.const 11)
5579 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7)
5580 (func $$f0 (export "f0") (result i32) (i32.const 0))
5581 (func $$f1 (export "f1") (result i32) (i32.const 1))
5582 (func $$f2 (export "f2") (result i32) (i32.const 2))
5583 (func $$f3 (export "f3") (result i32) (i32.const 3))
5584 (func $$f4 (export "f4") (result i32) (i32.const 4))
5585 (func $$f5 (export "f5") (result i32) (i32.const 5))
5586 (func $$f6 (export "f6") (result i32) (i32.const 6))
5587 (func $$f7 (export "f7") (result i32) (i32.const 7))
5588 (func $$f8 (export "f8") (result i32) (i32.const 8))
5589 (func $$f9 (export "f9") (result i32) (i32.const 9))
5590 (func $$f10 (export "f10") (result i32) (i32.const 10))
5591 (func $$f11 (export "f11") (result i32) (i32.const 11))
5592 (func $$f12 (export "f12") (result i32) (i32.const 12))
5593 (func $$f13 (export "f13") (result i32) (i32.const 13))
5594 (func $$f14 (export "f14") (result i32) (i32.const 14))
5595 (func $$f15 (export "f15") (result i32) (i32.const 15))
5596 (func (export "test") (param $$n i32) (result i32)
5597 (call_indirect (type 0) (local.get $$n)))
5598 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5599 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5600
5601 // ./test/core/table_copy.wast:3041
5602 assert_trap(() => invoke($67, `run`, [24, 11, 16]), `out of bounds table access`);
5603
5604 // ./test/core/table_copy.wast:3043
5605 assert_trap(() => invoke($67, `test`, [0]), `uninitialized element`);
5606
5607 // ./test/core/table_copy.wast:3044
5608 assert_trap(() => invoke($67, `test`, [1]), `uninitialized element`);
5609
5610 // ./test/core/table_copy.wast:3045
5611 assert_trap(() => invoke($67, `test`, [2]), `uninitialized element`);
5612
5613 // ./test/core/table_copy.wast:3046
5614 assert_trap(() => invoke($67, `test`, [3]), `uninitialized element`);
5615
5616 // ./test/core/table_copy.wast:3047
5617 assert_trap(() => invoke($67, `test`, [4]), `uninitialized element`);
5618
5619 // ./test/core/table_copy.wast:3048
5620 assert_trap(() => invoke($67, `test`, [5]), `uninitialized element`);
5621
5622 // ./test/core/table_copy.wast:3049
5623 assert_trap(() => invoke($67, `test`, [6]), `uninitialized element`);
5624
5625 // ./test/core/table_copy.wast:3050
5626 assert_trap(() => invoke($67, `test`, [7]), `uninitialized element`);
5627
5628 // ./test/core/table_copy.wast:3051
5629 assert_trap(() => invoke($67, `test`, [8]), `uninitialized element`);
5630
5631 // ./test/core/table_copy.wast:3052
5632 assert_trap(() => invoke($67, `test`, [9]), `uninitialized element`);
5633
5634 // ./test/core/table_copy.wast:3053
5635 assert_trap(() => invoke($67, `test`, [10]), `uninitialized element`);
5636
5637 // ./test/core/table_copy.wast:3054
5638 assert_return(() => invoke($67, `test`, [11]), [value("i32", 0)]);
5639
5640 // ./test/core/table_copy.wast:3055
5641 assert_return(() => invoke($67, `test`, [12]), [value("i32", 1)]);
5642
5643 // ./test/core/table_copy.wast:3056
5644 assert_return(() => invoke($67, `test`, [13]), [value("i32", 2)]);
5645
5646 // ./test/core/table_copy.wast:3057
5647 assert_return(() => invoke($67, `test`, [14]), [value("i32", 3)]);
5648
5649 // ./test/core/table_copy.wast:3058
5650 assert_return(() => invoke($67, `test`, [15]), [value("i32", 4)]);
5651
5652 // ./test/core/table_copy.wast:3059
5653 assert_return(() => invoke($67, `test`, [16]), [value("i32", 5)]);
5654
5655 // ./test/core/table_copy.wast:3060
5656 assert_return(() => invoke($67, `test`, [17]), [value("i32", 6)]);
5657
5658 // ./test/core/table_copy.wast:3061
5659 assert_return(() => invoke($67, `test`, [18]), [value("i32", 7)]);
5660
5661 // ./test/core/table_copy.wast:3062
5662 assert_trap(() => invoke($67, `test`, [19]), `uninitialized element`);
5663
5664 // ./test/core/table_copy.wast:3063
5665 assert_trap(() => invoke($67, `test`, [20]), `uninitialized element`);
5666
5667 // ./test/core/table_copy.wast:3064
5668 assert_trap(() => invoke($67, `test`, [21]), `uninitialized element`);
5669
5670 // ./test/core/table_copy.wast:3065
5671 assert_trap(() => invoke($67, `test`, [22]), `uninitialized element`);
5672
5673 // ./test/core/table_copy.wast:3066
5674 assert_trap(() => invoke($67, `test`, [23]), `uninitialized element`);
5675
5676 // ./test/core/table_copy.wast:3067
5677 assert_trap(() => invoke($67, `test`, [24]), `uninitialized element`);
5678
5679 // ./test/core/table_copy.wast:3068
5680 assert_trap(() => invoke($67, `test`, [25]), `uninitialized element`);
5681
5682 // ./test/core/table_copy.wast:3069
5683 assert_trap(() => invoke($67, `test`, [26]), `uninitialized element`);
5684
5685 // ./test/core/table_copy.wast:3070
5686 assert_trap(() => invoke($67, `test`, [27]), `uninitialized element`);
5687
5688 // ./test/core/table_copy.wast:3071
5689 assert_trap(() => invoke($67, `test`, [28]), `uninitialized element`);
5690
5691 // ./test/core/table_copy.wast:3072
5692 assert_trap(() => invoke($67, `test`, [29]), `uninitialized element`);
5693
5694 // ./test/core/table_copy.wast:3073
5695 assert_trap(() => invoke($67, `test`, [30]), `uninitialized element`);
5696
5697 // ./test/core/table_copy.wast:3074
5698 assert_trap(() => invoke($67, `test`, [31]), `uninitialized element`);
5699
5700 // ./test/core/table_copy.wast:3076
5701 let $68 = instantiate(`(module
5702 (type (func (result i32)))
5703 (table 32 64 funcref)
5704 (elem (i32.const 24)
5705 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7)
5706 (func $$f0 (export "f0") (result i32) (i32.const 0))
5707 (func $$f1 (export "f1") (result i32) (i32.const 1))
5708 (func $$f2 (export "f2") (result i32) (i32.const 2))
5709 (func $$f3 (export "f3") (result i32) (i32.const 3))
5710 (func $$f4 (export "f4") (result i32) (i32.const 4))
5711 (func $$f5 (export "f5") (result i32) (i32.const 5))
5712 (func $$f6 (export "f6") (result i32) (i32.const 6))
5713 (func $$f7 (export "f7") (result i32) (i32.const 7))
5714 (func $$f8 (export "f8") (result i32) (i32.const 8))
5715 (func $$f9 (export "f9") (result i32) (i32.const 9))
5716 (func $$f10 (export "f10") (result i32) (i32.const 10))
5717 (func $$f11 (export "f11") (result i32) (i32.const 11))
5718 (func $$f12 (export "f12") (result i32) (i32.const 12))
5719 (func $$f13 (export "f13") (result i32) (i32.const 13))
5720 (func $$f14 (export "f14") (result i32) (i32.const 14))
5721 (func $$f15 (export "f15") (result i32) (i32.const 15))
5722 (func (export "test") (param $$n i32) (result i32)
5723 (call_indirect (type 0) (local.get $$n)))
5724 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5725 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5726
5727 // ./test/core/table_copy.wast:3102
5728 assert_trap(() => invoke($68, `run`, [11, 24, 16]), `out of bounds table access`);
5729
5730 // ./test/core/table_copy.wast:3104
5731 assert_trap(() => invoke($68, `test`, [0]), `uninitialized element`);
5732
5733 // ./test/core/table_copy.wast:3105
5734 assert_trap(() => invoke($68, `test`, [1]), `uninitialized element`);
5735
5736 // ./test/core/table_copy.wast:3106
5737 assert_trap(() => invoke($68, `test`, [2]), `uninitialized element`);
5738
5739 // ./test/core/table_copy.wast:3107
5740 assert_trap(() => invoke($68, `test`, [3]), `uninitialized element`);
5741
5742 // ./test/core/table_copy.wast:3108
5743 assert_trap(() => invoke($68, `test`, [4]), `uninitialized element`);
5744
5745 // ./test/core/table_copy.wast:3109
5746 assert_trap(() => invoke($68, `test`, [5]), `uninitialized element`);
5747
5748 // ./test/core/table_copy.wast:3110
5749 assert_trap(() => invoke($68, `test`, [6]), `uninitialized element`);
5750
5751 // ./test/core/table_copy.wast:3111
5752 assert_trap(() => invoke($68, `test`, [7]), `uninitialized element`);
5753
5754 // ./test/core/table_copy.wast:3112
5755 assert_trap(() => invoke($68, `test`, [8]), `uninitialized element`);
5756
5757 // ./test/core/table_copy.wast:3113
5758 assert_trap(() => invoke($68, `test`, [9]), `uninitialized element`);
5759
5760 // ./test/core/table_copy.wast:3114
5761 assert_trap(() => invoke($68, `test`, [10]), `uninitialized element`);
5762
5763 // ./test/core/table_copy.wast:3115
5764 assert_trap(() => invoke($68, `test`, [11]), `uninitialized element`);
5765
5766 // ./test/core/table_copy.wast:3116
5767 assert_trap(() => invoke($68, `test`, [12]), `uninitialized element`);
5768
5769 // ./test/core/table_copy.wast:3117
5770 assert_trap(() => invoke($68, `test`, [13]), `uninitialized element`);
5771
5772 // ./test/core/table_copy.wast:3118
5773 assert_trap(() => invoke($68, `test`, [14]), `uninitialized element`);
5774
5775 // ./test/core/table_copy.wast:3119
5776 assert_trap(() => invoke($68, `test`, [15]), `uninitialized element`);
5777
5778 // ./test/core/table_copy.wast:3120
5779 assert_trap(() => invoke($68, `test`, [16]), `uninitialized element`);
5780
5781 // ./test/core/table_copy.wast:3121
5782 assert_trap(() => invoke($68, `test`, [17]), `uninitialized element`);
5783
5784 // ./test/core/table_copy.wast:3122
5785 assert_trap(() => invoke($68, `test`, [18]), `uninitialized element`);
5786
5787 // ./test/core/table_copy.wast:3123
5788 assert_trap(() => invoke($68, `test`, [19]), `uninitialized element`);
5789
5790 // ./test/core/table_copy.wast:3124
5791 assert_trap(() => invoke($68, `test`, [20]), `uninitialized element`);
5792
5793 // ./test/core/table_copy.wast:3125
5794 assert_trap(() => invoke($68, `test`, [21]), `uninitialized element`);
5795
5796 // ./test/core/table_copy.wast:3126
5797 assert_trap(() => invoke($68, `test`, [22]), `uninitialized element`);
5798
5799 // ./test/core/table_copy.wast:3127
5800 assert_trap(() => invoke($68, `test`, [23]), `uninitialized element`);
5801
5802 // ./test/core/table_copy.wast:3128
5803 assert_return(() => invoke($68, `test`, [24]), [value("i32", 0)]);
5804
5805 // ./test/core/table_copy.wast:3129
5806 assert_return(() => invoke($68, `test`, [25]), [value("i32", 1)]);
5807
5808 // ./test/core/table_copy.wast:3130
5809 assert_return(() => invoke($68, `test`, [26]), [value("i32", 2)]);
5810
5811 // ./test/core/table_copy.wast:3131
5812 assert_return(() => invoke($68, `test`, [27]), [value("i32", 3)]);
5813
5814 // ./test/core/table_copy.wast:3132
5815 assert_return(() => invoke($68, `test`, [28]), [value("i32", 4)]);
5816
5817 // ./test/core/table_copy.wast:3133
5818 assert_return(() => invoke($68, `test`, [29]), [value("i32", 5)]);
5819
5820 // ./test/core/table_copy.wast:3134
5821 assert_return(() => invoke($68, `test`, [30]), [value("i32", 6)]);
5822
5823 // ./test/core/table_copy.wast:3135
5824 assert_return(() => invoke($68, `test`, [31]), [value("i32", 7)]);
5825
5826 // ./test/core/table_copy.wast:3137
5827 let $69 = instantiate(`(module
5828 (type (func (result i32)))
5829 (table 32 64 funcref)
5830 (elem (i32.const 21)
5831 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7)
5832 (func $$f0 (export "f0") (result i32) (i32.const 0))
5833 (func $$f1 (export "f1") (result i32) (i32.const 1))
5834 (func $$f2 (export "f2") (result i32) (i32.const 2))
5835 (func $$f3 (export "f3") (result i32) (i32.const 3))
5836 (func $$f4 (export "f4") (result i32) (i32.const 4))
5837 (func $$f5 (export "f5") (result i32) (i32.const 5))
5838 (func $$f6 (export "f6") (result i32) (i32.const 6))
5839 (func $$f7 (export "f7") (result i32) (i32.const 7))
5840 (func $$f8 (export "f8") (result i32) (i32.const 8))
5841 (func $$f9 (export "f9") (result i32) (i32.const 9))
5842 (func $$f10 (export "f10") (result i32) (i32.const 10))
5843 (func $$f11 (export "f11") (result i32) (i32.const 11))
5844 (func $$f12 (export "f12") (result i32) (i32.const 12))
5845 (func $$f13 (export "f13") (result i32) (i32.const 13))
5846 (func $$f14 (export "f14") (result i32) (i32.const 14))
5847 (func $$f15 (export "f15") (result i32) (i32.const 15))
5848 (func (export "test") (param $$n i32) (result i32)
5849 (call_indirect (type 0) (local.get $$n)))
5850 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5851 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5852
5853 // ./test/core/table_copy.wast:3163
5854 assert_trap(() => invoke($69, `run`, [24, 21, 16]), `out of bounds table access`);
5855
5856 // ./test/core/table_copy.wast:3165
5857 assert_trap(() => invoke($69, `test`, [0]), `uninitialized element`);
5858
5859 // ./test/core/table_copy.wast:3166
5860 assert_trap(() => invoke($69, `test`, [1]), `uninitialized element`);
5861
5862 // ./test/core/table_copy.wast:3167
5863 assert_trap(() => invoke($69, `test`, [2]), `uninitialized element`);
5864
5865 // ./test/core/table_copy.wast:3168
5866 assert_trap(() => invoke($69, `test`, [3]), `uninitialized element`);
5867
5868 // ./test/core/table_copy.wast:3169
5869 assert_trap(() => invoke($69, `test`, [4]), `uninitialized element`);
5870
5871 // ./test/core/table_copy.wast:3170
5872 assert_trap(() => invoke($69, `test`, [5]), `uninitialized element`);
5873
5874 // ./test/core/table_copy.wast:3171
5875 assert_trap(() => invoke($69, `test`, [6]), `uninitialized element`);
5876
5877 // ./test/core/table_copy.wast:3172
5878 assert_trap(() => invoke($69, `test`, [7]), `uninitialized element`);
5879
5880 // ./test/core/table_copy.wast:3173
5881 assert_trap(() => invoke($69, `test`, [8]), `uninitialized element`);
5882
5883 // ./test/core/table_copy.wast:3174
5884 assert_trap(() => invoke($69, `test`, [9]), `uninitialized element`);
5885
5886 // ./test/core/table_copy.wast:3175
5887 assert_trap(() => invoke($69, `test`, [10]), `uninitialized element`);
5888
5889 // ./test/core/table_copy.wast:3176
5890 assert_trap(() => invoke($69, `test`, [11]), `uninitialized element`);
5891
5892 // ./test/core/table_copy.wast:3177
5893 assert_trap(() => invoke($69, `test`, [12]), `uninitialized element`);
5894
5895 // ./test/core/table_copy.wast:3178
5896 assert_trap(() => invoke($69, `test`, [13]), `uninitialized element`);
5897
5898 // ./test/core/table_copy.wast:3179
5899 assert_trap(() => invoke($69, `test`, [14]), `uninitialized element`);
5900
5901 // ./test/core/table_copy.wast:3180
5902 assert_trap(() => invoke($69, `test`, [15]), `uninitialized element`);
5903
5904 // ./test/core/table_copy.wast:3181
5905 assert_trap(() => invoke($69, `test`, [16]), `uninitialized element`);
5906
5907 // ./test/core/table_copy.wast:3182
5908 assert_trap(() => invoke($69, `test`, [17]), `uninitialized element`);
5909
5910 // ./test/core/table_copy.wast:3183
5911 assert_trap(() => invoke($69, `test`, [18]), `uninitialized element`);
5912
5913 // ./test/core/table_copy.wast:3184
5914 assert_trap(() => invoke($69, `test`, [19]), `uninitialized element`);
5915
5916 // ./test/core/table_copy.wast:3185
5917 assert_trap(() => invoke($69, `test`, [20]), `uninitialized element`);
5918
5919 // ./test/core/table_copy.wast:3186
5920 assert_return(() => invoke($69, `test`, [21]), [value("i32", 0)]);
5921
5922 // ./test/core/table_copy.wast:3187
5923 assert_return(() => invoke($69, `test`, [22]), [value("i32", 1)]);
5924
5925 // ./test/core/table_copy.wast:3188
5926 assert_return(() => invoke($69, `test`, [23]), [value("i32", 2)]);
5927
5928 // ./test/core/table_copy.wast:3189
5929 assert_return(() => invoke($69, `test`, [24]), [value("i32", 3)]);
5930
5931 // ./test/core/table_copy.wast:3190
5932 assert_return(() => invoke($69, `test`, [25]), [value("i32", 4)]);
5933
5934 // ./test/core/table_copy.wast:3191
5935 assert_return(() => invoke($69, `test`, [26]), [value("i32", 5)]);
5936
5937 // ./test/core/table_copy.wast:3192
5938 assert_return(() => invoke($69, `test`, [27]), [value("i32", 6)]);
5939
5940 // ./test/core/table_copy.wast:3193
5941 assert_return(() => invoke($69, `test`, [28]), [value("i32", 7)]);
5942
5943 // ./test/core/table_copy.wast:3194
5944 assert_trap(() => invoke($69, `test`, [29]), `uninitialized element`);
5945
5946 // ./test/core/table_copy.wast:3195
5947 assert_trap(() => invoke($69, `test`, [30]), `uninitialized element`);
5948
5949 // ./test/core/table_copy.wast:3196
5950 assert_trap(() => invoke($69, `test`, [31]), `uninitialized element`);
5951
5952 // ./test/core/table_copy.wast:3198
5953 let $70 = instantiate(`(module
5954 (type (func (result i32)))
5955 (table 32 64 funcref)
5956 (elem (i32.const 24)
5957 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7)
5958 (func $$f0 (export "f0") (result i32) (i32.const 0))
5959 (func $$f1 (export "f1") (result i32) (i32.const 1))
5960 (func $$f2 (export "f2") (result i32) (i32.const 2))
5961 (func $$f3 (export "f3") (result i32) (i32.const 3))
5962 (func $$f4 (export "f4") (result i32) (i32.const 4))
5963 (func $$f5 (export "f5") (result i32) (i32.const 5))
5964 (func $$f6 (export "f6") (result i32) (i32.const 6))
5965 (func $$f7 (export "f7") (result i32) (i32.const 7))
5966 (func $$f8 (export "f8") (result i32) (i32.const 8))
5967 (func $$f9 (export "f9") (result i32) (i32.const 9))
5968 (func $$f10 (export "f10") (result i32) (i32.const 10))
5969 (func $$f11 (export "f11") (result i32) (i32.const 11))
5970 (func $$f12 (export "f12") (result i32) (i32.const 12))
5971 (func $$f13 (export "f13") (result i32) (i32.const 13))
5972 (func $$f14 (export "f14") (result i32) (i32.const 14))
5973 (func $$f15 (export "f15") (result i32) (i32.const 15))
5974 (func (export "test") (param $$n i32) (result i32)
5975 (call_indirect (type 0) (local.get $$n)))
5976 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
5977 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
5978
5979 // ./test/core/table_copy.wast:3224
5980 assert_trap(() => invoke($70, `run`, [21, 24, 16]), `out of bounds table access`);
5981
5982 // ./test/core/table_copy.wast:3226
5983 assert_trap(() => invoke($70, `test`, [0]), `uninitialized element`);
5984
5985 // ./test/core/table_copy.wast:3227
5986 assert_trap(() => invoke($70, `test`, [1]), `uninitialized element`);
5987
5988 // ./test/core/table_copy.wast:3228
5989 assert_trap(() => invoke($70, `test`, [2]), `uninitialized element`);
5990
5991 // ./test/core/table_copy.wast:3229
5992 assert_trap(() => invoke($70, `test`, [3]), `uninitialized element`);
5993
5994 // ./test/core/table_copy.wast:3230
5995 assert_trap(() => invoke($70, `test`, [4]), `uninitialized element`);
5996
5997 // ./test/core/table_copy.wast:3231
5998 assert_trap(() => invoke($70, `test`, [5]), `uninitialized element`);
5999
6000 // ./test/core/table_copy.wast:3232
6001 assert_trap(() => invoke($70, `test`, [6]), `uninitialized element`);
6002
6003 // ./test/core/table_copy.wast:3233
6004 assert_trap(() => invoke($70, `test`, [7]), `uninitialized element`);
6005
6006 // ./test/core/table_copy.wast:3234
6007 assert_trap(() => invoke($70, `test`, [8]), `uninitialized element`);
6008
6009 // ./test/core/table_copy.wast:3235
6010 assert_trap(() => invoke($70, `test`, [9]), `uninitialized element`);
6011
6012 // ./test/core/table_copy.wast:3236
6013 assert_trap(() => invoke($70, `test`, [10]), `uninitialized element`);
6014
6015 // ./test/core/table_copy.wast:3237
6016 assert_trap(() => invoke($70, `test`, [11]), `uninitialized element`);
6017
6018 // ./test/core/table_copy.wast:3238
6019 assert_trap(() => invoke($70, `test`, [12]), `uninitialized element`);
6020
6021 // ./test/core/table_copy.wast:3239
6022 assert_trap(() => invoke($70, `test`, [13]), `uninitialized element`);
6023
6024 // ./test/core/table_copy.wast:3240
6025 assert_trap(() => invoke($70, `test`, [14]), `uninitialized element`);
6026
6027 // ./test/core/table_copy.wast:3241
6028 assert_trap(() => invoke($70, `test`, [15]), `uninitialized element`);
6029
6030 // ./test/core/table_copy.wast:3242
6031 assert_trap(() => invoke($70, `test`, [16]), `uninitialized element`);
6032
6033 // ./test/core/table_copy.wast:3243
6034 assert_trap(() => invoke($70, `test`, [17]), `uninitialized element`);
6035
6036 // ./test/core/table_copy.wast:3244
6037 assert_trap(() => invoke($70, `test`, [18]), `uninitialized element`);
6038
6039 // ./test/core/table_copy.wast:3245
6040 assert_trap(() => invoke($70, `test`, [19]), `uninitialized element`);
6041
6042 // ./test/core/table_copy.wast:3246
6043 assert_trap(() => invoke($70, `test`, [20]), `uninitialized element`);
6044
6045 // ./test/core/table_copy.wast:3247
6046 assert_trap(() => invoke($70, `test`, [21]), `uninitialized element`);
6047
6048 // ./test/core/table_copy.wast:3248
6049 assert_trap(() => invoke($70, `test`, [22]), `uninitialized element`);
6050
6051 // ./test/core/table_copy.wast:3249
6052 assert_trap(() => invoke($70, `test`, [23]), `uninitialized element`);
6053
6054 // ./test/core/table_copy.wast:3250
6055 assert_return(() => invoke($70, `test`, [24]), [value("i32", 0)]);
6056
6057 // ./test/core/table_copy.wast:3251
6058 assert_return(() => invoke($70, `test`, [25]), [value("i32", 1)]);
6059
6060 // ./test/core/table_copy.wast:3252
6061 assert_return(() => invoke($70, `test`, [26]), [value("i32", 2)]);
6062
6063 // ./test/core/table_copy.wast:3253
6064 assert_return(() => invoke($70, `test`, [27]), [value("i32", 3)]);
6065
6066 // ./test/core/table_copy.wast:3254
6067 assert_return(() => invoke($70, `test`, [28]), [value("i32", 4)]);
6068
6069 // ./test/core/table_copy.wast:3255
6070 assert_return(() => invoke($70, `test`, [29]), [value("i32", 5)]);
6071
6072 // ./test/core/table_copy.wast:3256
6073 assert_return(() => invoke($70, `test`, [30]), [value("i32", 6)]);
6074
6075 // ./test/core/table_copy.wast:3257
6076 assert_return(() => invoke($70, `test`, [31]), [value("i32", 7)]);
6077
6078 // ./test/core/table_copy.wast:3259
6079 let $71 = instantiate(`(module
6080 (type (func (result i32)))
6081 (table 32 64 funcref)
6082 (elem (i32.const 21)
6083 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8 $$f9 $$f10)
6084 (func $$f0 (export "f0") (result i32) (i32.const 0))
6085 (func $$f1 (export "f1") (result i32) (i32.const 1))
6086 (func $$f2 (export "f2") (result i32) (i32.const 2))
6087 (func $$f3 (export "f3") (result i32) (i32.const 3))
6088 (func $$f4 (export "f4") (result i32) (i32.const 4))
6089 (func $$f5 (export "f5") (result i32) (i32.const 5))
6090 (func $$f6 (export "f6") (result i32) (i32.const 6))
6091 (func $$f7 (export "f7") (result i32) (i32.const 7))
6092 (func $$f8 (export "f8") (result i32) (i32.const 8))
6093 (func $$f9 (export "f9") (result i32) (i32.const 9))
6094 (func $$f10 (export "f10") (result i32) (i32.const 10))
6095 (func $$f11 (export "f11") (result i32) (i32.const 11))
6096 (func $$f12 (export "f12") (result i32) (i32.const 12))
6097 (func $$f13 (export "f13") (result i32) (i32.const 13))
6098 (func $$f14 (export "f14") (result i32) (i32.const 14))
6099 (func $$f15 (export "f15") (result i32) (i32.const 15))
6100 (func (export "test") (param $$n i32) (result i32)
6101 (call_indirect (type 0) (local.get $$n)))
6102 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
6103 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
6104
6105 // ./test/core/table_copy.wast:3285
6106 assert_trap(() => invoke($71, `run`, [21, 21, 16]), `out of bounds table access`);
6107
6108 // ./test/core/table_copy.wast:3287
6109 assert_trap(() => invoke($71, `test`, [0]), `uninitialized element`);
6110
6111 // ./test/core/table_copy.wast:3288
6112 assert_trap(() => invoke($71, `test`, [1]), `uninitialized element`);
6113
6114 // ./test/core/table_copy.wast:3289
6115 assert_trap(() => invoke($71, `test`, [2]), `uninitialized element`);
6116
6117 // ./test/core/table_copy.wast:3290
6118 assert_trap(() => invoke($71, `test`, [3]), `uninitialized element`);
6119
6120 // ./test/core/table_copy.wast:3291
6121 assert_trap(() => invoke($71, `test`, [4]), `uninitialized element`);
6122
6123 // ./test/core/table_copy.wast:3292
6124 assert_trap(() => invoke($71, `test`, [5]), `uninitialized element`);
6125
6126 // ./test/core/table_copy.wast:3293
6127 assert_trap(() => invoke($71, `test`, [6]), `uninitialized element`);
6128
6129 // ./test/core/table_copy.wast:3294
6130 assert_trap(() => invoke($71, `test`, [7]), `uninitialized element`);
6131
6132 // ./test/core/table_copy.wast:3295
6133 assert_trap(() => invoke($71, `test`, [8]), `uninitialized element`);
6134
6135 // ./test/core/table_copy.wast:3296
6136 assert_trap(() => invoke($71, `test`, [9]), `uninitialized element`);
6137
6138 // ./test/core/table_copy.wast:3297
6139 assert_trap(() => invoke($71, `test`, [10]), `uninitialized element`);
6140
6141 // ./test/core/table_copy.wast:3298
6142 assert_trap(() => invoke($71, `test`, [11]), `uninitialized element`);
6143
6144 // ./test/core/table_copy.wast:3299
6145 assert_trap(() => invoke($71, `test`, [12]), `uninitialized element`);
6146
6147 // ./test/core/table_copy.wast:3300
6148 assert_trap(() => invoke($71, `test`, [13]), `uninitialized element`);
6149
6150 // ./test/core/table_copy.wast:3301
6151 assert_trap(() => invoke($71, `test`, [14]), `uninitialized element`);
6152
6153 // ./test/core/table_copy.wast:3302
6154 assert_trap(() => invoke($71, `test`, [15]), `uninitialized element`);
6155
6156 // ./test/core/table_copy.wast:3303
6157 assert_trap(() => invoke($71, `test`, [16]), `uninitialized element`);
6158
6159 // ./test/core/table_copy.wast:3304
6160 assert_trap(() => invoke($71, `test`, [17]), `uninitialized element`);
6161
6162 // ./test/core/table_copy.wast:3305
6163 assert_trap(() => invoke($71, `test`, [18]), `uninitialized element`);
6164
6165 // ./test/core/table_copy.wast:3306
6166 assert_trap(() => invoke($71, `test`, [19]), `uninitialized element`);
6167
6168 // ./test/core/table_copy.wast:3307
6169 assert_trap(() => invoke($71, `test`, [20]), `uninitialized element`);
6170
6171 // ./test/core/table_copy.wast:3308
6172 assert_return(() => invoke($71, `test`, [21]), [value("i32", 0)]);
6173
6174 // ./test/core/table_copy.wast:3309
6175 assert_return(() => invoke($71, `test`, [22]), [value("i32", 1)]);
6176
6177 // ./test/core/table_copy.wast:3310
6178 assert_return(() => invoke($71, `test`, [23]), [value("i32", 2)]);
6179
6180 // ./test/core/table_copy.wast:3311
6181 assert_return(() => invoke($71, `test`, [24]), [value("i32", 3)]);
6182
6183 // ./test/core/table_copy.wast:3312
6184 assert_return(() => invoke($71, `test`, [25]), [value("i32", 4)]);
6185
6186 // ./test/core/table_copy.wast:3313
6187 assert_return(() => invoke($71, `test`, [26]), [value("i32", 5)]);
6188
6189 // ./test/core/table_copy.wast:3314
6190 assert_return(() => invoke($71, `test`, [27]), [value("i32", 6)]);
6191
6192 // ./test/core/table_copy.wast:3315
6193 assert_return(() => invoke($71, `test`, [28]), [value("i32", 7)]);
6194
6195 // ./test/core/table_copy.wast:3316
6196 assert_return(() => invoke($71, `test`, [29]), [value("i32", 8)]);
6197
6198 // ./test/core/table_copy.wast:3317
6199 assert_return(() => invoke($71, `test`, [30]), [value("i32", 9)]);
6200
6201 // ./test/core/table_copy.wast:3318
6202 assert_return(() => invoke($71, `test`, [31]), [value("i32", 10)]);
6203
6204 // ./test/core/table_copy.wast:3320
6205 let $72 = instantiate(`(module
6206 (type (func (result i32)))
6207 (table 128 128 funcref)
6208 (elem (i32.const 112)
6209 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8 $$f9 $$f10 $$f11 $$f12 $$f13 $$f14 $$f15)
6210 (func $$f0 (export "f0") (result i32) (i32.const 0))
6211 (func $$f1 (export "f1") (result i32) (i32.const 1))
6212 (func $$f2 (export "f2") (result i32) (i32.const 2))
6213 (func $$f3 (export "f3") (result i32) (i32.const 3))
6214 (func $$f4 (export "f4") (result i32) (i32.const 4))
6215 (func $$f5 (export "f5") (result i32) (i32.const 5))
6216 (func $$f6 (export "f6") (result i32) (i32.const 6))
6217 (func $$f7 (export "f7") (result i32) (i32.const 7))
6218 (func $$f8 (export "f8") (result i32) (i32.const 8))
6219 (func $$f9 (export "f9") (result i32) (i32.const 9))
6220 (func $$f10 (export "f10") (result i32) (i32.const 10))
6221 (func $$f11 (export "f11") (result i32) (i32.const 11))
6222 (func $$f12 (export "f12") (result i32) (i32.const 12))
6223 (func $$f13 (export "f13") (result i32) (i32.const 13))
6224 (func $$f14 (export "f14") (result i32) (i32.const 14))
6225 (func $$f15 (export "f15") (result i32) (i32.const 15))
6226 (func (export "test") (param $$n i32) (result i32)
6227 (call_indirect (type 0) (local.get $$n)))
6228 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
6229 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
6230
6231 // ./test/core/table_copy.wast:3346
6232 assert_trap(() => invoke($72, `run`, [0, 112, -32]), `out of bounds table access`);
6233
6234 // ./test/core/table_copy.wast:3348
6235 assert_trap(() => invoke($72, `test`, [0]), `uninitialized element`);
6236
6237 // ./test/core/table_copy.wast:3349
6238 assert_trap(() => invoke($72, `test`, [1]), `uninitialized element`);
6239
6240 // ./test/core/table_copy.wast:3350
6241 assert_trap(() => invoke($72, `test`, [2]), `uninitialized element`);
6242
6243 // ./test/core/table_copy.wast:3351
6244 assert_trap(() => invoke($72, `test`, [3]), `uninitialized element`);
6245
6246 // ./test/core/table_copy.wast:3352
6247 assert_trap(() => invoke($72, `test`, [4]), `uninitialized element`);
6248
6249 // ./test/core/table_copy.wast:3353
6250 assert_trap(() => invoke($72, `test`, [5]), `uninitialized element`);
6251
6252 // ./test/core/table_copy.wast:3354
6253 assert_trap(() => invoke($72, `test`, [6]), `uninitialized element`);
6254
6255 // ./test/core/table_copy.wast:3355
6256 assert_trap(() => invoke($72, `test`, [7]), `uninitialized element`);
6257
6258 // ./test/core/table_copy.wast:3356
6259 assert_trap(() => invoke($72, `test`, [8]), `uninitialized element`);
6260
6261 // ./test/core/table_copy.wast:3357
6262 assert_trap(() => invoke($72, `test`, [9]), `uninitialized element`);
6263
6264 // ./test/core/table_copy.wast:3358
6265 assert_trap(() => invoke($72, `test`, [10]), `uninitialized element`);
6266
6267 // ./test/core/table_copy.wast:3359
6268 assert_trap(() => invoke($72, `test`, [11]), `uninitialized element`);
6269
6270 // ./test/core/table_copy.wast:3360
6271 assert_trap(() => invoke($72, `test`, [12]), `uninitialized element`);
6272
6273 // ./test/core/table_copy.wast:3361
6274 assert_trap(() => invoke($72, `test`, [13]), `uninitialized element`);
6275
6276 // ./test/core/table_copy.wast:3362
6277 assert_trap(() => invoke($72, `test`, [14]), `uninitialized element`);
6278
6279 // ./test/core/table_copy.wast:3363
6280 assert_trap(() => invoke($72, `test`, [15]), `uninitialized element`);
6281
6282 // ./test/core/table_copy.wast:3364
6283 assert_trap(() => invoke($72, `test`, [16]), `uninitialized element`);
6284
6285 // ./test/core/table_copy.wast:3365
6286 assert_trap(() => invoke($72, `test`, [17]), `uninitialized element`);
6287
6288 // ./test/core/table_copy.wast:3366
6289 assert_trap(() => invoke($72, `test`, [18]), `uninitialized element`);
6290
6291 // ./test/core/table_copy.wast:3367
6292 assert_trap(() => invoke($72, `test`, [19]), `uninitialized element`);
6293
6294 // ./test/core/table_copy.wast:3368
6295 assert_trap(() => invoke($72, `test`, [20]), `uninitialized element`);
6296
6297 // ./test/core/table_copy.wast:3369
6298 assert_trap(() => invoke($72, `test`, [21]), `uninitialized element`);
6299
6300 // ./test/core/table_copy.wast:3370
6301 assert_trap(() => invoke($72, `test`, [22]), `uninitialized element`);
6302
6303 // ./test/core/table_copy.wast:3371
6304 assert_trap(() => invoke($72, `test`, [23]), `uninitialized element`);
6305
6306 // ./test/core/table_copy.wast:3372
6307 assert_trap(() => invoke($72, `test`, [24]), `uninitialized element`);
6308
6309 // ./test/core/table_copy.wast:3373
6310 assert_trap(() => invoke($72, `test`, [25]), `uninitialized element`);
6311
6312 // ./test/core/table_copy.wast:3374
6313 assert_trap(() => invoke($72, `test`, [26]), `uninitialized element`);
6314
6315 // ./test/core/table_copy.wast:3375
6316 assert_trap(() => invoke($72, `test`, [27]), `uninitialized element`);
6317
6318 // ./test/core/table_copy.wast:3376
6319 assert_trap(() => invoke($72, `test`, [28]), `uninitialized element`);
6320
6321 // ./test/core/table_copy.wast:3377
6322 assert_trap(() => invoke($72, `test`, [29]), `uninitialized element`);
6323
6324 // ./test/core/table_copy.wast:3378
6325 assert_trap(() => invoke($72, `test`, [30]), `uninitialized element`);
6326
6327 // ./test/core/table_copy.wast:3379
6328 assert_trap(() => invoke($72, `test`, [31]), `uninitialized element`);
6329
6330 // ./test/core/table_copy.wast:3380
6331 assert_trap(() => invoke($72, `test`, [32]), `uninitialized element`);
6332
6333 // ./test/core/table_copy.wast:3381
6334 assert_trap(() => invoke($72, `test`, [33]), `uninitialized element`);
6335
6336 // ./test/core/table_copy.wast:3382
6337 assert_trap(() => invoke($72, `test`, [34]), `uninitialized element`);
6338
6339 // ./test/core/table_copy.wast:3383
6340 assert_trap(() => invoke($72, `test`, [35]), `uninitialized element`);
6341
6342 // ./test/core/table_copy.wast:3384
6343 assert_trap(() => invoke($72, `test`, [36]), `uninitialized element`);
6344
6345 // ./test/core/table_copy.wast:3385
6346 assert_trap(() => invoke($72, `test`, [37]), `uninitialized element`);
6347
6348 // ./test/core/table_copy.wast:3386
6349 assert_trap(() => invoke($72, `test`, [38]), `uninitialized element`);
6350
6351 // ./test/core/table_copy.wast:3387
6352 assert_trap(() => invoke($72, `test`, [39]), `uninitialized element`);
6353
6354 // ./test/core/table_copy.wast:3388
6355 assert_trap(() => invoke($72, `test`, [40]), `uninitialized element`);
6356
6357 // ./test/core/table_copy.wast:3389
6358 assert_trap(() => invoke($72, `test`, [41]), `uninitialized element`);
6359
6360 // ./test/core/table_copy.wast:3390
6361 assert_trap(() => invoke($72, `test`, [42]), `uninitialized element`);
6362
6363 // ./test/core/table_copy.wast:3391
6364 assert_trap(() => invoke($72, `test`, [43]), `uninitialized element`);
6365
6366 // ./test/core/table_copy.wast:3392
6367 assert_trap(() => invoke($72, `test`, [44]), `uninitialized element`);
6368
6369 // ./test/core/table_copy.wast:3393
6370 assert_trap(() => invoke($72, `test`, [45]), `uninitialized element`);
6371
6372 // ./test/core/table_copy.wast:3394
6373 assert_trap(() => invoke($72, `test`, [46]), `uninitialized element`);
6374
6375 // ./test/core/table_copy.wast:3395
6376 assert_trap(() => invoke($72, `test`, [47]), `uninitialized element`);
6377
6378 // ./test/core/table_copy.wast:3396
6379 assert_trap(() => invoke($72, `test`, [48]), `uninitialized element`);
6380
6381 // ./test/core/table_copy.wast:3397
6382 assert_trap(() => invoke($72, `test`, [49]), `uninitialized element`);
6383
6384 // ./test/core/table_copy.wast:3398
6385 assert_trap(() => invoke($72, `test`, [50]), `uninitialized element`);
6386
6387 // ./test/core/table_copy.wast:3399
6388 assert_trap(() => invoke($72, `test`, [51]), `uninitialized element`);
6389
6390 // ./test/core/table_copy.wast:3400
6391 assert_trap(() => invoke($72, `test`, [52]), `uninitialized element`);
6392
6393 // ./test/core/table_copy.wast:3401
6394 assert_trap(() => invoke($72, `test`, [53]), `uninitialized element`);
6395
6396 // ./test/core/table_copy.wast:3402
6397 assert_trap(() => invoke($72, `test`, [54]), `uninitialized element`);
6398
6399 // ./test/core/table_copy.wast:3403
6400 assert_trap(() => invoke($72, `test`, [55]), `uninitialized element`);
6401
6402 // ./test/core/table_copy.wast:3404
6403 assert_trap(() => invoke($72, `test`, [56]), `uninitialized element`);
6404
6405 // ./test/core/table_copy.wast:3405
6406 assert_trap(() => invoke($72, `test`, [57]), `uninitialized element`);
6407
6408 // ./test/core/table_copy.wast:3406
6409 assert_trap(() => invoke($72, `test`, [58]), `uninitialized element`);
6410
6411 // ./test/core/table_copy.wast:3407
6412 assert_trap(() => invoke($72, `test`, [59]), `uninitialized element`);
6413
6414 // ./test/core/table_copy.wast:3408
6415 assert_trap(() => invoke($72, `test`, [60]), `uninitialized element`);
6416
6417 // ./test/core/table_copy.wast:3409
6418 assert_trap(() => invoke($72, `test`, [61]), `uninitialized element`);
6419
6420 // ./test/core/table_copy.wast:3410
6421 assert_trap(() => invoke($72, `test`, [62]), `uninitialized element`);
6422
6423 // ./test/core/table_copy.wast:3411
6424 assert_trap(() => invoke($72, `test`, [63]), `uninitialized element`);
6425
6426 // ./test/core/table_copy.wast:3412
6427 assert_trap(() => invoke($72, `test`, [64]), `uninitialized element`);
6428
6429 // ./test/core/table_copy.wast:3413
6430 assert_trap(() => invoke($72, `test`, [65]), `uninitialized element`);
6431
6432 // ./test/core/table_copy.wast:3414
6433 assert_trap(() => invoke($72, `test`, [66]), `uninitialized element`);
6434
6435 // ./test/core/table_copy.wast:3415
6436 assert_trap(() => invoke($72, `test`, [67]), `uninitialized element`);
6437
6438 // ./test/core/table_copy.wast:3416
6439 assert_trap(() => invoke($72, `test`, [68]), `uninitialized element`);
6440
6441 // ./test/core/table_copy.wast:3417
6442 assert_trap(() => invoke($72, `test`, [69]), `uninitialized element`);
6443
6444 // ./test/core/table_copy.wast:3418
6445 assert_trap(() => invoke($72, `test`, [70]), `uninitialized element`);
6446
6447 // ./test/core/table_copy.wast:3419
6448 assert_trap(() => invoke($72, `test`, [71]), `uninitialized element`);
6449
6450 // ./test/core/table_copy.wast:3420
6451 assert_trap(() => invoke($72, `test`, [72]), `uninitialized element`);
6452
6453 // ./test/core/table_copy.wast:3421
6454 assert_trap(() => invoke($72, `test`, [73]), `uninitialized element`);
6455
6456 // ./test/core/table_copy.wast:3422
6457 assert_trap(() => invoke($72, `test`, [74]), `uninitialized element`);
6458
6459 // ./test/core/table_copy.wast:3423
6460 assert_trap(() => invoke($72, `test`, [75]), `uninitialized element`);
6461
6462 // ./test/core/table_copy.wast:3424
6463 assert_trap(() => invoke($72, `test`, [76]), `uninitialized element`);
6464
6465 // ./test/core/table_copy.wast:3425
6466 assert_trap(() => invoke($72, `test`, [77]), `uninitialized element`);
6467
6468 // ./test/core/table_copy.wast:3426
6469 assert_trap(() => invoke($72, `test`, [78]), `uninitialized element`);
6470
6471 // ./test/core/table_copy.wast:3427
6472 assert_trap(() => invoke($72, `test`, [79]), `uninitialized element`);
6473
6474 // ./test/core/table_copy.wast:3428
6475 assert_trap(() => invoke($72, `test`, [80]), `uninitialized element`);
6476
6477 // ./test/core/table_copy.wast:3429
6478 assert_trap(() => invoke($72, `test`, [81]), `uninitialized element`);
6479
6480 // ./test/core/table_copy.wast:3430
6481 assert_trap(() => invoke($72, `test`, [82]), `uninitialized element`);
6482
6483 // ./test/core/table_copy.wast:3431
6484 assert_trap(() => invoke($72, `test`, [83]), `uninitialized element`);
6485
6486 // ./test/core/table_copy.wast:3432
6487 assert_trap(() => invoke($72, `test`, [84]), `uninitialized element`);
6488
6489 // ./test/core/table_copy.wast:3433
6490 assert_trap(() => invoke($72, `test`, [85]), `uninitialized element`);
6491
6492 // ./test/core/table_copy.wast:3434
6493 assert_trap(() => invoke($72, `test`, [86]), `uninitialized element`);
6494
6495 // ./test/core/table_copy.wast:3435
6496 assert_trap(() => invoke($72, `test`, [87]), `uninitialized element`);
6497
6498 // ./test/core/table_copy.wast:3436
6499 assert_trap(() => invoke($72, `test`, [88]), `uninitialized element`);
6500
6501 // ./test/core/table_copy.wast:3437
6502 assert_trap(() => invoke($72, `test`, [89]), `uninitialized element`);
6503
6504 // ./test/core/table_copy.wast:3438
6505 assert_trap(() => invoke($72, `test`, [90]), `uninitialized element`);
6506
6507 // ./test/core/table_copy.wast:3439
6508 assert_trap(() => invoke($72, `test`, [91]), `uninitialized element`);
6509
6510 // ./test/core/table_copy.wast:3440
6511 assert_trap(() => invoke($72, `test`, [92]), `uninitialized element`);
6512
6513 // ./test/core/table_copy.wast:3441
6514 assert_trap(() => invoke($72, `test`, [93]), `uninitialized element`);
6515
6516 // ./test/core/table_copy.wast:3442
6517 assert_trap(() => invoke($72, `test`, [94]), `uninitialized element`);
6518
6519 // ./test/core/table_copy.wast:3443
6520 assert_trap(() => invoke($72, `test`, [95]), `uninitialized element`);
6521
6522 // ./test/core/table_copy.wast:3444
6523 assert_trap(() => invoke($72, `test`, [96]), `uninitialized element`);
6524
6525 // ./test/core/table_copy.wast:3445
6526 assert_trap(() => invoke($72, `test`, [97]), `uninitialized element`);
6527
6528 // ./test/core/table_copy.wast:3446
6529 assert_trap(() => invoke($72, `test`, [98]), `uninitialized element`);
6530
6531 // ./test/core/table_copy.wast:3447
6532 assert_trap(() => invoke($72, `test`, [99]), `uninitialized element`);
6533
6534 // ./test/core/table_copy.wast:3448
6535 assert_trap(() => invoke($72, `test`, [100]), `uninitialized element`);
6536
6537 // ./test/core/table_copy.wast:3449
6538 assert_trap(() => invoke($72, `test`, [101]), `uninitialized element`);
6539
6540 // ./test/core/table_copy.wast:3450
6541 assert_trap(() => invoke($72, `test`, [102]), `uninitialized element`);
6542
6543 // ./test/core/table_copy.wast:3451
6544 assert_trap(() => invoke($72, `test`, [103]), `uninitialized element`);
6545
6546 // ./test/core/table_copy.wast:3452
6547 assert_trap(() => invoke($72, `test`, [104]), `uninitialized element`);
6548
6549 // ./test/core/table_copy.wast:3453
6550 assert_trap(() => invoke($72, `test`, [105]), `uninitialized element`);
6551
6552 // ./test/core/table_copy.wast:3454
6553 assert_trap(() => invoke($72, `test`, [106]), `uninitialized element`);
6554
6555 // ./test/core/table_copy.wast:3455
6556 assert_trap(() => invoke($72, `test`, [107]), `uninitialized element`);
6557
6558 // ./test/core/table_copy.wast:3456
6559 assert_trap(() => invoke($72, `test`, [108]), `uninitialized element`);
6560
6561 // ./test/core/table_copy.wast:3457
6562 assert_trap(() => invoke($72, `test`, [109]), `uninitialized element`);
6563
6564 // ./test/core/table_copy.wast:3458
6565 assert_trap(() => invoke($72, `test`, [110]), `uninitialized element`);
6566
6567 // ./test/core/table_copy.wast:3459
6568 assert_trap(() => invoke($72, `test`, [111]), `uninitialized element`);
6569
6570 // ./test/core/table_copy.wast:3460
6571 assert_return(() => invoke($72, `test`, [112]), [value("i32", 0)]);
6572
6573 // ./test/core/table_copy.wast:3461
6574 assert_return(() => invoke($72, `test`, [113]), [value("i32", 1)]);
6575
6576 // ./test/core/table_copy.wast:3462
6577 assert_return(() => invoke($72, `test`, [114]), [value("i32", 2)]);
6578
6579 // ./test/core/table_copy.wast:3463
6580 assert_return(() => invoke($72, `test`, [115]), [value("i32", 3)]);
6581
6582 // ./test/core/table_copy.wast:3464
6583 assert_return(() => invoke($72, `test`, [116]), [value("i32", 4)]);
6584
6585 // ./test/core/table_copy.wast:3465
6586 assert_return(() => invoke($72, `test`, [117]), [value("i32", 5)]);
6587
6588 // ./test/core/table_copy.wast:3466
6589 assert_return(() => invoke($72, `test`, [118]), [value("i32", 6)]);
6590
6591 // ./test/core/table_copy.wast:3467
6592 assert_return(() => invoke($72, `test`, [119]), [value("i32", 7)]);
6593
6594 // ./test/core/table_copy.wast:3468
6595 assert_return(() => invoke($72, `test`, [120]), [value("i32", 8)]);
6596
6597 // ./test/core/table_copy.wast:3469
6598 assert_return(() => invoke($72, `test`, [121]), [value("i32", 9)]);
6599
6600 // ./test/core/table_copy.wast:3470
6601 assert_return(() => invoke($72, `test`, [122]), [value("i32", 10)]);
6602
6603 // ./test/core/table_copy.wast:3471
6604 assert_return(() => invoke($72, `test`, [123]), [value("i32", 11)]);
6605
6606 // ./test/core/table_copy.wast:3472
6607 assert_return(() => invoke($72, `test`, [124]), [value("i32", 12)]);
6608
6609 // ./test/core/table_copy.wast:3473
6610 assert_return(() => invoke($72, `test`, [125]), [value("i32", 13)]);
6611
6612 // ./test/core/table_copy.wast:3474
6613 assert_return(() => invoke($72, `test`, [126]), [value("i32", 14)]);
6614
6615 // ./test/core/table_copy.wast:3475
6616 assert_return(() => invoke($72, `test`, [127]), [value("i32", 15)]);
6617
6618 // ./test/core/table_copy.wast:3477
6619 let $73 = instantiate(`(module
6620 (type (func (result i32)))
6621 (table 128 128 funcref)
6622 (elem (i32.const 0)
6623 $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8 $$f9 $$f10 $$f11 $$f12 $$f13 $$f14 $$f15)
6624 (func $$f0 (export "f0") (result i32) (i32.const 0))
6625 (func $$f1 (export "f1") (result i32) (i32.const 1))
6626 (func $$f2 (export "f2") (result i32) (i32.const 2))
6627 (func $$f3 (export "f3") (result i32) (i32.const 3))
6628 (func $$f4 (export "f4") (result i32) (i32.const 4))
6629 (func $$f5 (export "f5") (result i32) (i32.const 5))
6630 (func $$f6 (export "f6") (result i32) (i32.const 6))
6631 (func $$f7 (export "f7") (result i32) (i32.const 7))
6632 (func $$f8 (export "f8") (result i32) (i32.const 8))
6633 (func $$f9 (export "f9") (result i32) (i32.const 9))
6634 (func $$f10 (export "f10") (result i32) (i32.const 10))
6635 (func $$f11 (export "f11") (result i32) (i32.const 11))
6636 (func $$f12 (export "f12") (result i32) (i32.const 12))
6637 (func $$f13 (export "f13") (result i32) (i32.const 13))
6638 (func $$f14 (export "f14") (result i32) (i32.const 14))
6639 (func $$f15 (export "f15") (result i32) (i32.const 15))
6640 (func (export "test") (param $$n i32) (result i32)
6641 (call_indirect (type 0) (local.get $$n)))
6642 (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32)
6643 (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`);
6644
6645 // ./test/core/table_copy.wast:3503
6646 assert_trap(() => invoke($73, `run`, [112, 0, -32]), `out of bounds table access`);
6647
6648 // ./test/core/table_copy.wast:3505
6649 assert_return(() => invoke($73, `test`, [0]), [value("i32", 0)]);
6650
6651 // ./test/core/table_copy.wast:3506
6652 assert_return(() => invoke($73, `test`, [1]), [value("i32", 1)]);
6653
6654 // ./test/core/table_copy.wast:3507
6655 assert_return(() => invoke($73, `test`, [2]), [value("i32", 2)]);
6656
6657 // ./test/core/table_copy.wast:3508
6658 assert_return(() => invoke($73, `test`, [3]), [value("i32", 3)]);
6659
6660 // ./test/core/table_copy.wast:3509
6661 assert_return(() => invoke($73, `test`, [4]), [value("i32", 4)]);
6662
6663 // ./test/core/table_copy.wast:3510
6664 assert_return(() => invoke($73, `test`, [5]), [value("i32", 5)]);
6665
6666 // ./test/core/table_copy.wast:3511
6667 assert_return(() => invoke($73, `test`, [6]), [value("i32", 6)]);
6668
6669 // ./test/core/table_copy.wast:3512
6670 assert_return(() => invoke($73, `test`, [7]), [value("i32", 7)]);
6671
6672 // ./test/core/table_copy.wast:3513
6673 assert_return(() => invoke($73, `test`, [8]), [value("i32", 8)]);
6674
6675 // ./test/core/table_copy.wast:3514
6676 assert_return(() => invoke($73, `test`, [9]), [value("i32", 9)]);
6677
6678 // ./test/core/table_copy.wast:3515
6679 assert_return(() => invoke($73, `test`, [10]), [value("i32", 10)]);
6680
6681 // ./test/core/table_copy.wast:3516
6682 assert_return(() => invoke($73, `test`, [11]), [value("i32", 11)]);
6683
6684 // ./test/core/table_copy.wast:3517
6685 assert_return(() => invoke($73, `test`, [12]), [value("i32", 12)]);
6686
6687 // ./test/core/table_copy.wast:3518
6688 assert_return(() => invoke($73, `test`, [13]), [value("i32", 13)]);
6689
6690 // ./test/core/table_copy.wast:3519
6691 assert_return(() => invoke($73, `test`, [14]), [value("i32", 14)]);
6692
6693 // ./test/core/table_copy.wast:3520
6694 assert_return(() => invoke($73, `test`, [15]), [value("i32", 15)]);
6695
6696 // ./test/core/table_copy.wast:3521
6697 assert_trap(() => invoke($73, `test`, [16]), `uninitialized element`);
6698
6699 // ./test/core/table_copy.wast:3522
6700 assert_trap(() => invoke($73, `test`, [17]), `uninitialized element`);
6701
6702 // ./test/core/table_copy.wast:3523
6703 assert_trap(() => invoke($73, `test`, [18]), `uninitialized element`);
6704
6705 // ./test/core/table_copy.wast:3524
6706 assert_trap(() => invoke($73, `test`, [19]), `uninitialized element`);
6707
6708 // ./test/core/table_copy.wast:3525
6709 assert_trap(() => invoke($73, `test`, [20]), `uninitialized element`);
6710
6711 // ./test/core/table_copy.wast:3526
6712 assert_trap(() => invoke($73, `test`, [21]), `uninitialized element`);
6713
6714 // ./test/core/table_copy.wast:3527
6715 assert_trap(() => invoke($73, `test`, [22]), `uninitialized element`);
6716
6717 // ./test/core/table_copy.wast:3528
6718 assert_trap(() => invoke($73, `test`, [23]), `uninitialized element`);
6719
6720 // ./test/core/table_copy.wast:3529
6721 assert_trap(() => invoke($73, `test`, [24]), `uninitialized element`);
6722
6723 // ./test/core/table_copy.wast:3530
6724 assert_trap(() => invoke($73, `test`, [25]), `uninitialized element`);
6725
6726 // ./test/core/table_copy.wast:3531
6727 assert_trap(() => invoke($73, `test`, [26]), `uninitialized element`);
6728
6729 // ./test/core/table_copy.wast:3532
6730 assert_trap(() => invoke($73, `test`, [27]), `uninitialized element`);
6731
6732 // ./test/core/table_copy.wast:3533
6733 assert_trap(() => invoke($73, `test`, [28]), `uninitialized element`);
6734
6735 // ./test/core/table_copy.wast:3534
6736 assert_trap(() => invoke($73, `test`, [29]), `uninitialized element`);
6737
6738 // ./test/core/table_copy.wast:3535
6739 assert_trap(() => invoke($73, `test`, [30]), `uninitialized element`);
6740
6741 // ./test/core/table_copy.wast:3536
6742 assert_trap(() => invoke($73, `test`, [31]), `uninitialized element`);
6743
6744 // ./test/core/table_copy.wast:3537
6745 assert_trap(() => invoke($73, `test`, [32]), `uninitialized element`);
6746
6747 // ./test/core/table_copy.wast:3538
6748 assert_trap(() => invoke($73, `test`, [33]), `uninitialized element`);
6749
6750 // ./test/core/table_copy.wast:3539
6751 assert_trap(() => invoke($73, `test`, [34]), `uninitialized element`);
6752
6753 // ./test/core/table_copy.wast:3540
6754 assert_trap(() => invoke($73, `test`, [35]), `uninitialized element`);
6755
6756 // ./test/core/table_copy.wast:3541
6757 assert_trap(() => invoke($73, `test`, [36]), `uninitialized element`);
6758
6759 // ./test/core/table_copy.wast:3542
6760 assert_trap(() => invoke($73, `test`, [37]), `uninitialized element`);
6761
6762 // ./test/core/table_copy.wast:3543
6763 assert_trap(() => invoke($73, `test`, [38]), `uninitialized element`);
6764
6765 // ./test/core/table_copy.wast:3544
6766 assert_trap(() => invoke($73, `test`, [39]), `uninitialized element`);
6767
6768 // ./test/core/table_copy.wast:3545
6769 assert_trap(() => invoke($73, `test`, [40]), `uninitialized element`);
6770
6771 // ./test/core/table_copy.wast:3546
6772 assert_trap(() => invoke($73, `test`, [41]), `uninitialized element`);
6773
6774 // ./test/core/table_copy.wast:3547
6775 assert_trap(() => invoke($73, `test`, [42]), `uninitialized element`);
6776
6777 // ./test/core/table_copy.wast:3548
6778 assert_trap(() => invoke($73, `test`, [43]), `uninitialized element`);
6779
6780 // ./test/core/table_copy.wast:3549
6781 assert_trap(() => invoke($73, `test`, [44]), `uninitialized element`);
6782
6783 // ./test/core/table_copy.wast:3550
6784 assert_trap(() => invoke($73, `test`, [45]), `uninitialized element`);
6785
6786 // ./test/core/table_copy.wast:3551
6787 assert_trap(() => invoke($73, `test`, [46]), `uninitialized element`);
6788
6789 // ./test/core/table_copy.wast:3552
6790 assert_trap(() => invoke($73, `test`, [47]), `uninitialized element`);
6791
6792 // ./test/core/table_copy.wast:3553
6793 assert_trap(() => invoke($73, `test`, [48]), `uninitialized element`);
6794
6795 // ./test/core/table_copy.wast:3554
6796 assert_trap(() => invoke($73, `test`, [49]), `uninitialized element`);
6797
6798 // ./test/core/table_copy.wast:3555
6799 assert_trap(() => invoke($73, `test`, [50]), `uninitialized element`);
6800
6801 // ./test/core/table_copy.wast:3556
6802 assert_trap(() => invoke($73, `test`, [51]), `uninitialized element`);
6803
6804 // ./test/core/table_copy.wast:3557
6805 assert_trap(() => invoke($73, `test`, [52]), `uninitialized element`);
6806
6807 // ./test/core/table_copy.wast:3558
6808 assert_trap(() => invoke($73, `test`, [53]), `uninitialized element`);
6809
6810 // ./test/core/table_copy.wast:3559
6811 assert_trap(() => invoke($73, `test`, [54]), `uninitialized element`);
6812
6813 // ./test/core/table_copy.wast:3560
6814 assert_trap(() => invoke($73, `test`, [55]), `uninitialized element`);
6815
6816 // ./test/core/table_copy.wast:3561
6817 assert_trap(() => invoke($73, `test`, [56]), `uninitialized element`);
6818
6819 // ./test/core/table_copy.wast:3562
6820 assert_trap(() => invoke($73, `test`, [57]), `uninitialized element`);
6821
6822 // ./test/core/table_copy.wast:3563
6823 assert_trap(() => invoke($73, `test`, [58]), `uninitialized element`);
6824
6825 // ./test/core/table_copy.wast:3564
6826 assert_trap(() => invoke($73, `test`, [59]), `uninitialized element`);
6827
6828 // ./test/core/table_copy.wast:3565
6829 assert_trap(() => invoke($73, `test`, [60]), `uninitialized element`);
6830
6831 // ./test/core/table_copy.wast:3566
6832 assert_trap(() => invoke($73, `test`, [61]), `uninitialized element`);
6833
6834 // ./test/core/table_copy.wast:3567
6835 assert_trap(() => invoke($73, `test`, [62]), `uninitialized element`);
6836
6837 // ./test/core/table_copy.wast:3568
6838 assert_trap(() => invoke($73, `test`, [63]), `uninitialized element`);
6839
6840 // ./test/core/table_copy.wast:3569
6841 assert_trap(() => invoke($73, `test`, [64]), `uninitialized element`);
6842
6843 // ./test/core/table_copy.wast:3570
6844 assert_trap(() => invoke($73, `test`, [65]), `uninitialized element`);
6845
6846 // ./test/core/table_copy.wast:3571
6847 assert_trap(() => invoke($73, `test`, [66]), `uninitialized element`);
6848
6849 // ./test/core/table_copy.wast:3572
6850 assert_trap(() => invoke($73, `test`, [67]), `uninitialized element`);
6851
6852 // ./test/core/table_copy.wast:3573
6853 assert_trap(() => invoke($73, `test`, [68]), `uninitialized element`);
6854
6855 // ./test/core/table_copy.wast:3574
6856 assert_trap(() => invoke($73, `test`, [69]), `uninitialized element`);
6857
6858 // ./test/core/table_copy.wast:3575
6859 assert_trap(() => invoke($73, `test`, [70]), `uninitialized element`);
6860
6861 // ./test/core/table_copy.wast:3576
6862 assert_trap(() => invoke($73, `test`, [71]), `uninitialized element`);
6863
6864 // ./test/core/table_copy.wast:3577
6865 assert_trap(() => invoke($73, `test`, [72]), `uninitialized element`);
6866
6867 // ./test/core/table_copy.wast:3578
6868 assert_trap(() => invoke($73, `test`, [73]), `uninitialized element`);
6869
6870 // ./test/core/table_copy.wast:3579
6871 assert_trap(() => invoke($73, `test`, [74]), `uninitialized element`);
6872
6873 // ./test/core/table_copy.wast:3580
6874 assert_trap(() => invoke($73, `test`, [75]), `uninitialized element`);
6875
6876 // ./test/core/table_copy.wast:3581
6877 assert_trap(() => invoke($73, `test`, [76]), `uninitialized element`);
6878
6879 // ./test/core/table_copy.wast:3582
6880 assert_trap(() => invoke($73, `test`, [77]), `uninitialized element`);
6881
6882 // ./test/core/table_copy.wast:3583
6883 assert_trap(() => invoke($73, `test`, [78]), `uninitialized element`);
6884
6885 // ./test/core/table_copy.wast:3584
6886 assert_trap(() => invoke($73, `test`, [79]), `uninitialized element`);
6887
6888 // ./test/core/table_copy.wast:3585
6889 assert_trap(() => invoke($73, `test`, [80]), `uninitialized element`);
6890
6891 // ./test/core/table_copy.wast:3586
6892 assert_trap(() => invoke($73, `test`, [81]), `uninitialized element`);
6893
6894 // ./test/core/table_copy.wast:3587
6895 assert_trap(() => invoke($73, `test`, [82]), `uninitialized element`);
6896
6897 // ./test/core/table_copy.wast:3588
6898 assert_trap(() => invoke($73, `test`, [83]), `uninitialized element`);
6899
6900 // ./test/core/table_copy.wast:3589
6901 assert_trap(() => invoke($73, `test`, [84]), `uninitialized element`);
6902
6903 // ./test/core/table_copy.wast:3590
6904 assert_trap(() => invoke($73, `test`, [85]), `uninitialized element`);
6905
6906 // ./test/core/table_copy.wast:3591
6907 assert_trap(() => invoke($73, `test`, [86]), `uninitialized element`);
6908
6909 // ./test/core/table_copy.wast:3592
6910 assert_trap(() => invoke($73, `test`, [87]), `uninitialized element`);
6911
6912 // ./test/core/table_copy.wast:3593
6913 assert_trap(() => invoke($73, `test`, [88]), `uninitialized element`);
6914
6915 // ./test/core/table_copy.wast:3594
6916 assert_trap(() => invoke($73, `test`, [89]), `uninitialized element`);
6917
6918 // ./test/core/table_copy.wast:3595
6919 assert_trap(() => invoke($73, `test`, [90]), `uninitialized element`);
6920
6921 // ./test/core/table_copy.wast:3596
6922 assert_trap(() => invoke($73, `test`, [91]), `uninitialized element`);
6923
6924 // ./test/core/table_copy.wast:3597
6925 assert_trap(() => invoke($73, `test`, [92]), `uninitialized element`);
6926
6927 // ./test/core/table_copy.wast:3598
6928 assert_trap(() => invoke($73, `test`, [93]), `uninitialized element`);
6929
6930 // ./test/core/table_copy.wast:3599
6931 assert_trap(() => invoke($73, `test`, [94]), `uninitialized element`);
6932
6933 // ./test/core/table_copy.wast:3600
6934 assert_trap(() => invoke($73, `test`, [95]), `uninitialized element`);
6935
6936 // ./test/core/table_copy.wast:3601
6937 assert_trap(() => invoke($73, `test`, [96]), `uninitialized element`);
6938
6939 // ./test/core/table_copy.wast:3602
6940 assert_trap(() => invoke($73, `test`, [97]), `uninitialized element`);
6941
6942 // ./test/core/table_copy.wast:3603
6943 assert_trap(() => invoke($73, `test`, [98]), `uninitialized element`);
6944
6945 // ./test/core/table_copy.wast:3604
6946 assert_trap(() => invoke($73, `test`, [99]), `uninitialized element`);
6947
6948 // ./test/core/table_copy.wast:3605
6949 assert_trap(() => invoke($73, `test`, [100]), `uninitialized element`);
6950
6951 // ./test/core/table_copy.wast:3606
6952 assert_trap(() => invoke($73, `test`, [101]), `uninitialized element`);
6953
6954 // ./test/core/table_copy.wast:3607
6955 assert_trap(() => invoke($73, `test`, [102]), `uninitialized element`);
6956
6957 // ./test/core/table_copy.wast:3608
6958 assert_trap(() => invoke($73, `test`, [103]), `uninitialized element`);
6959
6960 // ./test/core/table_copy.wast:3609
6961 assert_trap(() => invoke($73, `test`, [104]), `uninitialized element`);
6962
6963 // ./test/core/table_copy.wast:3610
6964 assert_trap(() => invoke($73, `test`, [105]), `uninitialized element`);
6965
6966 // ./test/core/table_copy.wast:3611
6967 assert_trap(() => invoke($73, `test`, [106]), `uninitialized element`);
6968
6969 // ./test/core/table_copy.wast:3612
6970 assert_trap(() => invoke($73, `test`, [107]), `uninitialized element`);
6971
6972 // ./test/core/table_copy.wast:3613
6973 assert_trap(() => invoke($73, `test`, [108]), `uninitialized element`);
6974
6975 // ./test/core/table_copy.wast:3614
6976 assert_trap(() => invoke($73, `test`, [109]), `uninitialized element`);
6977
6978 // ./test/core/table_copy.wast:3615
6979 assert_trap(() => invoke($73, `test`, [110]), `uninitialized element`);
6980
6981 // ./test/core/table_copy.wast:3616
6982 assert_trap(() => invoke($73, `test`, [111]), `uninitialized element`);
6983
6984 // ./test/core/table_copy.wast:3617
6985 assert_trap(() => invoke($73, `test`, [112]), `uninitialized element`);
6986
6987 // ./test/core/table_copy.wast:3618
6988 assert_trap(() => invoke($73, `test`, [113]), `uninitialized element`);
6989
6990 // ./test/core/table_copy.wast:3619
6991 assert_trap(() => invoke($73, `test`, [114]), `uninitialized element`);
6992
6993 // ./test/core/table_copy.wast:3620
6994 assert_trap(() => invoke($73, `test`, [115]), `uninitialized element`);
6995
6996 // ./test/core/table_copy.wast:3621
6997 assert_trap(() => invoke($73, `test`, [116]), `uninitialized element`);
6998
6999 // ./test/core/table_copy.wast:3622
7000 assert_trap(() => invoke($73, `test`, [117]), `uninitialized element`);
7001
7002 // ./test/core/table_copy.wast:3623
7003 assert_trap(() => invoke($73, `test`, [118]), `uninitialized element`);
7004
7005 // ./test/core/table_copy.wast:3624
7006 assert_trap(() => invoke($73, `test`, [119]), `uninitialized element`);
7007
7008 // ./test/core/table_copy.wast:3625
7009 assert_trap(() => invoke($73, `test`, [120]), `uninitialized element`);
7010
7011 // ./test/core/table_copy.wast:3626
7012 assert_trap(() => invoke($73, `test`, [121]), `uninitialized element`);
7013
7014 // ./test/core/table_copy.wast:3627
7015 assert_trap(() => invoke($73, `test`, [122]), `uninitialized element`);
7016
7017 // ./test/core/table_copy.wast:3628
7018 assert_trap(() => invoke($73, `test`, [123]), `uninitialized element`);
7019
7020 // ./test/core/table_copy.wast:3629
7021 assert_trap(() => invoke($73, `test`, [124]), `uninitialized element`);
7022
7023 // ./test/core/table_copy.wast:3630
7024 assert_trap(() => invoke($73, `test`, [125]), `uninitialized element`);
7025
7026 // ./test/core/table_copy.wast:3631
7027 assert_trap(() => invoke($73, `test`, [126]), `uninitialized element`);
7028
7029 // ./test/core/table_copy.wast:3632
7030 assert_trap(() => invoke($73, `test`, [127]), `uninitialized element`);