File tree 2 files changed +56
-0
lines changed
2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 167
167
(catch $e0 )
168
168
)
169
169
)
170
+
171
+ (func (export " break-try-catch" )
172
+ (try (do (br 0 )) (catch $e0 ))
173
+ )
174
+
175
+ (func (export " break-try-catch_all" )
176
+ (try (do (br 0 )) (catch_all ))
177
+ )
170
178
)
171
179
172
180
(assert_return (invoke " empty-catch" ))
211
219
(assert_exception (invoke " return-call-in-try-catch" ))
212
220
(assert_exception (invoke " return-call-indirect-in-try-catch" ))
213
221
222
+ (assert_return (invoke " break-try-catch" ))
223
+ (assert_return (invoke " break-try-catch_all" ))
224
+
214
225
(module
215
226
(func $imported-throw (import " test" " throw" ))
216
227
(tag $e0 )
Original file line number Diff line number Diff line change 145
145
(catch $e0 )
146
146
)
147
147
)
148
+
149
+ (func (export " break-try-delegate" )
150
+ (try (do (br 0 )) (delegate 0 ))
151
+ )
152
+
153
+ (func (export " break-and-call-throw" ) (result i32 )
154
+ (try $outer (result i32 )
155
+ (do
156
+ (try (result i32 )
157
+ (do
158
+ (block $a
159
+ (try (do (br $a )) (delegate $outer ))
160
+ )
161
+ (call $throw-void )
162
+ (i32.const 0 )
163
+ )
164
+ (catch $e0 (i32.const 1 ))
165
+ )
166
+ )
167
+ (catch $e0 (i32.const 2 ))
168
+ )
169
+ )
170
+
171
+ (func (export " break-and-throw" ) (result i32 )
172
+ (try $outer (result i32 )
173
+ (do
174
+ (try (result i32 )
175
+ (do
176
+ (block $a
177
+ (try (do (br $a )) (delegate $outer ))
178
+ )
179
+ (throw $e0 )
180
+ (i32.const 0 )
181
+ )
182
+ (catch $e0 (i32.const 1 ))
183
+ )
184
+ )
185
+ (catch $e0 (i32.const 2 ))
186
+ )
187
+ )
148
188
)
149
189
150
190
(assert_return (invoke " delegate-no-throw" ) (i32.const 1 ))
173
213
(assert_exception (invoke " return-call-in-try-delegate" ))
174
214
(assert_exception (invoke " return-call-indirect-in-try-delegate" ))
175
215
216
+ (assert_return (invoke " break-try-delegate" ))
217
+
218
+ (assert_return (invoke " break-and-call-throw" ) (i32.const 1 ))
219
+ (assert_return (invoke " break-and-throw" ) (i32.const 1 ))
220
+
176
221
(assert_malformed
177
222
(module quote " (module (func (delegate 0)))" )
178
223
" unexpected token"
You can’t perform that action at this time.
0 commit comments