summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-08 15:57:42 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:21:35 +0900
commit107c777341c4768f0208e590a9ec6c8b9a241060 (patch)
tree23731010e8c7c5d4e91e4fabad2ee4f713ffc931
parent500f721f7080e79c2e41e306cc1d94471c10f173 (diff)
downloadmruby-107c777341c4768f0208e590a9ec6c8b9a241060.tar.gz
mruby-107c777341c4768f0208e590a9ec6c8b9a241060.zip
Rename `OP_JUW` instruction to `OP_JMPUW`.
-rw-r--r--doc/opcode.md2
-rw-r--r--include/mruby/ops.h2
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c8
-rw-r--r--src/codedump.c4
-rw-r--r--src/vm.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/doc/opcode.md b/doc/opcode.md
index abdee704f..513b28302 100644
--- a/doc/opcode.md
+++ b/doc/opcode.md
@@ -62,7 +62,7 @@ sign) of operands.
| OP_JMPIF | BS | if R(a) pc=b |
| OP_JMPNOT | BS | if !R(a) pc=b |
| OP_JMPNIL | BS | if R(a)==nil pc=b |
-| OP_JUW | S | unwind_and_jump_to(a) |
+| OP_JMPUW | S | unwind_and_jump_to(a) |
| OP_EXCEPT | B | R(a) = exc |
| OP_RESCUE | BB | R(b) = R(a).isa?(R(b)) |
| OP_RAISEIF | B | raise(R(a)) if R(a) |
diff --git a/include/mruby/ops.h b/include/mruby/ops.h
index 770e54f3d..75936a791 100644
--- a/include/mruby/ops.h
+++ b/include/mruby/ops.h
@@ -49,7 +49,7 @@ OPCODE(JMP, S) /* pc=a */
OPCODE(JMPIF, BS) /* if R(a) pc=b */
OPCODE(JMPNOT, BS) /* if !R(a) pc=b */
OPCODE(JMPNIL, BS) /* if R(a)==nil pc=b */
-OPCODE(JUW, S) /* unwind_and_jump_to(a) */
+OPCODE(JMPUW, S) /* unwind_and_jump_to(a) */
OPCODE(EXCEPT, B) /* R(a) = exc */
OPCODE(RESCUE, BB) /* R(b) = R(a).isa?(R(b)) */
OPCODE(RAISEIF, B) /* raise(R(a)) if R(a) */
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index 2ede5b81e..f60f1f077 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -2299,7 +2299,7 @@ codegen(codegen_scope *s, node *tree, int val)
}
else if (s->loop->type == LOOP_NORMAL) {
codegen(s, tree, NOVAL);
- genjmp(s, OP_JUW, s->loop->pc0);
+ genjmp(s, OP_JMPUW, s->loop->pc0);
}
else {
if (tree) {
@@ -2319,7 +2319,7 @@ codegen(codegen_scope *s, node *tree, int val)
raise_error(s, "unexpected redo");
}
else {
- genjmp(s, OP_JUW, s->loop->pc2);
+ genjmp(s, OP_JMPUW, s->loop->pc2);
}
if (val) push();
break;
@@ -2336,7 +2336,7 @@ codegen(codegen_scope *s, node *tree, int val)
raise_error(s, msg);
}
else {
- genjmp(s, OP_JUW, lp->pc0);
+ genjmp(s, OP_JMPUW, lp->pc0);
}
if (val) push();
}
@@ -3163,7 +3163,7 @@ loop_break(codegen_scope *s, node *tree)
if (tree) {
gen_move(s, loop->acc, cursp(), 0);
}
- tmp = genjmp(s, OP_JUW, loop->pc3);
+ tmp = genjmp(s, OP_JMPUW, loop->pc3);
loop->pc3 = tmp;
}
else {
diff --git a/src/codedump.c b/src/codedump.c
index 389ed3c8f..3f0801929 100644
--- a/src/codedump.c
+++ b/src/codedump.c
@@ -261,8 +261,8 @@ codedump(mrb_state *mrb, const mrb_irep *irep)
CASE(OP_JMP, S);
printf("OP_JMP\t\t%03d\n", a);
break;
- CASE(OP_JUW, S);
- printf("OP_JUW\t\t%03d\n", a);
+ CASE(OP_JMPUW, S);
+ printf("OP_JMPUW\t\t%03d\n", a);
break;
CASE(OP_JMPIF, BS);
printf("OP_JMPIF\tR%d\t%03d\t", a, b);
diff --git a/src/vm.c b/src/vm.c
index 727c37d53..82301aaf4 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1298,7 +1298,7 @@ RETRY_TRY_BLOCK:
NEXT;
}
- CASE(OP_JUW, S) {
+ CASE(OP_JMPUW, S) {
CHECKPOINT_RESTORE(RBREAK_TAG_JUMP) {
struct RBreak *brk = (struct RBreak*)mrb->exc;
mrb_value target = mrb_break_value_get(brk);