ruby-changes:48373
From: mame <ko1@a...>
Date: Sat, 28 Oct 2017 01:35:03 +0900 (JST)
Subject: [ruby-changes:48373] mame:r60487 (trunk): compile.c: stop modifying NODE tree
mame 2017-10-28 01:34:57 +0900 (Sat, 28 Oct 2017) New Revision: 60487 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60487 Log: compile.c: stop modifying NODE tree This fixes some modification remained in r60479 Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 60486) +++ compile.c (revision 60487) @@ -5671,8 +5671,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK https://github.com/ruby/ruby/blob/trunk/compile.c#L5671 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 https://github.com/ruby/ruby/blob/trunk/compile.c#L5691 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 https://github.com/ruby/ruby/blob/trunk/compile.c#L6741 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) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/