Skip to content

ZJIT: Fix kwargs handling in invokeblock ifunc specialization#17971

Open
dak2 wants to merge 1 commit into
ruby:masterfrom
dak2:zjit-fix-invokeblock-ifunc-kwarg
Open

ZJIT: Fix kwargs handling in invokeblock ifunc specialization#17971
dak2 wants to merge 1 commit into
ruby:masterfrom
dak2:zjit-fix-invokeblock-ifunc-kwarg

Conversation

@dak2

@dak2 dak2 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Closes: Shopify#1018

gen_invokeblock_ifunc drops the callinfo and passes argv straight to rb_vm_yield_with_cfunc, which hardcodes kw_splat = 0, so keyword arguments lost their keyword-ness.

Gate the ifunc specialization on block_call_inlinable, the same check used for the inline ISEQ path.

@matzbot
matzbot requested a review from a team July 19, 2026 02:41
@tekknolagi

Copy link
Copy Markdown
Contributor

Thanks! Can you please add an HIR opt test? We rely a lot on those.

@dak2
dak2 force-pushed the zjit-fix-invokeblock-ifunc-kwarg branch 3 times, most recently from 68480eb to 548244c Compare July 20, 2026 02:19
@dak2

dak2 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@tekknolagi
Oh, sorry about that, completely forgot.
Addressed, thanks!

gen_invokeblock_ifunc drops the callinfo and passes argv straight to
rb_vm_yield_with_cfunc, which hardcodes kw_splat = 0, so keyword
arguments lost their keyword-ness. Gate the ifunc specialization on
block_call_inlinable, the same check used for the inline ISEQ path.
@dak2
dak2 force-pushed the zjit-fix-invokeblock-ifunc-kwarg branch from 548244c to ed222bf Compare July 20, 2026 02:33
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.

ZJIT: invokeblock IFUNC specialization drops keyword-ness of literal kwargs

2 participants