File: prototype-nominal-format.test

package info (click to toggle)
binaryen 108-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 35,424 kB
  • sloc: cpp: 151,487; javascript: 62,522; ansic: 13,124; python: 5,260; pascal: 441; sh: 75; asm: 27; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 1,253 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;; Test the we can properly parse the prototype nominal binary format that we no
;; longer emit.

;; RUN: wasm-dis %s.wasm -all | filecheck %s

;; CHECK:      (module
;; CHECK-NEXT:  (type $super-struct (struct (field i32)))
;; CHECK-NEXT:  (type $sub-struct (struct (field i32) (field i64)))
;; CHECK-NEXT:  (type $none_=>_ref|$super-struct| (func (result (ref $super-struct))))
;; CHECK-NEXT:  (type $none_=>_ref|$sub-struct| (func (result (ref $sub-struct))))
;; CHECK-NEXT:  (type $none_=>_ref|$super-array| (func (result (ref $super-array))))
;; CHECK-NEXT:  (type $none_=>_ref|$sub-array| (func (result (ref $sub-array))))
;; CHECK-NEXT:  (type $super-array (array (ref $super-struct)))
;; CHECK-NEXT:  (type $sub-array (array (ref $sub-struct)))
;; CHECK-NEXT:  (func $make-super-struct (result (ref $super-struct))
;; CHECK-NEXT:   (call $make-sub-struct)
;; CHECK-NEXT:  )
;; CHECK-NEXT:  (func $make-sub-struct (result (ref $sub-struct))
;; CHECK-NEXT:   (unreachable)
;; CHECK-NEXT:  )
;; CHECK-NEXT:  (func $make-super-array (result (ref $super-array))
;; CHECK-NEXT:   (call $make-sub-array)
;; CHECK-NEXT:  )
;; CHECK-NEXT:  (func $make-sub-array (result (ref $sub-array))
;; CHECK-NEXT:   (unreachable)
;; CHECK-NEXT:  )
;; CHECK-NEXT: )