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

ruby-changes:29944

From: ko1 <ko1@a...>
Date: Tue, 16 Jul 2013 15:11:07 +0900 (JST)
Subject: [ruby-changes:29944] ko1:r41996 (trunk): revert last commit because it fails test-all.

ko1	2013-07-16 15:10:56 +0900 (Tue, 16 Jul 2013)

  New Revision: 41996

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

  Log:
    revert last commit because it fails test-all.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41995)
+++ ChangeLog	(revision 41996)
@@ -1,7 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Tue Jul 16 14:59:09 2013  Koichi Sasada  <ko1@a...>
-
-	* gc.c (after_gc_sweep): refactoring code.
-
 Tue Jul 16 13:32:06 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* encoding.c (enc_set_index): since r41967, old terminator is dealt
Index: gc.c
===================================================================
--- gc.c	(revision 41995)
+++ gc.c	(revision 41996)
@@ -2384,20 +2384,18 @@ after_gc_sweep(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L2384
 static int
 lazy_sweep(rb_objspace_t *objspace)
 {
-    struct heaps_slot *slot;
+    struct heaps_slot *next;
     int result = FALSE;
 
     gc_prof_sweep_timer_start(objspace);
 
     heaps_increment(objspace);
-    slot = objspace->heap.sweep_slots;
+    while (is_lazy_sweeping(objspace)) {
+        next = objspace->heap.sweep_slots->next;
+	slot_sweep(objspace, objspace->heap.sweep_slots);
+        objspace->heap.sweep_slots = next;
 
-    while (slot) {
-	slot_sweep(objspace, slot);
-
-	if ((objspace->heap.sweep_slots = slot = slot->next) == NULL) {
-	    after_gc_sweep(objspace);
-	}
+	if (!next) after_gc_sweep(objspace);
 
         if (has_free_object) {
             result = TRUE;

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

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