summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-17 13:18:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-17 13:18:12 +0000
commit67f5f9477cac18773794ad8692f1760e3712211e (patch)
tree6f74cb9c33e1f95a44bab2f635bf1863a5faf3a5 /compile.c
parent2731b91d80054f237bf4abf1fa280c2caa0e3109 (diff)
compile.c: use ruby_tag_type
* compile.c (iseq_compile_each): use enum ruby_tag_type names. * vm_core.h (ruby_tag_type): move from eval_intern.h for compiling break/next/redo/return. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/compile.c b/compile.c
index a696cf0..ba5fae3 100644
--- a/compile.c
+++ b/compile.c
@@ -3706,7 +3706,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break_by_insn:
/* escape from block */
COMPILE(ret, "break val (block)", node->nd_stts);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x02) /* TAG_BREAK */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(level | TAG_BREAK));
if (poped) {
ADD_INSN(ret, line, pop);
}
@@ -3801,7 +3801,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
if (ip != 0) {
COMPILE(ret, "next val", node->nd_stts);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x03) /* TAG_NEXT */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(level | TAG_NEXT));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -3868,7 +3868,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
if (ip != 0) {
ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x05) /* TAG_REDO */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(level | TAG_REDO));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -3883,7 +3883,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_RETRY:{
if (iseq->type == ISEQ_TYPE_RESCUE) {
ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(0x04) /* TAG_RETRY */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(TAG_RETRY));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4812,7 +4812,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
}
else {
- ADD_INSN1(ret, line, throw, INT2FIX(0x01) /* TAG_RETURN */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(TAG_RETURN));
if (poped) {
ADD_INSN(ret, line, pop);
}