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`. --- doc/opcode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/opcode.md') diff --git a/doc/opcode.md b/doc/opcode.md index 98d29cdc0..d7e620350 100644 --- a/doc/opcode.md +++ b/doc/opcode.md @@ -66,7 +66,7 @@ sign) of operands. | OP_EXCEPT | B | R(a) = exc | | OP_RESCUE | BB | R(b) = R(a).isa?(R(b)) | | OP_POPERR | B | a.times{rescue_pop()} | -| OP_RAISE | B | raise(R(a)) | +| OP_RAISEIF | B | raise(R(a)) if R(a) | | OP_EPUSH | B | ensure_push(SEQ[a]) | | OP_EPOP | B | A.times{ensure_pop().call} | | OP_SENDV | BB | R(a) = call(R(a),Syms(b),*R(a+1)) | -- cgit v1.2.3