Clean up more divergent keyword logic#9470
Conversation
The interpreter logic here checked for CALL_KEYWORD_EMPTY where the JIT did not, because they had divergent logic, This partially unifies the two to ensure a non-kwargs trailing hash is not dup'ed improperly during argument handling. This appears to be the root cause of jruby#9462.
|
The first fix here is valid, but in the original investigation of #9462 I found that disabling JIT for the target method fixed the issue. I believe there's more happening here. The example given in that issue fails, but this non-delegated version does not. It's possible that delegation is setting more keyword flags in |
|
I've filed #9472 to look into reworking how argument forwarding is done. I believe it was implemented to decompose and recompose the argument list as a convenience but this introduces a lot of overhead and potentially alters the structure of the arguments or their keyword metadata. This will probably come along with work on #9219 to make all dispatch paths fully specified and adaptable. |
|
I did not find much else to clean up that wouldn't be better waiting until after a rework of how keyword arguments are passed. |
There's still enough divergent keyword argument logic to cause #9462 due to a JIT path failing to check for empty kwargs. That fix and others will be part of this PR to unify more of the two sides.