Skip to content

Fixes #8577. kwargs checking: Use bits instead of index#8599

Merged
enebo merged 2 commits intojruby:masterfrom
enebo:8857
Feb 11, 2025
Merged

Fixes #8577. kwargs checking: Use bits instead of index#8599
enebo merged 2 commits intojruby:masterfrom
enebo:8857

Conversation

@enebo
Copy link
Member

@enebo enebo commented Jan 28, 2025

Keyword index of first keyword encountered in parameter lists is problematic because other variables during parsing can still be encountered (see #8577 for an example).

This fix is a shorter-term fix where we maintain a bitlist to indicate which parameters are keywords. This removes the need for all keywords to be definedcd at the end of the scope.

The longer term fix is to fully describe the parameters which can be introspected by the callsite. This goes way beyond this fix as it outlines how we can easily map known keyword values to keyword parameters in the method and eliminate storing the keywords in a hash (in this case we can pass them as positional parameters). This is a larger work item and is too much for us in the short term.

@enebo enebo added this to the JRuby 9.4.12.0 milestone Jan 28, 2025
@enebo enebo merged commit c9df972 into jruby:master Feb 11, 2025
94 of 95 checks passed
@enebo enebo deleted the 8857 branch February 11, 2025 20:26
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.

2 participants