File tree 3 files changed +61
-65
lines changed
3 files changed +61
-65
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 147
147
(catch $e0 (i32.const 1 ))
148
148
)
149
149
)
150
+
151
+ (func $throw (throw $e0 ))
152
+
153
+ (func (export " break-try-catch" )
154
+ (try (do (br 0 )) (catch $e0 ))
155
+ )
156
+
157
+ (func (export " break-try-catch_all" )
158
+ (try (do (br 0 )) (catch_all ))
159
+ )
150
160
)
151
161
152
162
(assert_return (invoke " empty-catch" ))
188
198
(assert_return (invoke " catchless-try" (i32.const 0 )) (i32.const 0 ))
189
199
(assert_return (invoke " catchless-try" (i32.const 1 )) (i32.const 1 ))
190
200
201
+ (assert_return (invoke " break-try-catch" ))
202
+ (assert_return (invoke " break-try-catch_all" ))
203
+
204
+
191
205
(module
192
206
(func $imported-throw (import " test" " throw" ))
193
207
(tag $e0 )
Original file line number Diff line number Diff line change 115
115
(delegate $l3 ))))
116
116
unreachable )
117
117
(catch_all (i32.const 1 ))))
118
+
119
+ (func $throw (throw $e0 ))
120
+
121
+ (func (export " break-try-delegate" )
122
+ (try (do (br 0 )) (delegate 0 ))
123
+ )
124
+
125
+ (func (export " break-and-call-throw" ) (result i32 )
126
+ (try $outer (result i32 )
127
+ (do
128
+ (try (result i32 )
129
+ (do
130
+ (block $a
131
+ (try (do (br $a )) (delegate $outer ))
132
+ )
133
+ (call $throw )
134
+ (i32.const 0 )
135
+ )
136
+ (catch $e0 (i32.const 1 ))
137
+ )
138
+ )
139
+ (catch $e0 (i32.const 2 ))
140
+ )
141
+ )
142
+
143
+ (func (export " break-and-throw" ) (result i32 )
144
+ (try $outer (result i32 )
145
+ (do
146
+ (try (result i32 )
147
+ (do
148
+ (block $a
149
+ (try (do (br $a )) (delegate $outer ))
150
+ )
151
+ (throw $e0 )
152
+ (i32.const 0 )
153
+ )
154
+ (catch $e0 (i32.const 1 ))
155
+ )
156
+ )
157
+ (catch $e0 (i32.const 2 ))
158
+ )
159
+ )
118
160
)
119
161
120
162
(assert_return (invoke " delegate-no-throw" ) (i32.const 1 ))
140
182
141
183
(assert_return (invoke " delegate-correct-targets" ) (i32.const 1 ))
142
184
185
+ (assert_return (invoke " break-try-delegate" ))
186
+
187
+ (assert_return (invoke " break-and-call-throw" ) (i32.const 1 ))
188
+ (assert_return (invoke " break-and-throw" ) (i32.const 1 ))
189
+
143
190
(assert_malformed
144
191
(module quote " (module (func (delegate 0)))" )
145
192
" unexpected token"
You can’t perform that action at this time.
0 commit comments