Skip to content

ZJIT: Call only one function for newhash/toregexp - #17092

Merged
k0kubun merged 1 commit into
ruby:masterfrom
k0kubun:zjit-combine-c
May 23, 2026
Merged

ZJIT: Call only one function for newhash/toregexp#17092
k0kubun merged 1 commit into
ruby:masterfrom
k0kubun:zjit-combine-c

Conversation

@k0kubun

@k0kubun k0kubun commented May 22, 2026

Copy link
Copy Markdown
Member

This PR merges C functions used by newhash and toreexp instructions into one for each of them.

When we introduce stack maps, we will need to write a JITFrame for every C call, even if multiple calls share the same FrameState. Calling fewer C functions allows us to reduce not only pushes/pops but also JITFrame writes.

@matzbot
matzbot requested a review from a team May 22, 2026 22:41
@k0kubun
k0kubun merged commit 5855d61 into ruby:master May 23, 2026
117 checks passed
@k0kubun
k0kubun deleted the zjit-combine-c branch May 23, 2026 00:08
@nobu

nobu commented May 23, 2026

Copy link
Copy Markdown
Member

Now rb_reg_new_ary looks used only in YJIT.
Remove?

@XrXr XrXr mentioned this pull request May 23, 2026
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