Skip to content
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

YJIT: Let sp_opnd take the number of slots #10442

Merged
merged 1 commit into from Apr 3, 2024

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Apr 3, 2024

This PR simplifies the interface of ctx.sp_opnd().

For most of the time, ctx.sp_opnd takes something * SIZEOF_VALUE. It seems tedious to repeat * SIZEOF_VALUE everywhere. It needs to take the number of bytes when RUBY_SIZEOF_CONTROL_FRAME is used for stack overflow checks, but it's a multiple of SIZEOF_VALUE too.

Statically asserting RUBY_SIZEOF_CONTROL_FRAME % SIZEOF_VALUE == 0, which seems like a fair assumption, we should be able to safely change the interface to take the number of VALUE slots.

@k0kubun k0kubun marked this pull request as ready for review April 3, 2024 17:44
@matzbot matzbot requested a review from a team April 3, 2024 17:44
Copy link
Contributor

@maximecb maximecb left a comment

Choose a reason for hiding this comment

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

Good change 👍

@maximecb maximecb merged commit c7cda1a into ruby:master Apr 3, 2024
101 checks passed
artur-intech pushed a commit to artur-intech/ruby that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants