Project

General

Profile

« Previous | Next » 

Revision 6428ce80

Added by jeremyevans (Jeremy Evans) 10 months ago

Avoid array allocation for f(*r2k_ary) when def f(x)

When calling a method that does not accept a positional splat
parameter with a splatted array with a ruby2_keywords flagged hash,
there is no need to duplicate the splatted array. Previously,
Ruby would duplicate the splatted array and potentially modify
it before flattening it to the VM stack

Use a similar approach as the f(*ary, **hash) optimization,
flattening the splatted array to the VM stack without modifying
it, and make any modifications needed to the VM stack.