Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 35b435a

Browse files
authored
[interpreter] Update README.md for EH instructions (#272)
1 parent 24440ac commit 35b435a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

interpreter/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ func_type: ( type <var> )? <param>* <result>*
203203
global_type: <val_type> | ( mut <val_type> )
204204
table_type: <nat> <nat>? <ref_type>
205205
memory_type: <nat> <nat>?
206+
tag_type: ( type <var> )? <param>*
206207
207208
num: <int> | <float>
208209
var: <nat> | <name>
@@ -231,6 +232,8 @@ expr:
231232
( loop <name>? <block_type> <instr>* )
232233
( if <name>? <block_type> ( then <instr>* ) ( else <instr>* )? )
233234
( if <name>? <block_type> <expr>+ ( then <instr>* ) ( else <instr>* )? ) ;; = <expr>+ (if <name>? <block_type> (then <instr>*) (else <instr>*)?)
235+
( try <name>? <block_type> ( do <instr>* ) ( catch <instr>* )* ( catch_all <instr>* )? )
236+
( try <name>? <block_type> ( do <instr>* ) ( delegate <var> ) )
234237
235238
instr:
236239
<expr>
@@ -239,6 +242,9 @@ instr:
239242
loop <name>? <block_type> <instr>* end <name>? ;; = (loop <name>? <block_type> <instr>*)
240243
if <name>? <block_type> <instr>* end <name>? ;; = (if <name>? <block_type> (then <instr>*))
241244
if <name>? <block_type> <instr>* else <name>? <instr>* end <name>? ;; = (if <name>? <block_type> (then <instr>*) (else <instr>*))
245+
try <name>? <block_type> <instr>* (catch <name>? <instr>*)* (catch_all <name>? <instr>*)? end <name>?
246+
;; = (try <name>? <block_type> (do <instr>*) (catch <instr>*)* (catch_all <instr>*)?)
247+
try <name>? <block_type> <instr>* delegate <var> ;; = (try <name>? <block_type> (do <instr>*) (delegate <var>))
242248
243249
op:
244250
unreachable
@@ -279,6 +285,8 @@ op:
279285
ref.null <ref_kind>
280286
ref.is_null <ref_kind>
281287
ref.func <var>
288+
throw <tag_type>
289+
rethrow <var>
282290
<num_type>.const <num>
283291
<num_type>.<unop>
284292
<num_type>.<binop>
@@ -404,6 +412,7 @@ assertion:
404412
( assert_return <action> <result>* ) ;; assert action has expected results
405413
( assert_trap <action> <failure> ) ;; assert action traps with given failure string
406414
( assert_exhaustion <action> <failure> ) ;; assert action exhausts system resources
415+
( assert_exception <action> ) ;; assert action throws an exception
407416
( assert_malformed <module> <failure> ) ;; assert module cannot be decoded with given failure string
408417
( assert_invalid <module> <failure> ) ;; assert module is invalid with given failure string
409418
( assert_unlinkable <module> <failure> ) ;; assert module fails to link
@@ -495,6 +504,7 @@ assertion:
495504
( assert_return <action> <result>* ) ;; assert action has expected results
496505
( assert_trap <action> <failure> ) ;; assert action traps with given failure string
497506
( assert_exhaustion <action> <failure> ) ;; assert action exhausts system resources
507+
( assert_exception <action> ) ;; assert action throws an exception
498508
( assert_malformed <module> <failure> ) ;; assert module cannot be decoded with given failure string
499509
( assert_invalid <module> <failure> ) ;; assert module is invalid with given failure string
500510
( assert_unlinkable <module> <failure> ) ;; assert module fails to link

0 commit comments

Comments
 (0)