mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
* iseq_compile_each (NODE_DEFINED): put nil first to fix stack
consistency. [ruby-core:30293] Now, lfinish[0] of defined_expr seems not to be used. Refactoring may be needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bc85fde333
commit
0aef600891
3 changed files with 20 additions and 2 deletions
|
@ -4815,11 +4815,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
LABEL *lfinish[2];
|
||||
lfinish[0] = NEW_LABEL(nd_line(node));
|
||||
lfinish[1] = 0;
|
||||
ADD_INSN(ret, nd_line(node), putnil);
|
||||
defined_expr(iseq, ret, node->nd_head, lfinish, Qtrue);
|
||||
ADD_INSN(ret, nd_line(node), swap);
|
||||
ADD_INSN(ret, nd_line(node), pop);
|
||||
if (lfinish[1]) {
|
||||
ADD_INSNL(ret, nd_line(node), jump, lfinish[0]);
|
||||
ADD_LABEL(ret, lfinish[1]);
|
||||
ADD_INSN(ret, nd_line(node), putnil);
|
||||
}
|
||||
ADD_LABEL(ret, lfinish[0]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue