Skip to content

Use all 32bits of shape_id_t on all platforms #13500

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

casperisfine
Copy link
Contributor

Followup: #13341 / [Feature #21353]

Even thought shape_id_t has been make 32bits, we were still limited to use only the lower 16 bits because they had to fit alongside attr_index_t inside a uintptr_t in inline caches.

By enlarging inline caches we can unlock the full 32bits on all platforms, allowing to use these extra bits for tagging.

@casperisfine casperisfine force-pushed the 64-bit-inline-caches branch 4 times, most recently from e525a4c to 9f68011 Compare June 3, 2025 11:30

This comment has been minimized.

@casperisfine casperisfine force-pushed the 64-bit-inline-caches branch 2 times, most recently from 640c8db to 7b06792 Compare June 3, 2025 16:37
@casperisfine casperisfine marked this pull request as ready for review June 3, 2025 17:29
@matzbot matzbot requested a review from a team June 3, 2025 17:29
@casperisfine casperisfine force-pushed the 64-bit-inline-caches branch 2 times, most recently from 96a0e92 to 0688f2c Compare June 3, 2025 17:59
Followup: ruby#13341 / [Feature #21353]

Even thought `shape_id_t` has been make 32bits, we were still limited
to use only the lower 16 bits because they had to fit alongside `attr_index_t`
inside a `uintptr_t` in inline caches.

By enlarging inline caches we can unlock the full 32bits on all
platforms, allowing to use these extra bits for tagging.
@casperisfine casperisfine force-pushed the 64-bit-inline-caches branch from 0688f2c to d6166ff Compare June 3, 2025 18:23
@byroot byroot enabled auto-merge (rebase) June 3, 2025 18:59
@byroot byroot merged commit e27404a into ruby:master Jun 3, 2025
82 checks passed
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