mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c (iseq_set_sequence, compile_dstr_fragments),
(iseq_compile_each): hides other internal objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b7dbd3e31
commit
11a4e69447
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Feb 13 01:29:16 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* compile.c (iseq_set_sequence, compile_dstr_fragments),
|
||||
(iseq_compile_each): hides other internal objects.
|
||||
|
||||
Fri Feb 13 00:48:42 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* insns.def (defineclass): try to autoload const to be overridden.
|
||||
|
|
|
@ -1361,6 +1361,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
|||
"duplicated when clause is ignored");
|
||||
}
|
||||
}
|
||||
hide_obj(map);
|
||||
generated_iseq[pos + 1 + j] = map;
|
||||
iseq_add_mark_object(iseq, map);
|
||||
break;
|
||||
|
@ -2121,7 +2122,8 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int *cntp
|
|||
int cnt = 1;
|
||||
|
||||
debugp_param("nd_lit", lit);
|
||||
ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit);
|
||||
hide_obj(lit);
|
||||
ADD_INSN1(ret, nd_line(node), putobject, lit);
|
||||
|
||||
while (list) {
|
||||
COMPILE(ret, "each string", list->nd_head);
|
||||
|
@ -2237,7 +2239,7 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
|
|||
rb_ary_push(ary, node->nd_head->nd_lit);
|
||||
node = node->nd_next;
|
||||
}
|
||||
|
||||
OBJ_FREEZE(ary);
|
||||
iseq_add_mark_object_compile_time(iseq, ary);
|
||||
ADD_INSN1(ret, nd_line(node_root), duparray, ary);
|
||||
}
|
||||
|
@ -4369,6 +4371,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
break;
|
||||
}
|
||||
case NODE_XSTR:{
|
||||
hide_obj(node->nd_lit);
|
||||
ADD_CALL_RECEIVER(ret, nd_line(node));
|
||||
ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit);
|
||||
ADD_CALL(ret, nd_line(node), ID2SYM(idBackquote), INT2FIX(1));
|
||||
|
@ -4660,6 +4663,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
RSTRING_PTR(iseq->name), (void *)iseq,
|
||||
iseq->compile_data->flip_cnt++);
|
||||
|
||||
hide_obj(key);
|
||||
iseq_add_mark_object_compile_time(iseq, key);
|
||||
ADD_INSN2(ret, nd_line(node), getspecial, key, INT2FIX(0));
|
||||
ADD_INSNL(ret, nd_line(node), branchif, lend);
|
||||
|
|
Loading…
Reference in a new issue