|
427 | 427 |
|
428 | 428 | ;; If the ref.cast_desc is exact, then it doesn't need to transitively require |
429 | 429 | ;; any subtypings except that the cast destination is a subtype of the cast |
430 | | -;; source. TODO. |
| 430 | +;; source. |
431 | 431 | (module |
432 | 432 | (rec |
433 | 433 | ;; CHECK: (rec |
434 | 434 | ;; CHECK-NEXT: (type $top (sub (descriptor $top.desc (struct)))) |
435 | 435 | (type $top (sub (descriptor $top.desc (struct)))) |
436 | | - ;; CHECK: (type $bot (sub $top (descriptor $bot.desc (struct)))) |
| 436 | + ;; CHECK: (type $bot (sub (struct))) |
437 | 437 | (type $bot (sub $top (descriptor $bot.desc (struct)))) |
438 | 438 | ;; CHECK: (type $top.desc (sub (describes $top (struct)))) |
439 | 439 | (type $top.desc (sub (describes $top (struct)))) |
440 | | - ;; CHECK: (type $bot.desc (sub $top.desc (describes $bot (struct)))) |
441 | 440 | (type $bot.desc (sub $top.desc (describes $bot (struct)))) |
442 | 441 | ) |
443 | 442 |
|
444 | | - ;; CHECK: (type $4 (func (param anyref (ref (exact $top.desc))))) |
| 443 | + ;; CHECK: (type $3 (func (param anyref (ref (exact $top.desc))))) |
445 | 444 |
|
446 | | - ;; CHECK: (global $bot-sub-any anyref (struct.new_default $bot |
447 | | - ;; CHECK-NEXT: (struct.new_default $bot.desc) |
448 | | - ;; CHECK-NEXT: )) |
| 445 | + ;; CHECK: (global $bot-sub-any anyref (struct.new_default $bot)) |
449 | 446 | (global $bot-sub-any anyref (struct.new $bot (struct.new $bot.desc))) |
450 | 447 |
|
451 | | - ;; CHECK: (func $ref.cast_desc (type $4) (param $any anyref) (param $top.desc (ref (exact $top.desc))) |
| 448 | + ;; CHECK: (func $ref.cast_desc (type $3) (param $any anyref) (param $top.desc (ref (exact $top.desc))) |
452 | 449 | ;; CHECK-NEXT: (drop |
453 | 450 | ;; CHECK-NEXT: (ref.cast_desc (ref null (exact $top)) |
454 | 451 | ;; CHECK-NEXT: (local.get $any) |
|
513 | 510 |
|
514 | 511 | ;; If the br_on_cast_desc is exact, then it doesn't need to transitively require |
515 | 512 | ;; any subtypings except that the cast destination is a subtype of the cast |
516 | | -;; source. TODO. |
| 513 | +;; source. |
517 | 514 | (module |
518 | 515 | (rec |
519 | 516 | ;; CHECK: (rec |
520 | 517 | ;; CHECK-NEXT: (type $top (sub (descriptor $top.desc (struct)))) |
521 | 518 | (type $top (sub (descriptor $top.desc (struct)))) |
522 | | - ;; CHECK: (type $bot (sub $top (descriptor $bot.desc (struct)))) |
| 519 | + ;; CHECK: (type $bot (sub (struct))) |
523 | 520 | (type $bot (sub $top (descriptor $bot.desc (struct)))) |
524 | 521 | ;; CHECK: (type $top.desc (sub (describes $top (struct)))) |
525 | 522 | (type $top.desc (sub (describes $top (struct)))) |
526 | | - ;; CHECK: (type $bot.desc (sub $top.desc (describes $bot (struct)))) |
527 | 523 | (type $bot.desc (sub $top.desc (describes $bot (struct)))) |
528 | 524 | ) |
529 | 525 |
|
530 | | - ;; CHECK: (type $4 (func (param anyref (ref (exact $top.desc))))) |
| 526 | + ;; CHECK: (type $3 (func (param anyref (ref (exact $top.desc))))) |
531 | 527 |
|
532 | | - ;; CHECK: (global $bot-sub-any anyref (struct.new_default $bot |
533 | | - ;; CHECK-NEXT: (struct.new_default $bot.desc) |
534 | | - ;; CHECK-NEXT: )) |
| 528 | + ;; CHECK: (global $bot-sub-any anyref (struct.new_default $bot)) |
535 | 529 | (global $bot-sub-any anyref (struct.new $bot (struct.new $bot.desc))) |
536 | 530 |
|
537 | | - ;; CHECK: (func $br_on_cast_desc (type $4) (param $any anyref) (param $top.desc (ref (exact $top.desc))) |
| 531 | + ;; CHECK: (func $br_on_cast_desc (type $3) (param $any anyref) (param $top.desc (ref (exact $top.desc))) |
538 | 532 | ;; CHECK-NEXT: (drop |
539 | 533 | ;; CHECK-NEXT: (block $l (result anyref) |
540 | 534 | ;; CHECK-NEXT: (br_on_cast_desc $l anyref (ref null (exact $top)) |
|
603 | 597 |
|
604 | 598 | ;; If the br_on_cast_desc_fail is exact, then it doesn't need to transitively |
605 | 599 | ;; require any subtypings except that the cast destination is a subtype of the |
606 | | -;; cast source. TODO. |
| 600 | +;; cast source. |
607 | 601 | (module |
608 | 602 | (rec |
609 | 603 | ;; CHECK: (rec |
610 | 604 | ;; CHECK-NEXT: (type $top (sub (descriptor $top.desc (struct)))) |
611 | 605 | (type $top (sub (descriptor $top.desc (struct)))) |
612 | | - ;; CHECK: (type $bot (sub $top (descriptor $bot.desc (struct)))) |
| 606 | + ;; CHECK: (type $bot (sub (struct))) |
613 | 607 | (type $bot (sub $top (descriptor $bot.desc (struct)))) |
614 | 608 | ;; CHECK: (type $top.desc (sub (describes $top (struct)))) |
615 | 609 | (type $top.desc (sub (describes $top (struct)))) |
616 | | - ;; CHECK: (type $bot.desc (sub $top.desc (describes $bot (struct)))) |
617 | 610 | (type $bot.desc (sub $top.desc (describes $bot (struct)))) |
618 | 611 | ) |
619 | 612 |
|
620 | | - ;; CHECK: (type $4 (func (param anyref (ref (exact $top.desc))))) |
| 613 | + ;; CHECK: (type $3 (func (param anyref (ref (exact $top.desc))))) |
621 | 614 |
|
622 | | - ;; CHECK: (global $bot-sub-any anyref (struct.new_default $bot |
623 | | - ;; CHECK-NEXT: (struct.new_default $bot.desc) |
624 | | - ;; CHECK-NEXT: )) |
| 615 | + ;; CHECK: (global $bot-sub-any anyref (struct.new_default $bot)) |
625 | 616 | (global $bot-sub-any anyref (struct.new $bot (struct.new $bot.desc))) |
626 | 617 |
|
627 | | - ;; CHECK: (func $br_on_cast_desc_fail (type $4) (param $any anyref) (param $top.desc (ref (exact $top.desc))) |
| 618 | + ;; CHECK: (func $br_on_cast_desc_fail (type $3) (param $any anyref) (param $top.desc (ref (exact $top.desc))) |
628 | 619 | ;; CHECK-NEXT: (drop |
629 | 620 | ;; CHECK-NEXT: (block $l (result anyref) |
630 | 621 | ;; CHECK-NEXT: (br_on_cast_desc_fail $l anyref (ref null (exact $top)) |
|
0 commit comments