Repository navigation
ZJIT: Reuse caller-built splat array for rest parameters - #1097
Closed
efegokdemir wants to merge 2 commits into
Closed
efegokdemir wants to merge 2 commits into
efegokdemir wants to merge 2 commits into
Conversation
Avoid rebuilding the rest array when it is already represented by the caller's mutable splat. Defer beheading until after stack-overflow exits so an interpreter replay still sees the original arguments. Fixes Shopify#1095
thomasklemm
added a commit
to thomasklemm/lowrail
that referenced
this pull request
Nov 3, 2026
The reader is joined before the writer, so a copy or byte-count assertion failure can leave the reader waiting for EOF and hide the original error. Close the owned writer socket in ensure so the existing thread join can report that error. Keep the byte-count and content assertions unchanged.
|
Please file PRs to ruby/ruby. |
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.
Reuse the caller-built splat array when a rest parameter consumes its entire suffix, avoiding a second allocation. If leading or optional parameters consume part of the array, behead it only after the stack-overflow side-exit point so interpreter replay still sees the original arguments.
make zjit-checkpassed: 2,115 Rust tests, 1 skipped, and 28 CLI tests with 7,624 assertions. Fixes #1095.