summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-03-11 16:32:29 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-03-12 00:50:38 +0900
commit26169f9e25788caf2781a92087f489e5e5fdc0c9 (patch)
tree08fd028dc6857486eb470a057269d77b5fcd9356 /include
parent000c68da97ec0bfbd93e3969a2eef21081569a72 (diff)
downloadmruby-26169f9e25788caf2781a92087f489e5e5fdc0c9.tar.gz
mruby-26169f9e25788caf2781a92087f489e5e5fdc0c9.zip
Enhance OP_RESCUE to take B operand fas matching exception; ref #3487
Diffstat (limited to 'include')
-rw-r--r--include/mruby/opcode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mruby/opcode.h b/include/mruby/opcode.h
index 3d4544817..9a5116275 100644
--- a/include/mruby/opcode.h
+++ b/include/mruby/opcode.h
@@ -82,7 +82,8 @@ enum {
OP_JMPIF,/* A sBx if R(A) pc+=sBx */
OP_JMPNOT,/* A sBx if !R(A) pc+=sBx */
OP_ONERR,/* sBx rescue_push(pc+sBx) */
- OP_RESCUE,/* A B R(A) := exc; R(B) := matched (ignore if A/B=0) */
+ OP_RESCUE,/* A B C if A (if C exc=R(A) else R(A) := exc);
+ if B R(B) := exc.isa?(R(B)); clear(exc) */
OP_POPERR,/* A A.times{rescue_pop()} */
OP_RAISE,/* A raise(R(A)) */
OP_EPUSH,/* Bx ensure_push(SEQ[Bx]) */