ruby-changes:34634
From: ko1 <ko1@a...>
Date: Sun, 6 Jul 2014 21:47:15 +0900 (JST)
Subject: [ruby-changes:34634] ko1:r46717 (trunk): * gc.c (is_dying_object): fix missed condition.
ko1 2014-07-06 21:33:12 +0900 (Sun, 06 Jul 2014) New Revision: 46717 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46717 Log: * gc.c (is_dying_object): fix missed condition. * gc.c (is_live_object): move frequent path first. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 46716) +++ ChangeLog (revision 46717) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jul 6 21:30:35 2014 Koichi Sasada <ko1@a...> + + * gc.c (is_dying_object): fix missed condition. + + * gc.c (is_live_object): move frequent path first. + Sun Jul 6 21:00:11 2014 Koichi Sasada <ko1@a...> * gc.c: rename is_dead_object() to is_dying_object(). Index: gc.c =================================================================== --- gc.c (revision 46716) +++ gc.c (revision 46717) @@ -2333,7 +2333,7 @@ static inline int https://github.com/ruby/ruby/blob/trunk/gc.c#L2333 is_dying_object(rb_objspace_t *objspace, VALUE ptr) { if (!is_lazy_sweeping(heap_eden) || - !is_swept_object(objspace, ptr) || + is_swept_object(objspace, ptr) || MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(ptr), ptr)) { return FALSE; @@ -2352,11 +2352,11 @@ is_live_object(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L2352 return FALSE; } - if (is_dying_object(objspace, ptr)) { - return FALSE; + if (!is_dying_object(objspace, ptr)) { + return TRUE; } else { - return TRUE; + return FALSE; } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/