ZJIT: Recompile getivar on guard_shape_failure#16589
Merged
Merged
Conversation
248781c to
cbed8b2
Compare
ed5447e to
bf2a2ea
Compare
bf2a2ea to
dde8040
Compare
tenderlove
approved these changes
Apr 3, 2026
tenderlove
reviewed
Apr 3, 2026
Address review feedback: use a method instead of directly comparing .status == IseqStatus::Invalidated.
tekknolagi
reviewed
Apr 4, 2026
Contributor
tekknolagi
left a comment
There was a problem hiding this comment.
Ugh my comments never went through :(
| let self_val = self.load_ivar_guard_type(block, self_val, recv_type, state); | ||
| let shape = self.load_shape(block, self_val); | ||
| self.guard_shape(block, shape, recv_type.shape(), state); | ||
| self.guard_shape(block, shape, recv_type.shape(), state, Some(-1)); |
Contributor
There was a problem hiding this comment.
This Some(-1) vs None stuff is kind of hard to read & reason about. Can we fix that API?
This was referenced Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR recompiles getivar on
guard_shape_failureexits. The first version compiles the same code as before, but when it gets recompiled and it's a final version, it puts a fallback in the last branch to prevent side exits.This improves
ratio_in_zjiton lobsters from 82.4% to 85.3%.The rest of
guard_shape_failureis from setivar and definedivar. It should be addressed in a follow-up PR.