;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; RUN: wasm-as %s -all -g -o %t.wasm ;; RUN: wasm-dis %t.wasm -all -o %t.wast ;; RUN: wasm-as %s -all -o %t.nodebug.wasm ;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.nodebug.wast ;; RUN: wasm-opt %t.wast -all -o %t.text.wast -g -S ;; RUN: cat %t.wast | filecheck %s --check-prefix=CHECK-BINARY ;; RUN: cat %t.nodebug.wast | filecheck %s --check-prefix=CHECK-NODEBUG ;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT ;; The very first table has a specialized type, as does its element segment. ;; Verify that we can roundtrip that. (module ;; CHECK-BINARY: (type $vii (func (param i32 i32))) ;; CHECK-TEXT: (type $vii (func (param i32 i32))) (type $vii (func (param i32 i32))) ;; CHECK-BINARY: (table $table-1 10 10 (ref null $vii)) ;; CHECK-TEXT: (table $table-1 10 10 (ref null $vii)) (table $table-1 10 10 (ref null $vii)) ;; CHECK-BINARY: (elem $elem-1 (table $table-1) (i32.const 0) (ref null $vii)) ;; CHECK-TEXT: (elem $elem-1 (table $table-1) (i32.const 0) (ref null $vii)) (elem $elem-1 (table $table-1) (i32.const 0) (ref null $vii)) ;; CHECK-BINARY: (func $foo (type $vii) (param $0 i32) (param $1 i32) ;; CHECK-BINARY-NEXT: (nop) ;; CHECK-BINARY-NEXT: ) ;; CHECK-TEXT: (func $foo (type $vii) (param $0 i32) (param $1 i32) ;; CHECK-TEXT-NEXT: (nop) ;; CHECK-TEXT-NEXT: ) (func $foo (param $0 i32) (param $1 i32) (nop) ) ) ;; CHECK-NODEBUG: (type $0 (func (param i32 i32))) ;; CHECK-NODEBUG: (table $0 10 10 (ref null $0)) ;; CHECK-NODEBUG: (elem $0 (table $0) (i32.const 0) (ref null $0)) ;; CHECK-NODEBUG: (func $0 (type $0) (param $0 i32) (param $1 i32) ;; CHECK-NODEBUG-NEXT: (nop) ;; CHECK-NODEBUG-NEXT: )