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

ruby-changes:12142

From: nobu <ko1@a...>
Date: Mon, 22 Jun 2009 16:14:47 +0900 (JST)
Subject: [ruby-changes:12142] Ruby:r23815 (trunk): * compile.c (iseq_set_arguments, iseq_compile_each): internal

nobu	2009-06-22 16:14:32 +0900 (Mon, 22 Jun 2009)

  New Revision: 23815

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

  Log:
    * compile.c (iseq_set_arguments, iseq_compile_each): internal
      arrays must be hidden.  [ruby-dev:38613]
    * vm.c (Init_top_self): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/vm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23814)
+++ ChangeLog	(revision 23815)
@@ -1,3 +1,10 @@
+Mon Jun 22 16:14:30 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* compile.c (iseq_set_arguments, iseq_compile_each): internal
+	  arrays must be hidden.  [ruby-dev:38613]
+
+	* vm.c (Init_top_self): ditto.
+
 Mon Jun 22 14:41:47 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* ruby.c (process_options), enc/prelude.rb: encdb and transdb are
Index: compile.c
===================================================================
--- compile.c	(revision 23814)
+++ compile.c	(revision 23815)
@@ -1089,7 +1089,7 @@
 	if (node_opt) {
 	    NODE *node = node_opt;
 	    LABEL *label;
-	    VALUE labels = rb_ary_new();
+	    VALUE labels = rb_ary_tmp_new(1);
 	    int i = 0, j;
 
 	    while (node) {
@@ -1113,6 +1113,7 @@
 	    for (j = 0; j < i; j++) {
 		iseq->arg_opt_table[j] &= ~1;
 	    }
+	    rb_ary_clear(labels);
 	}
 	else {
 	    iseq->arg_opts = 0;
@@ -3013,7 +3014,7 @@
 	DECL_ANCHOR(head);
 	DECL_ANCHOR(body_seq);
 	DECL_ANCHOR(cond_seq);
-	VALUE special_literals = rb_ary_new();
+	VALUE special_literals = rb_ary_tmp_new(1);
 
 	INIT_ANCHOR(head);
 	INIT_ANCHOR(body_seq);
Index: vm.c
===================================================================
--- vm.c	(revision 23814)
+++ vm.c	(revision 23815)
@@ -2066,7 +2066,7 @@
     rb_define_singleton_method(rb_vm_top_self(), "to_s", main_to_s, 0);
 
     /* initialize mark object array */
-    vm->mark_object_ary = rb_ary_new();
+    vm->mark_object_ary = rb_ary_tmp_new(1);
 }
 
 VALUE *

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

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