Debian Codegraph @

tests/snapshots/cli/legacy-exceptions/try_catch.wast/2.print

raw
1 (module
2 (type (;0;) (func))
3 (type (;1;) (func (param i32)))
4 (type (;2;) (func (param f32)))
5 (type (;3;) (func (param i64)))
6 (type (;4;) (func (param f64)))
7 (type (;5;) (func (param i32) (result i32)))
8 (type (;6;) (func (param i32 i32) (result i32)))
9 (type (;7;) (func (param f32) (result f32)))
10 (type (;8;) (func (param i64) (result i64)))
11 (type (;9;) (func (param f64) (result f64)))
12 (type (;10;) (func (result i32)))
13 (import "test" "e0" (tag $imported-e0 (;0;) (type 0)))
14 (import "test" "throw" (func $imported-throw (;0;) (type 0)))
15 (table (;0;) 1 1 funcref)
16 (tag $e0 (;1;) (type 0))
17 (tag $e1 (;2;) (type 0))
18 (tag $e2 (;3;) (type 0))
19 (tag $e-i32 (;4;) (type 1) (param i32))
20 (tag $e-f32 (;5;) (type 2) (param f32))
21 (tag $e-i64 (;6;) (type 3) (param i64))
22 (tag $e-f64 (;7;) (type 4) (param f64))
23 (export "empty-catch" (func 2))
24 (export "simple-throw-catch" (func 3))
25 (export "unreachable-not-caught" (func 4))
26 (export "trap-in-callee" (func 6))
27 (export "catch-complex-1" (func 7))
28 (export "catch-complex-2" (func 8))
29 (export "throw-catch-param-i32" (func 9))
30 (export "throw-catch-param-f32" (func 10))
31 (export "throw-catch-param-i64" (func 11))
32 (export "throw-catch-param-f64" (func 12))
33 (export "catch-param-i32" (func 14))
34 (export "catch-imported" (func 15))
35 (export "catchless-try" (func 16))
36 (export "return-call-in-try-catch" (func 18))
37 (export "return-call-indirect-in-try-catch" (func 19))
38 (export "break-try-catch" (func 20))
39 (export "break-try-catch_all" (func 21))
40 (elem (;0;) (table 0) (i32.const 0) func $throw-void)
41 (func $throw-if (;1;) (type 5) (param i32) (result i32)
42 local.get 0
43 i32.const 0
44 i32.ne
45 if ;; label = @1
46 throw $e0
47 end
48 i32.const 0
49 )
50 (func (;2;) (type 0)
51 try ;; label = @1
52 catch $e0
53 end
54 )
55 (func (;3;) (type 5) (param i32) (result i32)
56 try (result i32) ;; label = @1
57 local.get 0
58 i32.eqz
59 if ;; label = @2
60 throw $e0
61 end
62 i32.const 42
63 catch $e0
64 i32.const 23
65 end
66 )
67 (func (;4;) (type 0)
68 try ;; label = @1
69 unreachable
70 catch_all
71 end
72 )
73 (func $div (;5;) (type 6) (param i32 i32) (result i32)
74 local.get 0
75 local.get 1
76 i32.div_u
77 )
78 (func (;6;) (type 6) (param i32 i32) (result i32)
79 try (result i32) ;; label = @1
80 local.get 0
81 local.get 1
82 call $div
83 catch_all
84 i32.const 11
85 end
86 )
87 (func (;7;) (type 5) (param i32) (result i32)
88 try (result i32) ;; label = @1
89 try (result i32) ;; label = @2
90 local.get 0
91 i32.eqz
92 if ;; label = @3
93 throw $e0
94 else
95 local.get 0
96 i32.const 1
97 i32.eq
98 if ;; label = @4
99 throw $e1
100 else
101 throw $e2
102 end
103 end
104 i32.const 2
105 catch $e0
106 i32.const 3
107 end
108 catch $e1
109 i32.const 4
110 end
111 )
112 (func (;8;) (type 5) (param i32) (result i32)
113 try (result i32) ;; label = @1
114 local.get 0
115 i32.eqz
116 if ;; label = @2
117 throw $e0
118 else
119 local.get 0
120 i32.const 1
121 i32.eq
122 if ;; label = @3
123 throw $e1
124 else
125 throw $e2
126 end
127 end
128 i32.const 2
129 catch $e0
130 i32.const 3
131 catch $e1
132 i32.const 4
133 end
134 )
135 (func (;9;) (type 5) (param i32) (result i32)
136 try (result i32) ;; label = @1
137 local.get 0
138 throw $e-i32
139 i32.const 2
140 catch $e-i32
141 return
142 end
143 )
144 (func (;10;) (type 7) (param f32) (result f32)
145 try (result f32) ;; label = @1
146 local.get 0
147 throw $e-f32
148 f32.const 0x0p+0 (;=0;)
149 catch $e-f32
150 return
151 end
152 )
153 (func (;11;) (type 8) (param i64) (result i64)
154 try (result i64) ;; label = @1
155 local.get 0
156 throw $e-i64
157 i64.const 2
158 catch $e-i64
159 return
160 end
161 )
162 (func (;12;) (type 9) (param f64) (result f64)
163 try (result f64) ;; label = @1
164 local.get 0
165 throw $e-f64
166 f64.const 0x0p+0 (;=0;)
167 catch $e-f64
168 return
169 end
170 )
171 (func $throw-param-i32 (;13;) (type 1) (param i32)
172 local.get 0
173 throw $e-i32
174 )
175 (func (;14;) (type 5) (param i32) (result i32)
176 try (result i32) ;; label = @1
177 i32.const 0
178 local.get 0
179 call $throw-param-i32
180 catch $e-i32
181 end
182 )
183 (func (;15;) (type 10) (result i32)
184 try (result i32) ;; label = @1
185 i32.const 1
186 call $imported-throw
187 catch $imported-e0
188 i32.const 2
189 end
190 )
191 (func (;16;) (type 5) (param i32) (result i32)
192 try (result i32) ;; label = @1
193 try (result i32) ;; label = @2
194 local.get 0
195 call $throw-if
196 end
197 catch $e0
198 i32.const 1
199 end
200 )
201 (func $throw-void (;17;) (type 0)
202 throw $e0
203 )
204 (func (;18;) (type 0)
205 try ;; label = @1
206 return_call $throw-void
207 catch $e0
208 end
209 )
210 (func (;19;) (type 0)
211 try ;; label = @1
212 i32.const 0
213 return_call_indirect (type 0)
214 catch $e0
215 end
216 )
217 (func (;20;) (type 0)
218 try ;; label = @1
219 br 0 (;@1;)
220 catch $e0
221 end
222 )
223 (func (;21;) (type 0)
224 try ;; label = @1
225 br 0 (;@1;)
226 catch_all
227 end
228 )
229 )