From f467b02d4598ab64d98727348e8a9c4f04fc9b83 Mon Sep 17 00:00:00 2001 From: dearblue Date: Sun, 24 May 2020 11:44:31 +0900 Subject: Extended `OP_EXCEPT` and `OP_RAISE` (`OP_RAISEIF`) instructions - `OP_EXCEPT` checks if `mrb->exc` is `NULL`, `MRB_TT_EXCEPTION` or `MRB_TT_BREAK`. If `mrb->exc` is `NULL`, it will be replaced with `nil`. - If `OP_RAISE` is `nil`, it does nothing and the immediately following instruction is executed (like `OP_NOP`). Also, in case of `RBreak` object, it moves to the processing for `break`. With this change, the instruction name is changed from `OP_RAISE` to `OP_RAISEIF`. --- src/codedump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/codedump.c') diff --git a/src/codedump.c b/src/codedump.c index a19d60708..2225da4ce 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -507,8 +507,8 @@ codedump(mrb_state *mrb, const mrb_irep *irep) printf("OP_RESCUE\tR%d\tR%d", a, b); print_lv_ab(mrb, irep, a, b); break; - CASE(OP_RAISE, B); - printf("OP_RAISE\tR%d\t\t", a); + CASE(OP_RAISEIF, B); + printf("OP_RAISEIF\tR%d\t\t", a); print_lv_a(mrb, irep, a); break; CASE(OP_POPERR, B); -- cgit v1.2.3