File: module-names.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 (24 lines) | stat: -rw-r--r-- 652 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
;; Check that --emit-module-names without -g strips function names but generates
;; and keeps the module names.

;; RUN: wasm-split %s --keep-funcs=foo -o1 %t.primary.wasm -o2 %t.secondary.wasm --emit-module-names

;; RUN: wasm-dis %t.primary.wasm -o - | filecheck %s --check-prefix=PRIMARY
;; RUN: wasm-dis %t.secondary.wasm -o - | filecheck %s --check-prefix=SECONDARY

;; PRIMARY: (module $module-names.wast.tmp.primary.wasm
;; PRIMARY:   (func $0
;; PRIMARY-NOT: $foo

;; SECONDARY: (module $module-names.wast.tmp.secondary.wasm
;; SECONDARY:   (func $0
;; SECONDARY-NOT: $bar

(module
  (func $foo
    (call $bar)
  )
  (func $bar
    (nop)
  )
)