1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (is_dying_object): fix missed condition.

* gc.c (is_live_object): move frequent path first.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2014-07-06 12:33:12 +00:00
parent 38943e80d6
commit 094949cb0a
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
Sun Jul 6 21:30:35 2014 Koichi Sasada <ko1@atdot.net>
* 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@atdot.net>
* gc.c: rename is_dead_object() to is_dying_object().

8
gc.c
View file

@ -2333,7 +2333,7 @@ static inline int
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, VALUE ptr)
return FALSE;
}
if (is_dying_object(objspace, ptr)) {
return FALSE;
if (!is_dying_object(objspace, ptr)) {
return TRUE;
}
else {
return TRUE;
return FALSE;
}
}