mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: omit newrange
* compile.c (iseq_compile_each): omit creating literal-only range to be popped immediately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70474e9bfc
commit
dae32a40d9
1 changed files with 5 additions and 8 deletions
13
compile.c
13
compile.c
|
@ -6088,16 +6088,13 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE *node, int popp
|
|||
iseq_add_mark_object_compile_time(iseq, val);
|
||||
ADD_INSN1(ret, line, putobject, val);
|
||||
}
|
||||
break;
|
||||
}
|
||||
CHECK(COMPILE(ret, "min", (NODE *) node->nd_beg));
|
||||
CHECK(COMPILE(ret, "max", (NODE *) node->nd_end));
|
||||
if (popped) {
|
||||
ADD_INSN(ret, line, pop);
|
||||
ADD_INSN(ret, line, pop);
|
||||
}
|
||||
else {
|
||||
ADD_INSN1(ret, line, newrange, flag);
|
||||
CHECK(COMPILE_(ret, "min", b, popped));
|
||||
CHECK(COMPILE_(ret, "max", e, popped));
|
||||
if (!popped) {
|
||||
ADD_INSN1(ret, line, newrange, flag);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue