10000 ZJIT: Add codegen (and FrameState) for GetConstPath by XrXr · Pull Request #13628 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

ZJIT: Add codegen (and FrameState) for GetConstPath #13628

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

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

XrXr
Copy link
Member
@XrXr XrXr commented Jun 16, 2025

Issue a call to rb_vm_opt_getconstant_path() like the
interpreter, but since that allocates the IC, we need to save the PC
before calling. To have the PC, GetConstPath now has a FrameState.

Fixes: Shopify#586

@matzbot matzbot requested a review from a team June 16, 2025 16:26
}

// Save PC since the call can allocate an IC
gen_save_pc(asm, state);
Copy link
Member

Choose a reason for hiding this comment

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

👍

Object.autoload(:X, #{File.realpath(autoload_path).inspect})
def test = X
test
}, call_threshold: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

insns: [:opt_getconstant_path]?

Issue a call to rb_vm_opt_getconstant_path() like the interpreter, but
since that allocates the IC, we need to save the PC before calling. Add
FrameState to GetConstPath to get access to the PC.
@XrXr XrXr force-pushed the zjit-get-const branch from 9fef4d0 to 86ffe18 Compare June 17, 2025 11:06
@XrXr XrXr enabled auto-merge (rebase) June 17, 2025 11:07
@XrXr XrXr merged commit 0933400 into ruby:master Jun 17, 2025
84 checks passed
@XrXr XrXr deleted the zjit-get-const branch June 17, 2025 11:51
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: Codegen for GetConstantPath
3 participants
0