Skip to content
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

Pass keywords through call stack #7733

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

headius
Copy link
Member

@headius headius commented Mar 23, 2023

This PR will attempt to pass enough information on the call stack that we can eliminate the thread-local callInfo state, which must be set before each call and cleared immediately upon entering the target body.

This is an attempt to start passing callInfo (flags for keyword
arguments calls) through the call stack to bring it closer to the
target method body. This will allow us to perform appropriate
keyword munging on the receiver side without having to store the
callInfo in ThreadContext and clear it when done. We can also
introduce new encodings for kwargs, such as directly in the args
array rather than pre-packaging in a Hash at the point of call.
Different types of methods will have different mechanisms for
passing the kwargs callInfo along.
* "Generic" handles just using DynamicMethod.call can use the forms
  that take int callInfo. All existing implementations of that set
  the thread-local anyway, but we have at least pushed the flags
  up to this point.
* Jitted Ruby methods do not yet accept callInfo as a paramter so
  all such calls should be wrapped by callInfo thread-local.
* Native core methods do not yet accept callInfo as a parameter so
  all such calls should be wrapped by callInfo thread-local.
* Construction with new/initialize does not yet accept callInfo as
  a parameter so all such calls should be wrapped by callInfo
  thread-local.

I do not believe any other cases being built for indy dispatch
right now end up in core that cares about keywords, so the flags
do not need to be set.
@headius headius modified the milestones: JRuby 9.4.6.0, JRuby 9.5.0.0 Feb 9, 2024
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.

None yet

2 participants