Fix splatarray false peephole optimization for f(*ary, **kw, &block)
This optimization stopped being using when the splatkw VM instruction was added. This change allows the optimization to apply again. This also optimizes the following cases: super(*ary, **kw, &block) f(...) super(...)
This commit is contained in:
parent
e484ffaf20
commit
32c58753af
@ -3192,6 +3192,10 @@ optimize_args_splat_no_copy(rb_iseq_t *iseq, INSN *insn, LINK_ELEMENT *niobj,
|
||||
unsigned int set_flags, unsigned int unset_flags)
|
||||
{
|
||||
LINK_ELEMENT *iobj = (LINK_ELEMENT *)insn;
|
||||
if ((set_flags & VM_CALL_ARGS_BLOCKARG) && (set_flags & VM_CALL_KW_SPLAT) &&
|
||||
IS_NEXT_INSN_ID(niobj, splatkw)) {
|
||||
niobj = niobj->next;
|
||||
}
|
||||
if (!IS_NEXT_INSN_ID(niobj, send) && !IS_NEXT_INSN_ID(niobj, invokesuper)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user