mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* compile.c (iseq_compile_each): inline cache entries are overwritten
in iseq_build_body(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
458c4e98aa
commit
73c8bfa648
2 changed files with 9 additions and 8 deletions
12
compile.c
12
compile.c
|
@ -3843,8 +3843,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
LABEL *lend = NEW_LABEL(nd_line(node));
|
||||
|
||||
ADD_LABEL(ret, lstart);
|
||||
ADD_INSN2(ret, nd_line(node), getinlinecache,
|
||||
NEW_INLINE_CACHE_ENTRY(), lend);
|
||||
ADD_INSN2(ret, nd_line(node), getinlinecache, 0, lend);
|
||||
ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(node->nd_vid));
|
||||
ADD_INSN1(ret, nd_line(node), setinlinecache, lstart);
|
||||
ADD_LABEL(ret, lend);
|
||||
|
@ -3998,8 +3997,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
LABEL *lend = NEW_LABEL(nd_line(node));
|
||||
|
||||
ADD_LABEL(ret, lstart);
|
||||
ADD_INSN2(ret, nd_line(node), onceinlinecache,
|
||||
NEW_INLINE_CACHE_ENTRY(), lend);
|
||||
ADD_INSN2(ret, nd_line(node), onceinlinecache, 0, lend);
|
||||
ADD_INSN(ret, nd_line(node), pop);
|
||||
|
||||
compile_dstr(iseq, ret, node);
|
||||
|
@ -4162,8 +4160,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
if (LIST_SIZE_ZERO(pref)) {
|
||||
if (iseq->compile_data->option->inline_const_cache) {
|
||||
ADD_LABEL(ret, lstart);
|
||||
ADD_INSN2(ret, nd_line(node), getinlinecache,
|
||||
NEW_INLINE_CACHE_ENTRY(), lend);
|
||||
ADD_INSN2(ret, nd_line(node), getinlinecache, 0, lend);
|
||||
}
|
||||
else {
|
||||
ADD_INSN(ret, nd_line(node), putnil);
|
||||
|
@ -4201,8 +4198,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
/* add cache insn */
|
||||
if (iseq->compile_data->option->inline_const_cache) {
|
||||
ADD_LABEL(ret, lstart);
|
||||
ADD_INSN2(ret, nd_line(node), getinlinecache,
|
||||
NEW_INLINE_CACHE_ENTRY(), lend);
|
||||
ADD_INSN2(ret, nd_line(node), getinlinecache, 0, lend);
|
||||
ADD_INSN(ret, nd_line(node), pop);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue