blob: 439681a8fd5603f1083c27f4324c27cc88a23025 (
plain)
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
|
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt %s --generate-stack-ir --roundtrip -all -S -o - | filecheck %s
(module
;; CHECK: (tag $tag (param i32))
(tag $tag (param i32))
;; CHECK: (func $delegate-child (type $1)
;; CHECK-NEXT: (try $label$9
;; CHECK-NEXT: (do
;; CHECK-NEXT: (try $label$7
;; CHECK-NEXT: (do
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (pop i32)
;; CHECK-NEXT: )
;; CHECK-NEXT: (try $label$6
;; CHECK-NEXT: (do
;; CHECK-NEXT: )
;; CHECK-NEXT: (delegate 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (pop i32)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $delegate-child
(try
(do
(try
(do)
(catch $tag
(drop
(pop i32)
)
(try
(do)
;; the binary writer must properly handle this delegate which is
;; the child of other try's, and not get confused by their
;; information on the stack (this is a regression test for us
;; properly ending the scope with a delegate and popping the
;; relevant stack).
(delegate 2)
)
)
)
)
(catch $tag
(drop
(pop i32)
)
)
)
)
)
|