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

ruby-changes:29353

From: ko1 <ko1@a...>
Date: Wed, 19 Jun 2013 07:27:07 +0900 (JST)
Subject: [ruby-changes:29353] ko1:r41405 (trunk): * gc.c (make_deferred): clear flags to T_ZOMBIE.

ko1	2013-06-19 07:26:57 +0900 (Wed, 19 Jun 2013)

  New Revision: 41405

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

  Log:
    * gc.c (make_deferred): clear flags to T_ZOMBIE.
    * gc.c (slot_sweep_body): fix indent.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41404)
+++ ChangeLog	(revision 41405)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jun 19 07:25:35 2013  Koichi Sasada  <ko1@a...>
+
+	* gc.c (make_deferred): clear flags to T_ZOMBIE.
+
+	* gc.c (slot_sweep_body): fix indent.
+
 Wed Jun 19 07:18:47 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
Index: gc.c
===================================================================
--- gc.c	(revision 41404)
+++ gc.c	(revision 41405)
@@ -1151,7 +1151,7 @@ free_unused_heaps(rb_objspace_t *objspac https://github.com/ruby/ruby/blob/trunk/gc.c#L1151
 static inline void
 make_deferred(RVALUE *p)
 {
-    p->as.basic.flags = (p->as.basic.flags & ~T_MASK) | T_ZOMBIE;
+    p->as.basic.flags = T_ZOMBIE;
 }
 
 static inline void
@@ -2200,19 +2200,16 @@ slot_sweep_body(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L2200
 		if ((bitset & 1) && BUILTIN_TYPE(p) != T_ZOMBIE) {
 		    if (p->as.basic.flags) {
 #if GC_PROFILE_MORE_DETAIL
-			if(record)
-			    record->removing_objects++;
+			if(record) record->removing_objects++;
 #endif
 			rgengc_report(3, objspace, "slot_sweep_body: free %p (%s)\n", p, obj_type_name((VALUE)p));
 #if USE_RGENGC && RGENGC_CHECK_MODE
 			if (objspace->rgengc.during_minor_gc && RVALUE_PROMOTED(p)) rb_bug("slot_sweep_body: %p (%s) is promoted.\n", p, obj_type_name((VALUE)p));
 			if (rgengc_remembered(objspace, (VALUE)p)) rb_bug("slot_sweep_body: %p (%s) is remembered.\n", p, obj_type_name((VALUE)p));
 #endif
-			if ((deferred = obj_free(objspace, (VALUE)p)) ||
-			    (FL_TEST(p, FL_FINALIZE))) {
+			if ((deferred = obj_free(objspace, (VALUE)p)) || (FL_TEST(p, FL_FINALIZE))) {
 			    if (!deferred) {
 				p->as.free.flags = T_ZOMBIE;
-
 				RDATA(p)->dfree = 0;
 			    }
 			    p->as.free.next = deferred_final_list;

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

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