diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-27 23:51:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-27 23:51:18 +0000 |
commit | 1c59cc2ccecb81512a2789ece0691ada6172beed (patch) | |
tree | 34d5340b92abc68b0d7dc53af50f947b030ef61d /compile.c | |
parent | 55152ae26d200be3bd59170e9750949058fa82a2 (diff) | |
download | ruby-1c59cc2ccecb81512a2789ece0691ada6172beed.tar.gz |
vm_eval.c: simplify rb_iterate
* internal.h (IFUNC_NEW): add argument for ID.
* vm_eval.c (rb_iterate): create ifunnc only when it is used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5397,7 +5397,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) */ int is_index = iseq->is_size++; VALUE once_iseq = NEW_CHILD_ISEQVAL( - (NODE *)IFUNC_NEW(build_postexe_iseq, node->nd_body), + (NODE *)IFUNC_NEW(build_postexe_iseq, node->nd_body, 0), make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line); ADD_INSN2(ret, line, once, once_iseq, INT2FIX(is_index)); @@ -6315,7 +6315,7 @@ method_for_self(VALUE name, VALUE arg, rb_insn_func_t func, acc.arg = arg; acc.func = func; acc.line = caller_location(&path, &absolute_path); - return rb_iseq_new_with_opt((NODE *)IFUNC_NEW(build, (VALUE)&acc), + return rb_iseq_new_with_opt((NODE *)IFUNC_NEW(build, (VALUE)&acc, 0), rb_sym2str(name), path, absolute_path, INT2FIX(acc.line), 0, ISEQ_TYPE_METHOD, 0); } |