Skip to content

Get rid of SHAPE_T_OBJECT #13519

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 4 commits into from

Conversation

casperisfine
Copy link
Contributor

@casperisfine casperisfine commented Jun 5, 2025

Now the heap_index is stored as flags inside shape_id_t.

This saves having to rebuild the entire tree when moving from one slot size to the other.

It also potentially gives a cheap access to the slot size, whereas rb_gc_obj_slot_size often cause cache misses (but only for T_OBJECT right now. It could be valuable to have it for other types such as T_ARRAY, T_STRING as they often check the slot size).

Copy link

launchable-app bot commented Jun 5, 2025

Tests Failed

✖️no tests failed ✔️61823 tests passed(1 flake)

@casperisfine casperisfine force-pushed the refactor-shape-heap-id branch 9 times, most recently from 76e9c04 to 8ca11b0 Compare June 5, 2025 11:55
@casperisfine casperisfine force-pushed the refactor-shape-heap-id branch 2 times, most recently from 45c559c to 12d60fd Compare June 5, 2025 20:08
@casperisfine casperisfine force-pushed the refactor-shape-heap-id branch from 12d60fd to 858d2df Compare June 6, 2025 11:52
byroot added 4 commits June 7, 2025 12:16
This is preparation to getting rid of `T_OBJECT` transitions.
By first only replicating the information it's easier to ensure
consistency.
Now the `heap_index` is stored as flags inside `shape_id_t`.

This saves having to rebuild the entire tree when moving from one
slot size to the other.
@byroot
Copy link
Member

byroot commented Jun 7, 2025

Merged most of this as #13556

@byroot byroot closed this Jun 7, 2025
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.

2 participants