summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2021-09-01 10:42:22 -0400
committerPeter Zhu <peter@peterzhu.ca>2021-09-01 13:42:22 -0400
commit0aa82b592fc3296ffde1f3fff59018a998c3ade0 (patch)
tree467fb65532377b72f363daf3beaf20ea45a034f2 /gc.c
parent3c85698da2fd65d51db423e550efa5a9e6e13c0a (diff)
Remove heap_is_swept_object function
is_swept_object just calls heap_is_swept_object so remove heap_is_swept_object.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4799
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/gc.c b/gc.c
index 7764daa18c..2b57241f60 100644
--- a/gc.c
+++ b/gc.c
@@ -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)