| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. |
| |
| ;; RUN: wasm-opt %s -all -o %t.text.wast -g -S |
| ;; RUN: wasm-as %s -all -g -o %t.wasm |
| ;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast |
| ;; RUN: wasm-as %s -all -o %t.nodebug.wasm |
| ;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast |
| ;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT |
| ;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN |
| ;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG |
| |
| (module |
| (rec |
| ;; CHECK-TEXT: (rec |
| ;; CHECK-TEXT-NEXT: (type $a (struct (field (ref null (exact $a))) (field (ref (exact $b))))) |
| ;; CHECK-BIN: (rec |
| ;; CHECK-BIN-NEXT: (type $a (struct (field (ref null (exact $a))) (field (ref (exact $b))))) |
| (type $a (struct (field (ref null (exact 0)) (ref (exact 1))))) |
| ;; CHECK-TEXT: (type $b (struct (field (ref (exact $a))) (field (ref null (exact $b))))) |
| ;; CHECK-BIN: (type $b (struct (field (ref (exact $a))) (field (ref null (exact $b))))) |
| (type $b (struct (field (ref (exact $a)) (ref null (exact $b))))) |
| ) |
| |
| ;; CHECK-TEXT: (type $2 (func (param (ref null (exact $a)) (ref (exact $b))) (result (ref (exact $a)) (ref null (exact $b))))) |
| |
| ;; CHECK-TEXT: (func $foo (type $2) (param $0 (ref null (exact $a))) (param $1 (ref (exact $b))) (result (ref (exact $a)) (ref null (exact $b))) |
| ;; CHECK-TEXT-NEXT: (local $2 (ref null (exact $a))) |
| ;; CHECK-TEXT-NEXT: (unreachable) |
| ;; CHECK-TEXT-NEXT: ) |
| ;; CHECK-BIN: (type $2 (func (param (ref null (exact $a)) (ref (exact $b))) (result (ref (exact $a)) (ref null (exact $b))))) |
| |
| ;; CHECK-BIN: (func $foo (type $2) (param $0 (ref null (exact $a))) (param $1 (ref (exact $b))) (result (ref (exact $a)) (ref null (exact $b))) |
| ;; CHECK-BIN-NEXT: (local $2 (ref null (exact $a))) |
| ;; CHECK-BIN-NEXT: (unreachable) |
| ;; CHECK-BIN-NEXT: ) |
| (func $foo (param (ref null (exact $a)) (ref (exact $b))) |
| (result (ref (exact $a)) (ref null (exact $b))) |
| (local (ref null (exact $a))) |
| (unreachable) |
| ) |
| ) |
| ;; CHECK-BIN-NODEBUG: (rec |
| ;; CHECK-BIN-NODEBUG-NEXT: (type $0 (struct (field (ref null (exact $0))) (field (ref (exact $1))))) |
| |
| ;; CHECK-BIN-NODEBUG: (type $1 (struct (field (ref (exact $0))) (field (ref null (exact $1))))) |
| |
| ;; CHECK-BIN-NODEBUG: (type $2 (func (param (ref null (exact $0)) (ref (exact $1))) (result (ref (exact $0)) (ref null (exact $1))))) |
| |
| ;; CHECK-BIN-NODEBUG: (func $0 (type $2) (param $0 (ref null (exact $0))) (param $1 (ref (exact $1))) (result (ref (exact $0)) (ref null (exact $1))) |
| ;; CHECK-BIN-NODEBUG-NEXT: (local $2 (ref null (exact $0))) |
| ;; CHECK-BIN-NODEBUG-NEXT: (unreachable) |
| ;; CHECK-BIN-NODEBUG-NEXT: ) |