File: full.wat

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 (65 lines) | stat: -rw-r--r-- 2,300 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt %s -S -o - | filecheck %s --check-prefix=NRML
;; RUN: env BINARYEN_PRINT_FULL=1 wasm-opt %s -S -o - | filecheck %s --check-prefix=FULL

;;
;; Compare normal text output with debug info to full mode.
;;
;; Full mode does not skip repeated debug info in some cases, see below. It also
;; annotates the type of each node.
;;

(module
  ;; NRML:      (func $a
  ;; NRML-NEXT:  ;;@ src.cpp:1:2
  ;; NRML-NEXT:  (block $block
  ;; NRML-NEXT:   (drop
  ;; NRML-NEXT:    (i32.const 0)
  ;; NRML-NEXT:   )
  ;; NRML-NEXT:   ;;@ src.cpp:3:4
  ;; NRML-NEXT:   (drop
  ;; NRML-NEXT:    (i32.const 1)
  ;; NRML-NEXT:   )
  ;; NRML-NEXT:   ;;@ src.cpp:3:4
  ;; NRML-NEXT:   (drop
  ;; NRML-NEXT:    (i32.const 2)
  ;; NRML-NEXT:   )
  ;; NRML-NEXT:  )
  ;; NRML-NEXT: )
  ;; FULL:      (func $a
  ;; FULL-NEXT:  ;;@ src.cpp:1:2
  ;; FULL-NEXT:  (block $block (; none ;)
  ;; FULL-NEXT:   ;;@ src.cpp:1:2
  ;; FULL-NEXT:   (drop
  ;; FULL-NEXT:    ;;@ src.cpp:1:2
  ;; FULL-NEXT:    (i32.const 0) (; i32 ;)
  ;; FULL-NEXT:   ) (; none ;)
  ;; FULL-NEXT:   ;;@ src.cpp:3:4
  ;; FULL-NEXT:   (drop
  ;; FULL-NEXT:    ;;@ src.cpp:3:4
  ;; FULL-NEXT:    (i32.const 1) (; i32 ;)
  ;; FULL-NEXT:   ) (; none ;)
  ;; FULL-NEXT:   ;;@ src.cpp:3:4
  ;; FULL-NEXT:   (drop
  ;; FULL-NEXT:    ;;@ src.cpp:3:4
  ;; FULL-NEXT:    (i32.const 2) (; i32 ;)
  ;; FULL-NEXT:   ) (; none ;)
  ;; FULL-NEXT:  ) ;; end block block (; none ;)
  ;; FULL-NEXT: )
  (func $a
    ;;@ src.cpp:1:2
    (block $block
      (drop (i32.const 0)) ;; this child has the same location as the parent
                           ;; block, and only in full mode will we print such
                           ;; repeating info, including on the const child of
                           ;; the drop
      ;;@ src.cpp:3:4
      (drop (i32.const 1))
      (drop (i32.const 2)) ;; this child has the same location as the sibling
                           ;; before it, but we print it in normal mode as well
                           ;; as full mode (as that seems less confusing). in
                           ;; full mode, however, we also annotate the location
                           ;; of the const node children of the drops.
    )
  )
)