Simplify is_garbage_object
This commit is contained in:
parent
e14a68a1bf
commit
3c44f6da6c
11
gc.c
11
gc.c
@ -4376,15 +4376,8 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
|
|||||||
static inline int
|
static inline int
|
||||||
is_garbage_object(rb_objspace_t *objspace, VALUE ptr)
|
is_garbage_object(rb_objspace_t *objspace, VALUE ptr)
|
||||||
{
|
{
|
||||||
if (!is_lazy_sweeping(objspace) ||
|
return is_lazy_sweeping(objspace) && GET_HEAP_PAGE(ptr)->flags.before_sweep &&
|
||||||
!GET_HEAP_PAGE(ptr)->flags.before_sweep ||
|
!MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(ptr), ptr);
|
||||||
MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(ptr), ptr)) {
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user