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

ruby-changes:34643

From: ko1 <ko1@a...>
Date: Mon, 7 Jul 2014 00:43:02 +0900 (JST)
Subject: [ruby-changes:34643] ko1:r46726 (trunk): * gc.c: rename is_dying_object() to is_garbage_object().

ko1	2014-07-07 00:42:14 +0900 (Mon, 07 Jul 2014)

  New Revision: 46726

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

  Log:
    * gc.c: rename is_dying_object() to is_garbage_object().
    * gc.h: rb_objspace_garbage_object_p() as an exported function.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/gc.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46725)
+++ ChangeLog	(revision 46726)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jul  7 00:36:13 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c: rename is_dying_object() to is_garbage_object().
+
+	* gc.h: rb_objspace_garbage_object_p() as an exported function.
+
 Sun Jul  6 21:30:35 2014  Koichi Sasada  <ko1@a...>
 
 	* gc.c (is_dying_object): fix missed condition.
Index: gc.c
===================================================================
--- gc.c	(revision 46725)
+++ gc.c	(revision 46726)
@@ -2329,8 +2329,9 @@ is_swept_object(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L2329
     }
 }
 
+/* garbage objects will be collected soon. */
 static inline int
-is_dying_object(rb_objspace_t *objspace, VALUE ptr)
+is_garbage_object(rb_objspace_t *objspace, VALUE ptr)
 {
     if (!is_lazy_sweeping(heap_eden) ||
 	is_swept_object(objspace, ptr) ||
@@ -2352,7 +2353,7 @@ is_live_object(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L2353
 	return FALSE;
     }
 
-    if (!is_dying_object(objspace, ptr)) {
+    if (!is_garbage_object(objspace, ptr)) {
 	return TRUE;
     }
     else {
@@ -2382,10 +2383,10 @@ rb_objspace_markable_object_p(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L2383
 }
 
 int
-rb_objspace_dying_object_p(VALUE obj)
+rb_objspace_garbage_object_p(VALUE obj)
 {
     rb_objspace_t *objspace = &rb_objspace;
-    return is_dying_object(objspace, obj);
+    return is_garbage_object(objspace, obj);
 }
 
 /*
Index: gc.h
===================================================================
--- gc.h	(revision 46725)
+++ gc.h	(revision 46726)
@@ -92,6 +92,7 @@ void rb_objspace_reachable_objects_from_ https://github.com/ruby/ruby/blob/trunk/gc.h#L92
 int rb_objspace_markable_object_p(VALUE obj);
 int rb_objspace_internal_object_p(VALUE obj);
 int rb_objspace_marked_object_p(VALUE obj);
+int rb_objspace_garbage_object_p(VALUE obj);
 
 void rb_objspace_each_objects(
     int (*callback)(void *start, void *end, size_t stride, void *data),

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

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