[前][次][番号順一覧][スレッド一覧]

ruby-changes:40859

From: normal <ko1@a...>
Date: Tue, 8 Dec 2015 13:32:42 +0900 (JST)
Subject: [ruby-changes:40859] normal:r52938 (trunk): compile.c (iseq_build_from_ary_body): avoid rb_ary_dup for CDHASH

normal	2015-12-08 13:32:23 +0900 (Tue, 08 Dec 2015)

  New Revision: 52938

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52938

  Log:
    compile.c (iseq_build_from_ary_body): avoid rb_ary_dup for CDHASH
    
    This reverts r16587
    ("compile.c (iseq_build_body): remove side effect from
      VM::InstructionSequence.load."
    as that change was obsoleted by r48705 ("mostly fix rb_iseq_load")

  Modified files:
    trunk/compile.c
Index: compile.c
===================================================================
--- compile.c	(revision 52937)
+++ compile.c	(revision 52938)
@@ -6407,7 +6407,6 @@ iseq_build_from_ary_body(rb_iseq_t *iseq https://github.com/ruby/ruby/blob/trunk/compile.c#L6407
 
 			    rb_hash_tbl_raw(map)->type = &cdhash_type;
 			    op = rb_convert_type(op, T_ARRAY, "Array", "to_ary");
-			    op = rb_ary_dup(op);
 			    for (i=0; i<RARRAY_LEN(op); i+=2) {
 				VALUE key = RARRAY_AREF(op, i);
 				VALUE sym = RARRAY_AREF(op, i+1);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]