This repository was archived by the owner on Apr 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 167167 (catch $e0 )
168168 )
169169 )
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+ )
170178)
171179
172180(assert_return (invoke " empty-catch" ))
211219(assert_exception (invoke " return-call-in-try-catch" ))
212220(assert_exception (invoke " return-call-indirect-in-try-catch" ))
213221
222+ (assert_return (invoke " break-try-catch" ))
223+ (assert_return (invoke " break-try-catch_all" ))
224+
214225(module
215226 (func $imported-throw (import " test" " throw" ))
216227 (tag $e0 )
Original file line number Diff line number Diff line change 145145 (catch $e0 )
146146 )
147147 )
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+ )
148188)
149189
150190(assert_return (invoke " delegate-no-throw" ) (i32.const 1 ))
173213(assert_exception (invoke " return-call-in-try-delegate" ))
174214(assert_exception (invoke " return-call-indirect-in-try-delegate" ))
175215
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+
176221(assert_malformed
177222 (module quote " (module (func (delegate 0)))" )
178223 " unexpected token"
You can’t perform that action at this time.
0 commit comments