Skip to content

ZJIT: Support invokebuiltin opcodes#13632

Merged
k0kubun merged 1 commit intoruby:masterfrom
composerinteralia:zjit-invokebuiltin
Jun 18, 2025
Merged

ZJIT: Support invokebuiltin opcodes#13632
k0kubun merged 1 commit intoruby:masterfrom
composerinteralia:zjit-invokebuiltin

Conversation

@composerinteralia
Copy link
Contributor

  • invokebuiltin
  • invokebuiltin_delegate
  • invokebuiltin_delegate_leave

These instructions all call out to a C function, passing EC, self, and some number of arguments. invokebuiltin gets the arguments from the stack, whereas the _delegate instructions use a subset of the locals.

opt_invokebuiltin_delegate_leave has a fast path for leave, but I'm not sure we need to do anything special for that here (FWIW YJIT appears to treat the two delegate instructions the same).

@matzbot matzbot requested a review from a team June 17, 2025 01:35
@composerinteralia composerinteralia force-pushed the zjit-invokebuiltin branch 3 times, most recently from cc65b77 to 2dea571 Compare June 17, 2025 21:00
Copy link
Contributor

@tekknolagi tekknolagi left a comment

Choose a reason for hiding this comment

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

This is so cool

* `invokebuiltin`
* `invokebuiltin_delegate`
* `invokebuiltin_delegate_leave`

These instructions all call out to a C function, passing EC, self, and
some number of arguments. `invokebuiltin` gets the arguments from the
stack, whereas the `_delegate` instructions use a subset of the locals.

`opt_invokebuiltin_delegate_leave` has a fast path for `leave`, but I'm
not sure we need to do anything special for that here (FWIW YJIT appears
to treat the two delegate instructions the same).
@k0kubun k0kubun merged commit 3290d3d into ruby:master Jun 18, 2025
84 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.

4 participants