File tree 7 files changed +7
-7
lines changed
7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ struct
168
168
op 0x04 ; block_type bt; list instr es1;
169
169
if es2 <> [] then op 0x05 ;
170
170
list instr es2; end_ ()
171
- | Try (bt , cs , es ) ->
171
+ | TryTable (bt , cs , es ) ->
172
172
op 0x1f ; block_type bt; vec catch cs; list instr es; end_ ()
173
173
| Br x -> op 0x0c ; var x
174
174
| BrIf x -> op 0x0d ; var x
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ let rec step (c : config) : config =
239
239
| ThrowRef , Ref (ExnRef (t , args )) :: vs ->
240
240
vs, [Throwing (t, args) @@ e.at]
241
241
242
- | Try (bt , cs , es' ), vs ->
242
+ | TryTable (bt , cs , es' ), vs ->
243
243
let FuncType (ts1, ts2) = block_type frame.inst bt in
244
244
let n1 = Lib.List32. length ts1 in
245
245
let n2 = Lib.List32. length ts2 in
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ and instr' =
185
185
| Unary of unop (* unary numeric operator *)
186
186
| Binary of binop (* binary numeric operator *)
187
187
| Convert of cvtop (* conversion *)
188
- | Try of block_type * catch list * instr list (* try *)
188
+ | TryTable of block_type * catch list * instr list (* handle exceptions *)
189
189
| Throw of var (* throw exception *)
190
190
| ThrowRef (* rethrow exception *)
191
191
| VecConst of vec (* constant *)
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ let rec instr (e : instr) =
84
84
tables (var x) ++ types (var y)
85
85
| Throw x -> tags (var x)
86
86
| ThrowRef -> empty
87
- | Try (bt , cs , es ) ->
87
+ | TryTable (bt , cs , es ) ->
88
88
block_type bt ++ list catch cs ++ block es
89
89
| LocalGet x | LocalSet x | LocalTee x -> locals (var x)
90
90
| GlobalGet x | GlobalSet x -> globals (var x)
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ let select t = Select t
20
20
let block bt es = Block (bt, es)
21
21
let loop bt es = Loop (bt, es)
22
22
let if_ bt es1 es2 = If (bt, es1, es2)
23
- let try_table bt cs es = Try (bt, cs, es)
23
+ let try_table bt cs es = TryTable (bt, cs, es)
24
24
let br x = Br x
25
25
let br_if x = BrIf x
26
26
let br_table xs x = BrTable (xs, x)
Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ let rec instr e =
458
458
" return_call_indirect " ^ var x, [Node (" type " ^ var y, [] )]
459
459
| Throw x -> " throw " ^ var x, []
460
460
| ThrowRef -> " throw_ref" , []
461
- | Try (bt , cs , es ) ->
461
+ | TryTable (bt , cs , es ) ->
462
462
" try_table" , block_type bt @ list catch cs @ list instr es
463
463
| LocalGet x -> " local.get " ^ var x, []
464
464
| LocalSet x -> " local.set " ^ var x, []
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ let rec check_instr (c : context) (e : instr) (s : infer_result_type) : op_type
319
319
| ThrowRef ->
320
320
[RefType ExnRefType ] -->... []
321
321
322
- | Try (bt , cs , es ) ->
322
+ | TryTable (bt , cs , es ) ->
323
323
let FuncType (ts1, ts2) as ft = check_block_type c bt in
324
324
let c' = {c with labels = ts2 :: c .labels} in
325
325
List. iter (fun ct -> check_catch c ct ts2 e.at) cs;
You can’t perform that action at this time.
0 commit comments