mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: stop modifying NODE tree
This fixes some modification remained in r60479 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5a176b75b1
commit
15270f48a9
1 changed files with 3 additions and 7 deletions
10
compile.c
10
compile.c
|
@ -5671,8 +5671,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in
|
|||
node->nd_args == NULL &&
|
||||
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
|
||||
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
|
||||
VALUE str = rb_fstring(node->nd_recv->nd_lit);
|
||||
iseq_add_mark_object(iseq, str);
|
||||
VALUE str = freeze_literal(iseq, node->nd_recv->nd_lit);
|
||||
if (node->nd_mid == idUMinus) {
|
||||
ADD_INSN1(ret, line, opt_str_uminus, str);
|
||||
}
|
||||
|
@ -5692,8 +5691,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in
|
|||
nd_type(node->nd_args->nd_head) == NODE_STR &&
|
||||
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
|
||||
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
|
||||
VALUE str = rb_fstring(node->nd_args->nd_head->nd_lit);
|
||||
node->nd_args->nd_head->nd_lit = str;
|
||||
VALUE str = freeze_literal(iseq, node->nd_args->nd_head->nd_lit);
|
||||
CHECK(COMPILE(ret, "recv", node->nd_recv));
|
||||
ADD_INSN3(ret, line, opt_aref_with,
|
||||
new_callinfo(iseq, idAREF, 1, 0, NULL, FALSE),
|
||||
|
@ -6743,9 +6741,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in
|
|||
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
|
||||
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction)
|
||||
{
|
||||
VALUE str = rb_fstring(node->nd_args->nd_head->nd_lit);
|
||||
node->nd_args->nd_head->nd_lit = str;
|
||||
iseq_add_mark_object(iseq, str);
|
||||
VALUE str = freeze_literal(iseq, node->nd_args->nd_head->nd_lit);
|
||||
CHECK(COMPILE(ret, "recv", node->nd_recv));
|
||||
CHECK(COMPILE(ret, "value", node->nd_args->nd_next->nd_head));
|
||||
if (!popped) {
|
||||
|
|
Loading…
Add table
Reference in a new issue