| 1 |
{ |
| 2 |
"source_filename": "tests/cli/gc/type-subtyping.wast", |
| 3 |
"commands": [ |
| 4 |
{ |
| 5 |
"type": "module", |
| 6 |
"line": 5, |
| 7 |
"filename": "type-subtyping.0.wasm", |
| 8 |
"module_type": "binary" |
| 9 |
}, |
| 10 |
{ |
| 11 |
"type": "module", |
| 12 |
"line": 17, |
| 13 |
"filename": "type-subtyping.1.wasm", |
| 14 |
"module_type": "binary" |
| 15 |
}, |
| 16 |
{ |
| 17 |
"type": "module", |
| 18 |
"line": 26, |
| 19 |
"filename": "type-subtyping.2.wasm", |
| 20 |
"module_type": "binary" |
| 21 |
}, |
| 22 |
{ |
| 23 |
"type": "module", |
| 24 |
"line": 39, |
| 25 |
"filename": "type-subtyping.3.wasm", |
| 26 |
"module_type": "binary" |
| 27 |
}, |
| 28 |
{ |
| 29 |
"type": "module", |
| 30 |
"line": 45, |
| 31 |
"filename": "type-subtyping.4.wasm", |
| 32 |
"module_type": "binary" |
| 33 |
}, |
| 34 |
{ |
| 35 |
"type": "module", |
| 36 |
"line": 55, |
| 37 |
"filename": "type-subtyping.5.wasm", |
| 38 |
"module_type": "binary" |
| 39 |
}, |
| 40 |
{ |
| 41 |
"type": "module", |
| 42 |
"line": 70, |
| 43 |
"filename": "type-subtyping.6.wasm", |
| 44 |
"module_type": "binary" |
| 45 |
}, |
| 46 |
{ |
| 47 |
"type": "module", |
| 48 |
"line": 91, |
| 49 |
"filename": "type-subtyping.7.wasm", |
| 50 |
"module_type": "binary" |
| 51 |
}, |
| 52 |
{ |
| 53 |
"type": "module", |
| 54 |
"line": 117, |
| 55 |
"filename": "type-subtyping.8.wasm", |
| 56 |
"module_type": "binary" |
| 57 |
}, |
| 58 |
{ |
| 59 |
"type": "module", |
| 60 |
"line": 126, |
| 61 |
"filename": "type-subtyping.9.wasm", |
| 62 |
"module_type": "binary" |
| 63 |
}, |
| 64 |
{ |
| 65 |
"type": "assert_invalid", |
| 66 |
"line": 142, |
| 67 |
"filename": "type-subtyping.10.wasm", |
| 68 |
"module_type": "binary", |
| 69 |
"text": "type mismatch" |
| 70 |
}, |
| 71 |
{ |
| 72 |
"type": "module", |
| 73 |
"line": 153, |
| 74 |
"filename": "type-subtyping.11.wasm", |
| 75 |
"module_type": "binary" |
| 76 |
}, |
| 77 |
{ |
| 78 |
"type": "module", |
| 79 |
"line": 161, |
| 80 |
"filename": "type-subtyping.12.wasm", |
| 81 |
"module_type": "binary" |
| 82 |
}, |
| 83 |
{ |
| 84 |
"type": "module", |
| 85 |
"line": 179, |
| 86 |
"filename": "type-subtyping.13.wasm", |
| 87 |
"module_type": "binary" |
| 88 |
}, |
| 89 |
{ |
| 90 |
"type": "module", |
| 91 |
"line": 190, |
| 92 |
"filename": "type-subtyping.14.wasm", |
| 93 |
"module_type": "binary" |
| 94 |
}, |
| 95 |
{ |
| 96 |
"type": "assert_invalid", |
| 97 |
"line": 208, |
| 98 |
"filename": "type-subtyping.15.wasm", |
| 99 |
"module_type": "binary", |
| 100 |
"text": "type mismatch" |
| 101 |
}, |
| 102 |
{ |
| 103 |
"type": "assert_invalid", |
| 104 |
"line": 218, |
| 105 |
"filename": "type-subtyping.16.wasm", |
| 106 |
"module_type": "binary", |
| 107 |
"text": "type mismatch" |
| 108 |
}, |
| 109 |
{ |
| 110 |
"type": "module", |
| 111 |
"line": 231, |
| 112 |
"filename": "type-subtyping.17.wasm", |
| 113 |
"module_type": "binary" |
| 114 |
}, |
| 115 |
{ |
| 116 |
"type": "assert_return", |
| 117 |
"line": 284, |
| 118 |
"action": { |
| 119 |
"type": "invoke", |
| 120 |
"field": "run", |
| 121 |
"args": [] |
| 122 |
}, |
| 123 |
"expected": [] |
| 124 |
}, |
| 125 |
{ |
| 126 |
"type": "assert_trap", |
| 127 |
"line": 285, |
| 128 |
"action": { |
| 129 |
"type": "invoke", |
| 130 |
"field": "fail1", |
| 131 |
"args": [] |
| 132 |
}, |
| 133 |
"text": "indirect call" |
| 134 |
}, |
| 135 |
{ |
| 136 |
"type": "assert_trap", |
| 137 |
"line": 286, |
| 138 |
"action": { |
| 139 |
"type": "invoke", |
| 140 |
"field": "fail2", |
| 141 |
"args": [] |
| 142 |
}, |
| 143 |
"text": "indirect call" |
| 144 |
}, |
| 145 |
{ |
| 146 |
"type": "assert_trap", |
| 147 |
"line": 287, |
| 148 |
"action": { |
| 149 |
"type": "invoke", |
| 150 |
"field": "fail3", |
| 151 |
"args": [] |
| 152 |
}, |
| 153 |
"text": "indirect call" |
| 154 |
}, |
| 155 |
{ |
| 156 |
"type": "assert_trap", |
| 157 |
"line": 288, |
| 158 |
"action": { |
| 159 |
"type": "invoke", |
| 160 |
"field": "fail4", |
| 161 |
"args": [] |
| 162 |
}, |
| 163 |
"text": "cast" |
| 164 |
}, |
| 165 |
{ |
| 166 |
"type": "assert_trap", |
| 167 |
"line": 289, |
| 168 |
"action": { |
| 169 |
"type": "invoke", |
| 170 |
"field": "fail5", |
| 171 |
"args": [] |
| 172 |
}, |
| 173 |
"text": "cast" |
| 174 |
}, |
| 175 |
{ |
| 176 |
"type": "assert_trap", |
| 177 |
"line": 290, |
| 178 |
"action": { |
| 179 |
"type": "invoke", |
| 180 |
"field": "fail6", |
| 181 |
"args": [] |
| 182 |
}, |
| 183 |
"text": "cast" |
| 184 |
}, |
| 185 |
{ |
| 186 |
"type": "module", |
| 187 |
"line": 292, |
| 188 |
"filename": "type-subtyping.18.wasm", |
| 189 |
"module_type": "binary" |
| 190 |
}, |
| 191 |
{ |
| 192 |
"type": "assert_trap", |
| 193 |
"line": 316, |
| 194 |
"action": { |
| 195 |
"type": "invoke", |
| 196 |
"field": "fail1", |
| 197 |
"args": [] |
| 198 |
}, |
| 199 |
"text": "indirect call" |
| 200 |
}, |
| 201 |
{ |
| 202 |
"type": "assert_trap", |
| 203 |
"line": 317, |
| 204 |
"action": { |
| 205 |
"type": "invoke", |
| 206 |
"field": "fail2", |
| 207 |
"args": [] |
| 208 |
}, |
| 209 |
"text": "indirect call" |
| 210 |
}, |
| 211 |
{ |
| 212 |
"type": "assert_trap", |
| 213 |
"line": 318, |
| 214 |
"action": { |
| 215 |
"type": "invoke", |
| 216 |
"field": "fail3", |
| 217 |
"args": [] |
| 218 |
}, |
| 219 |
"text": "cast" |
| 220 |
}, |
| 221 |
{ |
| 222 |
"type": "assert_trap", |
| 223 |
"line": 319, |
| 224 |
"action": { |
| 225 |
"type": "invoke", |
| 226 |
"field": "fail4", |
| 227 |
"args": [] |
| 228 |
}, |
| 229 |
"text": "cast" |
| 230 |
}, |
| 231 |
{ |
| 232 |
"type": "module", |
| 233 |
"line": 322, |
| 234 |
"filename": "type-subtyping.19.wasm", |
| 235 |
"module_type": "binary" |
| 236 |
}, |
| 237 |
{ |
| 238 |
"type": "assert_return", |
| 239 |
"line": 332, |
| 240 |
"action": { |
| 241 |
"type": "invoke", |
| 242 |
"field": "run", |
| 243 |
"args": [] |
| 244 |
}, |
| 245 |
"expected": [ |
| 246 |
{ |
| 247 |
"type": "i32", |
| 248 |
"value": "1" |
| 249 |
} |
| 250 |
] |
| 251 |
}, |
| 252 |
{ |
| 253 |
"type": "module", |
| 254 |
"line": 334, |
| 255 |
"filename": "type-subtyping.20.wasm", |
| 256 |
"module_type": "binary" |
| 257 |
}, |
| 258 |
{ |
| 259 |
"type": "assert_return", |
| 260 |
"line": 350, |
| 261 |
"action": { |
| 262 |
"type": "invoke", |
| 263 |
"field": "run", |
| 264 |
"args": [] |
| 265 |
}, |
| 266 |
"expected": [ |
| 267 |
{ |
| 268 |
"type": "i32", |
| 269 |
"value": "1" |
| 270 |
} |
| 271 |
] |
| 272 |
}, |
| 273 |
{ |
| 274 |
"type": "module", |
| 275 |
"line": 396, |
| 276 |
"filename": "type-subtyping.21.wasm", |
| 277 |
"module_type": "binary" |
| 278 |
}, |
| 279 |
{ |
| 280 |
"type": "assert_return", |
| 281 |
"line": 408, |
| 282 |
"action": { |
| 283 |
"type": "invoke", |
| 284 |
"field": "run", |
| 285 |
"args": [] |
| 286 |
}, |
| 287 |
"expected": [ |
| 288 |
{ |
| 289 |
"type": "i32", |
| 290 |
"value": "1" |
| 291 |
}, |
| 292 |
{ |
| 293 |
"type": "i32", |
| 294 |
"value": "1" |
| 295 |
}, |
| 296 |
{ |
| 297 |
"type": "i32", |
| 298 |
"value": "1" |
| 299 |
}, |
| 300 |
{ |
| 301 |
"type": "i32", |
| 302 |
"value": "1" |
| 303 |
} |
| 304 |
] |
| 305 |
}, |
| 306 |
{ |
| 307 |
"type": "module", |
| 308 |
"line": 460, |
| 309 |
"filename": "type-subtyping.22.wasm", |
| 310 |
"module_type": "binary" |
| 311 |
}, |
| 312 |
{ |
| 313 |
"type": "register", |
| 314 |
"line": 469, |
| 315 |
"as": "M" |
| 316 |
}, |
| 317 |
{ |
| 318 |
"type": "module", |
| 319 |
"line": 471, |
| 320 |
"filename": "type-subtyping.23.wasm", |
| 321 |
"module_type": "binary" |
| 322 |
}, |
| 323 |
{ |
| 324 |
"type": "assert_unlinkable", |
| 325 |
"line": 485, |
| 326 |
"filename": "type-subtyping.24.wasm", |
| 327 |
"module_type": "binary", |
| 328 |
"text": "incompatible import type" |
| 329 |
}, |
| 330 |
{ |
| 331 |
"type": "assert_unlinkable", |
| 332 |
"line": 495, |
| 333 |
"filename": "type-subtyping.25.wasm", |
| 334 |
"module_type": "binary", |
| 335 |
"text": "incompatible import type" |
| 336 |
}, |
| 337 |
{ |
| 338 |
"type": "assert_unlinkable", |
| 339 |
"line": 505, |
| 340 |
"filename": "type-subtyping.26.wasm", |
| 341 |
"module_type": "binary", |
| 342 |
"text": "incompatible import type" |
| 343 |
}, |
| 344 |
{ |
| 345 |
"type": "module", |
| 346 |
"line": 514, |
| 347 |
"filename": "type-subtyping.27.wasm", |
| 348 |
"module_type": "binary" |
| 349 |
}, |
| 350 |
{ |
| 351 |
"type": "register", |
| 352 |
"line": 520, |
| 353 |
"as": "M2" |
| 354 |
}, |
| 355 |
{ |
| 356 |
"type": "assert_unlinkable", |
| 357 |
"line": 523, |
| 358 |
"filename": "type-subtyping.28.wasm", |
| 359 |
"module_type": "binary", |
| 360 |
"text": "incompatible import type" |
| 361 |
}, |
| 362 |
{ |
| 363 |
"type": "assert_unlinkable", |
| 364 |
"line": 531, |
| 365 |
"filename": "type-subtyping.29.wasm", |
| 366 |
"module_type": "binary", |
| 367 |
"text": "incompatible import type" |
| 368 |
}, |
| 369 |
{ |
| 370 |
"type": "module", |
| 371 |
"line": 540, |
| 372 |
"filename": "type-subtyping.30.wasm", |
| 373 |
"module_type": "binary" |
| 374 |
}, |
| 375 |
{ |
| 376 |
"type": "register", |
| 377 |
"line": 545, |
| 378 |
"as": "M3" |
| 379 |
}, |
| 380 |
{ |
| 381 |
"type": "module", |
| 382 |
"line": 546, |
| 383 |
"filename": "type-subtyping.31.wasm", |
| 384 |
"module_type": "binary" |
| 385 |
}, |
| 386 |
{ |
| 387 |
"type": "module", |
| 388 |
"line": 552, |
| 389 |
"filename": "type-subtyping.32.wasm", |
| 390 |
"module_type": "binary" |
| 391 |
}, |
| 392 |
{ |
| 393 |
"type": "register", |
| 394 |
"line": 561, |
| 395 |
"as": "M4" |
| 396 |
}, |
| 397 |
{ |
| 398 |
"type": "module", |
| 399 |
"line": 562, |
| 400 |
"filename": "type-subtyping.33.wasm", |
| 401 |
"module_type": "binary" |
| 402 |
}, |
| 403 |
{ |
| 404 |
"type": "module", |
| 405 |
"line": 572, |
| 406 |
"filename": "type-subtyping.34.wasm", |
| 407 |
"module_type": "binary" |
| 408 |
}, |
| 409 |
{ |
| 410 |
"type": "register", |
| 411 |
"line": 578, |
| 412 |
"as": "M5" |
| 413 |
}, |
| 414 |
{ |
| 415 |
"type": "assert_unlinkable", |
| 416 |
"line": 580, |
| 417 |
"filename": "type-subtyping.35.wasm", |
| 418 |
"module_type": "binary", |
| 419 |
"text": "incompatible import" |
| 420 |
}, |
| 421 |
{ |
| 422 |
"type": "module", |
| 423 |
"line": 588, |
| 424 |
"filename": "type-subtyping.36.wasm", |
| 425 |
"module_type": "binary" |
| 426 |
}, |
| 427 |
{ |
| 428 |
"type": "register", |
| 429 |
"line": 594, |
| 430 |
"as": "M6" |
| 431 |
}, |
| 432 |
{ |
| 433 |
"type": "module", |
| 434 |
"line": 595, |
| 435 |
"filename": "type-subtyping.37.wasm", |
| 436 |
"module_type": "binary" |
| 437 |
}, |
| 438 |
{ |
| 439 |
"type": "module", |
| 440 |
"line": 602, |
| 441 |
"filename": "type-subtyping.38.wasm", |
| 442 |
"module_type": "binary" |
| 443 |
}, |
| 444 |
{ |
| 445 |
"type": "register", |
| 446 |
"line": 612, |
| 447 |
"as": "M7" |
| 448 |
}, |
| 449 |
{ |
| 450 |
"type": "module", |
| 451 |
"line": 613, |
| 452 |
"filename": "type-subtyping.39.wasm", |
| 453 |
"module_type": "binary" |
| 454 |
}, |
| 455 |
{ |
| 456 |
"type": "module", |
| 457 |
"line": 626, |
| 458 |
"filename": "type-subtyping.40.wasm", |
| 459 |
"module_type": "binary" |
| 460 |
}, |
| 461 |
{ |
| 462 |
"type": "register", |
| 463 |
"line": 632, |
| 464 |
"as": "M8" |
| 465 |
}, |
| 466 |
{ |
| 467 |
"type": "module", |
| 468 |
"line": 633, |
| 469 |
"filename": "type-subtyping.41.wasm", |
| 470 |
"module_type": "binary" |
| 471 |
}, |
| 472 |
{ |
| 473 |
"type": "module", |
| 474 |
"line": 642, |
| 475 |
"filename": "type-subtyping.42.wasm", |
| 476 |
"module_type": "binary" |
| 477 |
}, |
| 478 |
{ |
| 479 |
"type": "register", |
| 480 |
"line": 650, |
| 481 |
"as": "M9" |
| 482 |
}, |
| 483 |
{ |
| 484 |
"type": "module", |
| 485 |
"line": 651, |
| 486 |
"filename": "type-subtyping.43.wasm", |
| 487 |
"module_type": "binary" |
| 488 |
}, |
| 489 |
{ |
| 490 |
"type": "module", |
| 491 |
"line": 666, |
| 492 |
"filename": "type-subtyping.44.wasm", |
| 493 |
"module_type": "binary" |
| 494 |
}, |
| 495 |
{ |
| 496 |
"type": "register", |
| 497 |
"line": 671, |
| 498 |
"as": "M10" |
| 499 |
}, |
| 500 |
{ |
| 501 |
"type": "assert_unlinkable", |
| 502 |
"line": 673, |
| 503 |
"filename": "type-subtyping.45.wasm", |
| 504 |
"module_type": "binary", |
| 505 |
"text": "incompatible import" |
| 506 |
}, |
| 507 |
{ |
| 508 |
"type": "module", |
| 509 |
"line": 680, |
| 510 |
"filename": "type-subtyping.46.wasm", |
| 511 |
"module_type": "binary" |
| 512 |
}, |
| 513 |
{ |
| 514 |
"type": "register", |
| 515 |
"line": 686, |
| 516 |
"as": "M11" |
| 517 |
}, |
| 518 |
{ |
| 519 |
"type": "assert_unlinkable", |
| 520 |
"line": 688, |
| 521 |
"filename": "type-subtyping.47.wasm", |
| 522 |
"module_type": "binary", |
| 523 |
"text": "incompatible import" |
| 524 |
}, |
| 525 |
{ |
| 526 |
"type": "assert_invalid", |
| 527 |
"line": 701, |
| 528 |
"filename": "type-subtyping.48.wasm", |
| 529 |
"module_type": "binary", |
| 530 |
"text": "sub type" |
| 531 |
}, |
| 532 |
{ |
| 533 |
"type": "assert_invalid", |
| 534 |
"line": 709, |
| 535 |
"filename": "type-subtyping.49.wasm", |
| 536 |
"module_type": "binary", |
| 537 |
"text": "sub type" |
| 538 |
}, |
| 539 |
{ |
| 540 |
"type": "assert_invalid", |
| 541 |
"line": 717, |
| 542 |
"filename": "type-subtyping.50.wasm", |
| 543 |
"module_type": "binary", |
| 544 |
"text": "sub type" |
| 545 |
}, |
| 546 |
{ |
| 547 |
"type": "assert_invalid", |
| 548 |
"line": 725, |
| 549 |
"filename": "type-subtyping.51.wasm", |
| 550 |
"module_type": "binary", |
| 551 |
"text": "sub type" |
| 552 |
}, |
| 553 |
{ |
| 554 |
"type": "assert_invalid", |
| 555 |
"line": 738, |
| 556 |
"filename": "type-subtyping.52.wasm", |
| 557 |
"module_type": "binary", |
| 558 |
"text": "sub type" |
| 559 |
}, |
| 560 |
{ |
| 561 |
"type": "assert_invalid", |
| 562 |
"line": 746, |
| 563 |
"filename": "type-subtyping.53.wasm", |
| 564 |
"module_type": "binary", |
| 565 |
"text": "sub type" |
| 566 |
}, |
| 567 |
{ |
| 568 |
"type": "assert_invalid", |
| 569 |
"line": 754, |
| 570 |
"filename": "type-subtyping.54.wasm", |
| 571 |
"module_type": "binary", |
| 572 |
"text": "sub type" |
| 573 |
}, |
| 574 |
{ |
| 575 |
"type": "assert_invalid", |
| 576 |
"line": 762, |
| 577 |
"filename": "type-subtyping.55.wasm", |
| 578 |
"module_type": "binary", |
| 579 |
"text": "sub type" |
| 580 |
}, |
| 581 |
{ |
| 582 |
"type": "assert_invalid", |
| 583 |
"line": 770, |
| 584 |
"filename": "type-subtyping.56.wasm", |
| 585 |
"module_type": "binary", |
| 586 |
"text": "sub type" |
| 587 |
}, |
| 588 |
{ |
| 589 |
"type": "assert_invalid", |
| 590 |
"line": 778, |
| 591 |
"filename": "type-subtyping.57.wasm", |
| 592 |
"module_type": "binary", |
| 593 |
"text": "sub type" |
| 594 |
}, |
| 595 |
{ |
| 596 |
"type": "assert_invalid", |
| 597 |
"line": 786, |
| 598 |
"filename": "type-subtyping.58.wasm", |
| 599 |
"module_type": "binary", |
| 600 |
"text": "sub type" |
| 601 |
}, |
| 602 |
{ |
| 603 |
"type": "assert_invalid", |
| 604 |
"line": 794, |
| 605 |
"filename": "type-subtyping.59.wasm", |
| 606 |
"module_type": "binary", |
| 607 |
"text": "sub type" |
| 608 |
}, |
| 609 |
{ |
| 610 |
"type": "assert_invalid", |
| 611 |
"line": 802, |
| 612 |
"filename": "type-subtyping.60.wasm", |
| 613 |
"module_type": "binary", |
| 614 |
"text": "sub type" |
| 615 |
} |
| 616 |
] |
| 617 |
} |