diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-10-14 14:11:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 21:11:59 +0000 |
commit | bf665976b1526ca7cf11bacf5745563dfe193206 (patch) | |
tree | a6bb2cf0fa5d1972fe55f872418665778e00dde5 /test/lit/passes/dae-gc.wast | |
parent | d592bad2b8fa777dab9682d2d2e47f9957c8051d (diff) | |
download | binaryen-bf665976b1526ca7cf11bacf5745563dfe193206.tar.gz binaryen-bf665976b1526ca7cf11bacf5745563dfe193206.tar.bz2 binaryen-bf665976b1526ca7cf11bacf5745563dfe193206.zip |
Switch from "extends" to M4 nominal syntax (#4248)
Switch from "extends" to M4 nominal syntax
Change all test inputs from using the old (extends $super) syntax to using the
new *_subtype syntax for their inputs and also update the printer to emit the
new syntax. Add a new test explicitly testing the old notation to make sure it
keeps working until we remove support for it.
Diffstat (limited to 'test/lit/passes/dae-gc.wast')
-rw-r--r-- | test/lit/passes/dae-gc.wast | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/test/lit/passes/dae-gc.wast b/test/lit/passes/dae-gc.wast index 899087e7f..3cc1c8653 100644 --- a/test/lit/passes/dae-gc.wast +++ b/test/lit/passes/dae-gc.wast @@ -1,14 +1,18 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. ;; RUN: wasm-opt %s -all --dae -S -o - | filecheck %s -;; RUN: wasm-opt %s -all --dae --nominal -S -o - | filecheck %s +;; RUN: wasm-opt %s -all --dae --nominal -S -o - | filecheck %s --check-prefix=NOMNL (module ;; CHECK: (type ${} (struct )) + ;; NOMNL: (type ${} (struct_subtype data)) (type ${} (struct)) ;; CHECK: (func $foo ;; CHECK-NEXT: (call $bar) ;; CHECK-NEXT: ) + ;; NOMNL: (func $foo + ;; NOMNL-NEXT: (call $bar) + ;; NOMNL-NEXT: ) (func $foo (call $bar (i31.new @@ -31,6 +35,21 @@ ;; CHECK-NEXT: (unreachable) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) + ;; NOMNL: (func $bar + ;; NOMNL-NEXT: (local $0 (ref null i31)) + ;; NOMNL-NEXT: (drop + ;; NOMNL-NEXT: (ref.as_non_null + ;; NOMNL-NEXT: (local.tee $0 + ;; NOMNL-NEXT: (i31.new + ;; NOMNL-NEXT: (i32.const 2) + ;; NOMNL-NEXT: ) + ;; NOMNL-NEXT: ) + ;; NOMNL-NEXT: ) + ;; NOMNL-NEXT: ) + ;; NOMNL-NEXT: (local.tee $0 + ;; NOMNL-NEXT: (unreachable) + ;; NOMNL-NEXT: ) + ;; NOMNL-NEXT: ) (func $bar (param $0 i31ref) (drop ;; after the parameter is removed, we create a nullable local to replace it, @@ -55,6 +74,9 @@ ;; CHECK: (func $get-rtt (param $0 (rtt ${})) ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) + ;; NOMNL: (func $get-rtt (param $0 (rtt ${})) + ;; NOMNL-NEXT: (nop) + ;; NOMNL-NEXT: ) (func $get-rtt (param $0 (rtt ${})) (nop) ) @@ -63,6 +85,11 @@ ;; CHECK-NEXT: (rtt.canon ${}) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) + ;; NOMNL: (func $send-rtt + ;; NOMNL-NEXT: (call $get-rtt + ;; NOMNL-NEXT: (rtt.canon ${}) + ;; NOMNL-NEXT: ) + ;; NOMNL-NEXT: ) (func $send-rtt (call $get-rtt (rtt.canon ${}) |