Skip to content

Commit

Permalink
Remove heap_is_swept_object function
Browse files Browse the repository at this point in the history
is_swept_object just calls heap_is_swept_object so remove
heap_is_swept_object.
  • Loading branch information
peterzhu2118 committed Sep 1, 2021
1 parent 3c85698 commit 0aa82b5
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4246,23 +4246,12 @@ is_id_value(rb_objspace_t *objspace, VALUE ptr)
}

static inline int
heap_is_swept_object(rb_objspace_t *objspace, VALUE ptr)
is_swept_object(rb_objspace_t *objspace, VALUE ptr)
{
struct heap_page *page = GET_HEAP_PAGE(ptr);
return page->flags.before_sweep ? FALSE : TRUE;
}

static inline int
is_swept_object(rb_objspace_t *objspace, VALUE ptr)
{
if (heap_is_swept_object(objspace, ptr)) {
return TRUE;
}
else {
return FALSE;
}
}

/* garbage objects will be collected soon. */
static inline int
is_garbage_object(rb_objspace_t *objspace, VALUE ptr)
Expand Down

0 comments on commit 0aa82b5

Please sign in to comment.