diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-20 13:50:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-20 13:50:14 +0000 |
commit | 16ab763b1fb762eb8d837267ba6e7c7939d7d6db (patch) | |
tree | db831a89549aa2dfc3700e769b59f74dfb892ff5 /compile.c | |
parent | 4e554319ddcf1e7026641aad4a6197afb9df03c0 (diff) | |
download | ruby-16ab763b1fb762eb8d837267ba6e7c7939d7d6db.tar.gz |
* compile.c (iseq_compile_each): NODE_POSTEXE should set each end
procs only once. [ruby-dev:35596]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4527,12 +4527,21 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) break; } case NODE_POSTEXE:{ + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); VALUE block = NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK); + ADD_LABEL(ret, lstart); + ADD_INSN2(ret, nd_line(node), onceinlinecache, 0, lend); + ADD_INSN(ret, nd_line(node), pop); + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); ADD_INSN1(ret, nd_line(node), putiseq, block); ADD_SEND (ret, nd_line(node), ID2SYM(id_core_set_postexe), INT2FIX(1)); + ADD_INSN1(ret, nd_line(node), setinlinecache, lstart); + ADD_LABEL(ret, lend); + if (poped) { ADD_INSN(ret, nd_line(node), pop); } |