diff options
Diffstat (limited to 'test/lit/isorecursive-good.wast')
-rw-r--r-- | test/lit/isorecursive-good.wast | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/test/lit/isorecursive-good.wast b/test/lit/isorecursive-good.wast index 7ced0d8d3..da14b38c8 100644 --- a/test/lit/isorecursive-good.wast +++ b/test/lit/isorecursive-good.wast @@ -1,4 +1,4 @@ -;; TODO: Autogenerate these checks! The current script cannot handle `rec`. +;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. ;; RUN: wasm-opt %s -all --hybrid -S -o - | filecheck %s --check-prefix HYBRID ;; RUN: wasm-opt %s -all --hybrid --roundtrip -S -o - | filecheck %s --check-prefix HYBRID @@ -6,46 +6,63 @@ (module -;; HYBRID: (rec -;; HYBRID-NEXT: (type $super-struct (struct_subtype (field i32) data)) -;; HYBRID-NEXT: (type $sub-struct (struct_subtype (field i32) (field i64) $super-struct)) -;; HYBRID-NEXT: ) - -;; HYBRID: (rec -;; HYBRID-NEXT: (type $super-array (array_subtype (ref $super-struct) data)) -;; HYBRID-NEXT: (type $sub-array (array_subtype (ref $sub-struct) $super-array)) -;; HYBRID-NEXT: ) - -;; NOMINAL-NOT: rec - -;; NOMINAL: (type $super-struct (struct_subtype (field i32) data)) -;; NOMINAL-NEXT: (type $sub-struct (struct_subtype (field i32) (field i64) $super-struct)) - -;; NOMINAL: (type $super-array (array_subtype (ref $super-struct) data)) -;; NOMINAL-NEXT: (type $sub-array (array_subtype (ref $sub-struct) $super-array)) (rec + ;; HYBRID: (rec + ;; HYBRID-NEXT: (type $super-struct (struct_subtype (field i32) data)) + ;; NOMINAL: (type $super-struct (struct_subtype (field i32) data)) (type $super-struct (struct i32)) + ;; HYBRID: (type $sub-struct (struct_subtype (field i32) (field i64) $super-struct)) + ;; NOMINAL: (type $sub-struct (struct_subtype (field i32) (field i64) $super-struct)) (type $sub-struct (struct_subtype i32 i64 $super-struct)) ) (rec + ;; HYBRID: (rec + ;; HYBRID-NEXT: (type $super-array (array_subtype (ref $super-struct) data)) + ;; NOMINAL: (type $super-array (array_subtype (ref $super-struct) data)) (type $super-array (array (ref $super-struct))) + ;; HYBRID: (type $sub-array (array_subtype (ref $sub-struct) $super-array)) + ;; NOMINAL: (type $sub-array (array_subtype (ref $sub-struct) $super-array)) (type $sub-array (array_subtype (ref $sub-struct) $super-array)) ) + ;; HYBRID: (func $make-super-struct (type $none_=>_ref|$super-struct|) (result (ref $super-struct)) + ;; HYBRID-NEXT: (call $make-sub-struct) + ;; HYBRID-NEXT: ) + ;; NOMINAL: (func $make-super-struct (type $none_=>_ref|$super-struct|) (result (ref $super-struct)) + ;; NOMINAL-NEXT: (call $make-sub-struct) + ;; NOMINAL-NEXT: ) (func $make-super-struct (result (ref $super-struct)) (call $make-sub-struct) ) + ;; HYBRID: (func $make-sub-struct (type $none_=>_ref|$sub-struct|) (result (ref $sub-struct)) + ;; HYBRID-NEXT: (unreachable) + ;; HYBRID-NEXT: ) + ;; NOMINAL: (func $make-sub-struct (type $none_=>_ref|$sub-struct|) (result (ref $sub-struct)) + ;; NOMINAL-NEXT: (unreachable) + ;; NOMINAL-NEXT: ) (func $make-sub-struct (result (ref $sub-struct)) (unreachable) ) + ;; HYBRID: (func $make-super-array (type $none_=>_ref|$super-array|) (result (ref $super-array)) + ;; HYBRID-NEXT: (call $make-sub-array) + ;; HYBRID-NEXT: ) + ;; NOMINAL: (func $make-super-array (type $none_=>_ref|$super-array|) (result (ref $super-array)) + ;; NOMINAL-NEXT: (call $make-sub-array) + ;; NOMINAL-NEXT: ) (func $make-super-array (result (ref $super-array)) (call $make-sub-array) ) + ;; HYBRID: (func $make-sub-array (type $none_=>_ref|$sub-array|) (result (ref $sub-array)) + ;; HYBRID-NEXT: (unreachable) + ;; HYBRID-NEXT: ) + ;; NOMINAL: (func $make-sub-array (type $none_=>_ref|$sub-array|) (result (ref $sub-array)) + ;; NOMINAL-NEXT: (unreachable) + ;; NOMINAL-NEXT: ) (func $make-sub-array (result (ref $sub-array)) (unreachable) ) |