File: tags.wast

package info (click to toggle)
binaryen 120-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,284 kB
  • sloc: cpp: 189,449; javascript: 62,189; ansic: 14,087; python: 5,379; pascal: 441; sh: 77; makefile: 30; asm: 27
file content (29 lines) | stat: -rw-r--r-- 553 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
28
29
;; Test tags

(module
  (tag $e-import (import "env" "im0") (param i32))
  (import "env" "im1" (tag (param i32 f32)))

  (tag (param i32))
  (tag $e (param i32 f32))

  (tag $e-params0 (param i32 f32))
  (tag $e-params1 (param i32) (param f32))

  (tag $e-export (export "ex0") (param i32))

  (export "ex1" (tag $e))
)

(assert_invalid
  (module (tag $e (attr 1) (param i32)))
  "Currently only attribute 0 is supported"
)

(assert_invalid
  (module
    (type $t (param i32))
    (tag $e (type $t) (param i32 f32))
  )
  "type and param don't match"
)