diff options
author | Thomas Lively <tlively@google.com> | 2023-04-13 08:33:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 08:33:40 -0700 |
commit | 1034a6be0b411444f4a2e4fb610a655982d30e31 (patch) | |
tree | 808a96699f52c9d1f1692f2b3d34f2bc22589798 /test/lit/nominal-good.wast | |
parent | 42fc582162899aed64f2e1fa6a7a544fcba27a6d (diff) | |
download | binaryen-1034a6be0b411444f4a2e4fb610a655982d30e31.tar.gz binaryen-1034a6be0b411444f4a2e4fb610a655982d30e31.tar.bz2 binaryen-1034a6be0b411444f4a2e4fb610a655982d30e31.zip |
Convert some tests off of --nominal (#5660)
In preparation to remove the nominal type system, which is nonstandard and not
usable for modules with nontrivial external linkage requirements, port an
initial batch of tests to use the standard isorecursive type system.
The port involves reordering input types to ensure that supertypes precede their
subtypes and inserting rec groups to ensure that structurally identical types
maintain their separate identities.
More tests will be ported in future PRs before the nominal type system is
removed entirely.
Diffstat (limited to 'test/lit/nominal-good.wast')
-rw-r--r-- | test/lit/nominal-good.wast | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/test/lit/nominal-good.wast b/test/lit/nominal-good.wast deleted file mode 100644 index 76863d637..000000000 --- a/test/lit/nominal-good.wast +++ /dev/null @@ -1,52 +0,0 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. -;; RUN: wasm-opt %s -all --nominal -S -o - | filecheck %s --check-prefix CHECK -;; RUN: wasm-opt %s -all --nominal --roundtrip -S -o - | filecheck %s -;; RUN: wasm-opt %s -all --hybrid -S -o - | filecheck %s --check-prefix CHECK -;; RUN: wasm-opt %s -all --hybrid --roundtrip -S -o - | filecheck %s - -;; Note that --hybrid and --nominal have the same output, so they share the CHECK prefix. - -(module - - ;; CHECK: (type $super-struct (struct (field i32))) - (type $super-struct (struct i32)) - - ;; CHECK: (type $sub-struct (struct_subtype (field i32) (field i64) $super-struct)) - (type $sub-struct (struct_subtype i32 i64 $super-struct)) - - ;; CHECK: (type $super-array (array (ref $super-struct))) - (type $super-array (array (ref $super-struct))) - - ;; CHECK: (type $sub-array (array_subtype (ref $sub-struct) $super-array)) - (type $sub-array (array_subtype (ref $sub-struct) $super-array)) - - ;; TODO: signature types as well, once functions store their HeapTypes. - - ;; CHECK: (func $make-super-struct (type $none_=>_ref|$super-struct|) (result (ref $super-struct)) - ;; CHECK-NEXT: (call $make-sub-struct) - ;; CHECK-NEXT: ) - (func $make-super-struct (result (ref $super-struct)) - (call $make-sub-struct) - ) - - ;; CHECK: (func $make-sub-struct (type $none_=>_ref|$sub-struct|) (result (ref $sub-struct)) - ;; CHECK-NEXT: (unreachable) - ;; CHECK-NEXT: ) - (func $make-sub-struct (result (ref $sub-struct)) - (unreachable) - ) - - ;; CHECK: (func $make-super-array (type $none_=>_ref|$super-array|) (result (ref $super-array)) - ;; CHECK-NEXT: (call $make-sub-array) - ;; CHECK-NEXT: ) - (func $make-super-array (result (ref $super-array)) - (call $make-sub-array) - ) - - ;; CHECK: (func $make-sub-array (type $none_=>_ref|$sub-array|) (result (ref $sub-array)) - ;; CHECK-NEXT: (unreachable) - ;; CHECK-NEXT: ) - (func $make-sub-array (result (ref $sub-array)) - (unreachable) - ) -) |