Skip to content

WIP start adding annotations for direct args#9522

Draft
headius wants to merge 2 commits into
jruby:masterfrom
headius:more_direct_keywords
Draft

WIP start adding annotations for direct args#9522
headius wants to merge 2 commits into
jruby:masterfrom
headius:more_direct_keywords

Conversation

@headius

@headius headius commented Jul 9, 2026

Copy link
Copy Markdown
Member

This is a continuation of #9219 after the base functionality there was merged into JRuby 10.1.1.0.

The changes here are leftover from that PR as well as new tasks.

Core changes

  • Introduce annotations and processing to allow specifying keyword-receiving overloads.
  • Identify and modify an existing keyword-argument core method to have a specialized form and redirect generic forms to it. Any methods that accept a single keyword like exception: or nonblock: would be good candidates for now.

JIT changes

Caller side

The caller side indy optimizations can be implemented early and provides benefits without the rest due to moving hash construction and flags-setting into the call site.

  • Expand support for MetaCallSite to all invocations (currently limited to very specific shapes)
  • Expand MetaCallSite to support lazy splatting (defer Array construction until we determine the shape of the target, possibly avoiding multiple allocations)

Callee side

  • Wire up invokedynamic callee side to discover and bind specialized keyword argument paths, similar to the eager arity-splitting logic already introduced. (experiment started in the initial commit to this PR)

@headius headius added this to the JRuby 10.1.2.0 milestone Jul 9, 2026
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.

1 participant