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

ruby-changes:12947

From: nobu <ko1@a...>
Date: Fri, 28 Aug 2009 09:31:14 +0900 (JST)
Subject: [ruby-changes:12947] Ruby:r24687 (trunk): * iseq.c (iseq_mark): made invariant expressions constant references.

nobu	2009-08-28 09:31:01 +0900 (Fri, 28 Aug 2009)

  New Revision: 24687

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

  Log:
    * iseq.c (iseq_mark): made invariant expressions constant references.

  Modified files:
    trunk/iseq.c

Index: iseq.c
===================================================================
--- iseq.c	(revision 24686)
+++ iseq.c	(revision 24687)
@@ -105,17 +105,19 @@
 	RUBY_MARK_UNLESS_NULL(iseq->orig);
 
 	for (i=0; i<iseq->ic_size; i++) {
-	    RUBY_MARK_UNLESS_NULL(iseq->ic_entries[i].ic_class);
-	    RUBY_MARK_UNLESS_NULL(iseq->ic_entries[i].ic_value);
-	    if (iseq->ic_entries[i].ic_method) {
-		rb_gc_mark_method_entry(iseq->ic_entries[i].ic_method);
+	    struct iseq_inline_cache_entry *const ic = &iseq->ic_entries[i];
+	    RUBY_MARK_UNLESS_NULL(ic->ic_class);
+	    RUBY_MARK_UNLESS_NULL(ic->ic_value);
+	    if (ic->ic_method) {
+		rb_gc_mark_method_entry(ic->ic_method);
 	    }
 	}
 
 	if (iseq->compile_data != 0) {
-	    RUBY_MARK_UNLESS_NULL(iseq->compile_data->mark_ary);
-	    RUBY_MARK_UNLESS_NULL(iseq->compile_data->err_info);
-	    RUBY_MARK_UNLESS_NULL(iseq->compile_data->catch_table_ary);
+	    struct iseq_compile_data *const compile_data = iseq->compile_data;
+	    RUBY_MARK_UNLESS_NULL(compile_data->mark_ary);
+	    RUBY_MARK_UNLESS_NULL(compile_data->err_info);
+	    RUBY_MARK_UNLESS_NULL(compile_data->catch_table_ary);
 	}
     }
     RUBY_MARK_LEAVE("iseq");

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

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