-
Notifications
You must be signed in to change notification settings - Fork 5.5k
ZJIT: Support variadic C calls #14575
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
Conversation
This comment has been minimized.
This comment has been minimized.
d5b8b93
to
b884653
Compare
ed7068e
to
aa5b153
Compare
aa5b153
to
30b288d
Compare
I guess we're missing some deoptimization for C calls? https://github.com/ruby/ruby/actions/runs/17810760232/job/50633769374?pr=14575
Are we doing something similar to YJIT's |
Looks like I need to bail the codegen when TracePoint events |
d7b0979
to
cc4728a
Compare
bb95274
to
1db3946
Compare
This reduces the `dynamic_send_count` in `liquid-render` by ~21%
1db3946
to
91e8687
Compare
@tekknolagi I think this is ready to merge |
This reduces the
dynamic_send_count
inliquid-render
by ~20%Before
After
It adds a new
CCallVariadic
HIR for C methods with signaturefunc(int argc, VALUE *argv, VALUE recv)
.If my implementation is not too far off, I think we may be able to split it into few HIRs:
gen_push_opnds
CCall
gen_pop_opnds
Is this the direction we're expecting? 🤔
If that's the case, I prefer to merge the implementation with one HIR, and open an issue for the split as a todo.