Debian Codegraph @

tests/snapshots/testsuite/proposals/wasm-3.0/try_table.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 exnref)))
13 (type (;11;) (func (result f32 exnref)))
14 (type (;12;) (func (result i64 exnref)))
15 (type (;13;) (func (result f64 exnref)))
16 (type (;14;) (func (result i32)))
17 (import "test" "e0" (tag $imported-e0 (;0;) (type 0)))
18 (import "test" "e0" (tag $imported-e0-alias (;1;) (type 0)))
19 (import "test" "throw" (func $imported-throw (;0;) (type 0)))
20 (table (;0;) 1 1 funcref)
21 (tag $e0 (;2;) (type 0))
22 (tag $e1 (;3;) (type 0))
23 (tag $e2 (;4;) (type 0))
24 (tag $e-i32 (;5;) (type 1) (param i32))
25 (tag $e-f32 (;6;) (type 2) (param f32))
26 (tag $e-i64 (;7;) (type 3) (param i64))
27 (tag $e-f64 (;8;) (type 4) (param f64))
28 (export "simple-throw-catch" (func 2))
29 (export "unreachable-not-caught" (func 3))
30 (export "trap-in-callee" (func 5))
31 (export "catch-complex-1" (func 6))
32 (export "catch-complex-2" (func 7))
33 (export "throw-catch-param-i32" (func 8))
34 (export "throw-catch-param-f32" (func 9))
35 (export "throw-catch-param-i64" (func 10))
36 (export "throw-catch-param-f64" (func 11))
37 (export "throw-catch_ref-param-i32" (func 12))
38 (export "throw-catch_ref-param-f32" (func 13))
39 (export "throw-catch_ref-param-i64" (func 14))
40 (export "throw-catch_ref-param-f64" (func 15))
41 (export "catch-param-i32" (func 17))
42 (export "catch-imported" (func 18))
43 (export "catch-imported-alias" (func 19))
44 (export "catchless-try" (func 20))
45 (export "return-call-in-try-catch" (func 22))
46 (export "return-call-indirect-in-try-catch" (func 23))
47 (export "try-with-param" (func 24))
48 (elem (;0;) (table 0) (i32.const 0) func $throw-void)
49 (func $throw-if (;1;) (type 5) (param i32) (result i32)
50 local.get 0
51 i32.const 0
52 i32.ne
53 if ;; label = @1
54 throw $e0
55 end
56 i32.const 0
57 )
58 (func (;2;) (type 5) (param i32) (result i32)
59 block $h
60 try_table (result i32) (catch $e0 $h) ;; label = @2
61 local.get 0
62 i32.eqz
63 if ;; label = @3
64 throw $e0
65 else
66 end
67 i32.const 42
68 end
69 return
70 end
71 i32.const 23
72 )
73 (func (;3;) (type 0)
74 block $h
75 try_table (catch_all $h) ;; label = @2
76 unreachable
77 end
78 return
79 end
80 )
81 (func $div (;4;) (type 6) (param i32 i32) (result i32)
82 local.get 0
83 local.get 1
84 i32.div_u
85 )
86 (func (;5;) (type 6) (param i32 i32) (result i32)
87 block $h
88 try_table (result i32) (catch_all $h) ;; label = @2
89 local.get 0
90 local.get 1
91 call $div
92 end
93 return
94 end
95 i32.const 11
96 )
97 (func (;6;) (type 5) (param i32) (result i32)
98 block $h1
99 try_table (result i32) (catch $e1 $h1) ;; label = @2
100 block $h0
101 try_table (result i32) (catch $e0 $h0) ;; label = @4
102 local.get 0
103 i32.eqz
104 if ;; label = @5
105 throw $e0
106 else
107 local.get 0
108 i32.const 1
109 i32.eq
110 if ;; label = @6
111 throw $e1
112 else
113 throw $e2
114 end
115 end
116 i32.const 2
117 end
118 br 1 (;@2;)
119 end
120 i32.const 3
121 end
122 return
123 end
124 i32.const 4
125 )
126 (func (;7;) (type 5) (param i32) (result i32)
127 block $h0
128 block $h1
129 try_table (result i32) (catch $e0 $h0) (catch $e1 $h1) ;; label = @3
130 local.get 0
131 i32.eqz
132 if ;; label = @4
133 throw $e0
134 else
135 local.get 0
136 i32.const 1
137 i32.eq
138 if ;; label = @5
139 throw $e1
140 else
141 throw $e2
142 end
143 end
144 i32.const 2
145 end
146 return
147 end
148 i32.const 4
149 return
150 end
151 i32.const 3
152 )
153 (func (;8;) (type 5) (param i32) (result i32)
154 block $h (result i32)
155 try_table (result i32) (catch $e-i32 $h) ;; label = @2
156 local.get 0
157 throw $e-i32
158 i32.const 2
159 end
160 return
161 end
162 return
163 )
164 (func (;9;) (type 7) (param f32) (result f32)
165 block $h (result f32)
166 try_table (result f32) (catch $e-f32 $h) ;; label = @2
167 local.get 0
168 throw $e-f32
169 f32.const 0x0p+0 (;=0;)
170 end
171 return
172 end
173 return
174 )
175 (func (;10;) (type 8) (param i64) (result i64)
176 block $h (result i64)
177 try_table (result i64) (catch $e-i64 $h) ;; label = @2
178 local.get 0
179 throw $e-i64
180 i64.const 2
181 end
182 return
183 end
184 return
185 )
186 (func (;11;) (type 9) (param f64) (result f64)
187 block $h (result f64)
188 try_table (result f64) (catch $e-f64 $h) ;; label = @2
189 local.get 0
190 throw $e-f64
191 f64.const 0x0p+0 (;=0;)
192 end
193 return
194 end
195 return
196 )
197 (func (;12;) (type 5) (param i32) (result i32)
198 block $h (type 10) (result i32 exnref)
199 try_table (result i32) (catch_ref $e-i32 $h) ;; label = @2
200 local.get 0
201 throw $e-i32
202 i32.const 2
203 end
204 return
205 end
206 drop
207 return
208 )
209 (func (;13;) (type 7) (param f32) (result f32)
210 block $h (type 11) (result f32 exnref)
211 try_table (result f32) (catch_ref $e-f32 $h) ;; label = @2
212 local.get 0
213 throw $e-f32
214 f32.const 0x0p+0 (;=0;)
215 end
216 return
217 end
218 drop
219 return
220 )
221 (func (;14;) (type 8) (param i64) (result i64)
222 block $h (type 12) (result i64 exnref)
223 try_table (result i64) (catch_ref $e-i64 $h) ;; label = @2
224 local.get 0
225 throw $e-i64
226 i64.const 2
227 end
228 return
229 end
230 drop
231 return
232 )
233 (func (;15;) (type 9) (param f64) (result f64)
234 block $h (type 13) (result f64 exnref)
235 try_table (result f64) (catch_ref $e-f64 $h) ;; label = @2
236 local.get 0
237 throw $e-f64
238 f64.const 0x0p+0 (;=0;)
239 end
240 return
241 end
242 drop
243 return
244 )
245 (func $throw-param-i32 (;16;) (type 1) (param i32)
246 local.get 0
247 throw $e-i32
248 )
249 (func (;17;) (type 5) (param i32) (result i32)
250 block $h (result i32)
251 try_table (result i32) (catch $e-i32 $h) ;; label = @2
252 i32.const 0
253 local.get 0
254 call $throw-param-i32
255 end
256 return
257 end
258 )
259 (func (;18;) (type 14) (result i32)
260 block $h
261 try_table (result i32) (catch $imported-e0 $h) ;; label = @2
262 i32.const 1
263 call $imported-throw
264 end
265 return
266 end
267 i32.const 2
268 )
269 (func (;19;) (type 14) (result i32)
270 block $h
271 try_table (result i32) (catch $imported-e0 $h) ;; label = @2
272 i32.const 1
273 throw $imported-e0-alias
274 end
275 return
276 end
277 i32.const 2
278 )
279 (func (;20;) (type 5) (param i32) (result i32)
280 block $h
281 try_table (result i32) (catch $e0 $h) ;; label = @2
282 try_table (result i32) ;; label = @3
283 local.get 0
284 call $throw-if
285 end
286 end
287 return
288 end
289 i32.const 1
290 )
291 (func $throw-void (;21;) (type 0)
292 throw $e0
293 )
294 (func (;22;) (type 0)
295 block $h
296 try_table (catch $e0 $h) ;; label = @2
297 return_call $throw-void
298 end
299 end
300 )
301 (func (;23;) (type 0)
302 block $h
303 try_table (catch $e0 $h) ;; label = @2
304 i32.const 0
305 return_call_indirect (type 0)
306 end
307 end
308 )
309 (func (;24;) (type 0)
310 i32.const 0
311 try_table (type 1) (param i32) ;; label = @1
312 drop
313 end
314 )
315 )