Skip to content

[pull] master from ruby:master - #1371

Merged
pull[bot] merged 8 commits into
turkdevops:masterfrom
ruby:master
Sep 3, 2026
Merged

[pull] master from ruby:master#1371
pull[bot] merged 8 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Sep 3, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nozomemein and others added 8 commits September 2, 2026 15:10
Use the profiled splat array length to expand caller splats into fixed
positional arguments for SendDirect. Guard the runtime length and fall
back to the original Send when it changes or ruby2_keywords semantics
apply.

Validate direct sends using the expanded argument count, then apply the
existing keyword setup and rest parameter packing. Move the
ruby2_keywords splat predicate into shared JIT code so both YJIT and
ZJIT can use it.
Caller-splat dispatch creates a join result during type_specialize. A
following CFunc inline may use it before infer_types runs again, causing
ZJIT to infer the type of an untyped Param and panic.

Mark the join result as BasicObject and add regression tests for using it
with Hash#[]=.
Move receiver guards, argument emission, and SendDirect generation into a
callback invoked by dispatch_caller_splat. This keeps caller-splat CFG
construction together and allows adding one optimized path per profiled
length for polymorphic dispatch.
Use guards instead of a dynamic Send fallback and join block for monomorphic caller splats. Recompile on length mismatches so the call site can collect a new profile, and side-exit without recompiling for ruby2_keywords hashes.

Skip caller-splat specialization for final no-side-exit ISEQ versions.
Document that observing a second splat length makes the profile
non-monomorphic, so the next version keeps the dynamic Send instead of
emitting the same length guard. Add an opt test that verifies this before
the final-version policy applies.
Select the profiled caller-splat length in add_iseq_to_hir and attach it
to each Send before receiver dispatch creates its specialized arms.
type_specialize then uses the selected length to build each SendDirect
path.

This prepares caller-splat dispatch for supporting multiple profiled
lengths without making type_specialize responsible for building the
outer dispatch CFG.
We are out of imemo types because IMEMO_MASK uses 4 bits and we have 16
imemo types. This makes it not possible to experiment with new imemo types,
so we can increase it by one bit to have 16 more imemo types.
@pull pull Bot locked and limited conversation to collaborators Sep 3, 2026
@pull pull Bot added the ⤵️ pull label Sep 3, 2026
@pull
pull Bot merged commit 1d8d84b into turkdevops:master Sep 3, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants