summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-06 12:33:12 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-06 12:33:12 +0000
commit094949cb0a9d27a5e9575e22973a7640f33fd99d (patch)
tree0f58a69c23f4aff03821418cdeca100755fda9e9 /gc.c
parent38943e80d6f5704853ea25aaebacc838da20ef76 (diff)
* 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
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gc.c b/gc.c
index cb14033717..2d0ba1d61d 100644
--- a/gc.c
+++ b/gc.c
@@ -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;
}
}