Skip to content

No need to rb_clear_constant_cache in GC.compact #4987

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

Closed
wants to merge 0 commits into from

Conversation

kddnewton
Copy link
Contributor

We don't need to clear the constant cache because the compactor will update the cache references embedded in the instruction sequences. The inline caches are imemo objects which can move and are moved correctly. When the iseq references are updated, it calls the given callback for the inline cache inside iseq.c's iseq_extract_values function (in the TS_IC clause).

@kddnewton
Copy link
Contributor Author

cc @tenderlove

@kddnewton kddnewton closed this May 12, 2022
@kddnewton kddnewton force-pushed the no-clear-cache-in-gc branch from 7724441 to 7522343 Compare May 12, 2022 13:41
@kddnewton kddnewton deleted the no-clear-cache-in-gc branch May 12, 2022 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant