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

ruby-changes:33737

From: nagachika <ko1@a...>
Date: Mon, 5 May 2014 01:26:37 +0900 (JST)
Subject: [ruby-changes:33737] nagachika:r45818 (ruby_2_1): merge revision(s) r45638: [Backport #9518]

nagachika	2014-05-05 01:26:30 +0900 (Mon, 05 May 2014)

  New Revision: 45818

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

  Log:
    merge revision(s) r45638: [Backport #9518]
    
    * gc.c (rb_gc_writebarrier): drop special case for big hash/array
      [Bug #9518]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/gc.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 45817)
+++ ruby_2_1/ChangeLog	(revision 45818)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Mon May  5 01:20:27 2014  Eric Wong  <e@8...>
+
+	* gc.c (rb_gc_writebarrier): drop special case for big hash/array
+	  [Bug #9518]
+
 Mon May  5 01:13:00 2014  Koichi Sasada  <ko1@a...>
 
 	* gc.c (gc_before_sweep): cap `malloc_limit' to
Index: ruby_2_1/gc.c
===================================================================
--- ruby_2_1/gc.c	(revision 45817)
+++ ruby_2_1/gc.c	(revision 45818)
@@ -4729,20 +4729,9 @@ rb_gc_writebarrier(VALUE a, VALUE b) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L4729
 	rb_objspace_t *objspace = &rb_objspace;
 
 	if (!rgengc_remembered(objspace, a)) {
-	    int type = BUILTIN_TYPE(a);
-	    /* TODO: 2 << 16 is just a magic number. */
-	    if ((type == T_ARRAY && RARRAY_LEN(a) >= 2 << 16) ||
-		(type == T_HASH  && RHASH_SIZE(a) >= 2 << 16)) {
-		if (!rgengc_remembered(objspace, b)) {
-		    rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n", (void *)a, obj_type_name(a), (void *)b, obj_type_name(b));
-		    rgengc_remember(objspace, b);
-		}
-	    }
-	    else {
-		rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n",
-			      (void *)a, obj_type_name(a), (void *)b, obj_type_name(b));
-		rgengc_remember(objspace, a);
-	    }
+	    rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n",
+			  (void *)a, obj_type_name(a), (void *)b, obj_type_name(b));
+	    rgengc_remember(objspace, a);
 	}
     }
 }
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 45817)
+++ ruby_2_1/version.h	(revision 45818)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.2"
 #define RUBY_RELEASE_DATE "2014-05-05"
-#define RUBY_PATCHLEVEL 88
+#define RUBY_PATCHLEVEL 89
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 5

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r45638


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

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