Skip to content

Clean rb_reg_new_ary() up - #17104

Merged
XrXr merged 3 commits into
ruby:masterfrom
XrXr:delete-rb-reg-new-ary
May 26, 2026
Merged

Clean rb_reg_new_ary() up#17104
XrXr merged 3 commits into
ruby:masterfrom
XrXr:delete-rb-reg-new-ary

Conversation

@XrXr

@XrXr XrXr commented May 23, 2026

Copy link
Copy Markdown
Member

ref: #17092 (comment)

Delete now-unused rb_reg_new_ary()

No more usages outside re.c, so let's clean it up. Thanks to @nobu for
noticing!

ZJIT: Delete binding for unused rb_reg_new_ary()

YJIT: Use rb_reg_new_from_values() instead of rb_reg_new_ary()

To sync up with ZJIT and insns.def.

XrXr added 3 commits May 23, 2026 16:23
No more usages outside re.c, so let's clean it up. Thanks to @nobu for
noticing!
@matzbot
matzbot requested a review from a team May 23, 2026 20:36

@k0kubun k0kubun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏

Comment thread yjit/src/codegen.rs
asm.cpop_into(ary);

// The value we want to push on the stack is in RAX right now
let stack_ret = asm.stack_push(Type::UnknownHeap);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity why is it not typed as an array?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a RegExp object that comes out as this is for the toregex instruction.

@XrXr
XrXr merged commit e4cba2d into ruby:master May 26, 2026
123 of 126 checks passed
@XrXr
XrXr deleted the delete-rb-reg-new-ary branch May 26, 2026 17:04
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