Skip to content

Get rid of TOO_COMPLEX shape type #13511

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 4, 2025
Merged

Conversation

casperisfine
Copy link
Contributor

Instead it's now a shape_id flag.

This allows to check if an object is complex without having to chase the rb_shape_t pointer.

@matzbot matzbot requested a review from a team June 4, 2025 08:21
Instead it's now a `shape_id` flag.

This allows to check if an object is complex without having
to chase the `rb_shape_t` pointer.
@byroot byroot merged commit 675f335 into ruby:master Jun 4, 2025
82 checks passed
@etiennebarrie
Copy link
Contributor

Not sure what SHAPE_FL_NON_CANONICAL_MASK is, but should the new flag be added to that mask? or the mask removed since it's unused?

@byroot
Copy link
Member

byroot commented Jun 4, 2025

Not sure what SHAPE_FL_NON_CANONICAL_MASK is

It's the flags that need to be cleared on a .dup. So frozen and object_id, hence too_complex isn't part of it.

@etiennebarrie
Copy link
Contributor

But it's not used by dup? rb_obj_copy_ivar calls a similarly-named rb_shape_canonical_p but it doesn't use that specific mask.

@byroot
Copy link
Member

byroot commented Jun 4, 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.

3 participants