Remove "simple" flag from forwarded ICs
I don't think we should ever consider forwarded IC's to be "simple".
Previously, the "simple" flag would be copied to the derived IC and this
happened to cause struct set / get iseqs to write an invalid CC
fastpath:
f45eb3dcb9/vm_insnhelper.c (L4726-L4729)
[Bug #20799]
This commit is contained in:
parent
ed993b5bcc
commit
a0ecdbfbfe
Notes:
git
2024-10-16 02:06:25 +00:00
@ -1374,3 +1374,24 @@ assert_equal 'ok', %q{
|
||||
foo(:foo, b: :ok)
|
||||
foo(*["foo"], b: :ok)
|
||||
}
|
||||
|
||||
assert_equal 'ok', %q{
|
||||
Thing = Struct.new(:value)
|
||||
|
||||
Obj = Thing.new("ok")
|
||||
|
||||
def delegate(...)
|
||||
Obj.value(...)
|
||||
end
|
||||
|
||||
def no_args
|
||||
delegate
|
||||
end
|
||||
|
||||
def splat_args(*args)
|
||||
delegate(*args)
|
||||
end
|
||||
|
||||
no_args
|
||||
splat_args
|
||||
}
|
||||
|
@ -1177,7 +1177,7 @@ vm_caller_setup_fwd_args(const rb_execution_context_t *ec, rb_control_frame_t *r
|
||||
|
||||
*adjusted_ci = VM_CI_ON_STACK(
|
||||
site_mid,
|
||||
(caller_flag | (site_flag & (VM_CALL_FCALL | VM_CALL_FORWARDING))),
|
||||
((caller_flag & ~VM_CALL_ARGS_SIMPLE) | (site_flag & (VM_CALL_FCALL | VM_CALL_FORWARDING))),
|
||||
site_argc + caller_argc,
|
||||
kw
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user