Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor live and garbage obj check #10359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eileencodes
Copy link
Contributor

This PR moves the code for is_live_object into is_garbage_object because they are opposite of one another. It also replaces calls to is_live_object and rb_objspace_markable_object_p with !is_garbage_object and !rb_objspace_garbage_object_p respectively.

This refactor reduces the surface area of the GC API.

@eileencodes eileencodes requested a review from a team as a code owner March 25, 2024 18:21

This comment has been minimized.

@eileencodes eileencodes force-pushed the refactor-live-and-garbage-obj-check branch 2 times, most recently from 0258a4b to ea84c29 Compare March 26, 2024 15:14
This PR moves the code for `is_live_object` into `is_garbage_object`
because they are opposite of one another. It also replaces calls to
`is_live_object` and `rb_objspace_markable_object_p` with
`!is_garbage_object` and `!rb_objspace_garbage_object_p` respectively.

This refactor reduces the surface area of the GC API.

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
@eileencodes eileencodes force-pushed the refactor-live-and-garbage-obj-check branch from ea84c29 to 54484ba Compare March 26, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant