YJIT: Add splat optimized_send (#7167)
This commit is contained in:
parent
b32e1169c9
commit
07d1b3ddc3
Notes:
git
2023-01-30 20:54:29 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
@ -4750,11 +4750,6 @@ fn gen_send_cfunc(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a .send call and we need to adjust the stack
|
|
||||||
if flags & VM_CALL_OPT_SEND != 0 {
|
|
||||||
handle_opt_send_shift_stack(asm, argc, ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
// push_splat_args does stack manipulation so we can no longer side exit
|
// push_splat_args does stack manipulation so we can no longer side exit
|
||||||
if flags & VM_CALL_ARGS_SPLAT != 0 {
|
if flags & VM_CALL_ARGS_SPLAT != 0 {
|
||||||
let required_args : u32 = (cfunc_argc as u32).saturating_sub(argc as u32 - 1);
|
let required_args : u32 = (cfunc_argc as u32).saturating_sub(argc as u32 - 1);
|
||||||
@ -4771,6 +4766,11 @@ fn gen_send_cfunc(
|
|||||||
push_splat_args(required_args, ctx, asm, ocb, side_exit)
|
push_splat_args(required_args, ctx, asm, ocb, side_exit)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a .send call and we need to adjust the stack
|
||||||
|
if flags & VM_CALL_OPT_SEND != 0 {
|
||||||
|
handle_opt_send_shift_stack(asm, argc, ctx);
|
||||||
|
}
|
||||||
|
|
||||||
// Points to the receiver operand on the stack
|
// Points to the receiver operand on the stack
|
||||||
let recv = ctx.stack_opnd(argc);
|
let recv = ctx.stack_opnd(argc);
|
||||||
|
|
||||||
@ -5971,11 +5971,6 @@ fn gen_send_general(
|
|||||||
return CantCompile;
|
return CantCompile;
|
||||||
}
|
}
|
||||||
|
|
||||||
if flags & VM_CALL_ARGS_SPLAT != 0 {
|
|
||||||
gen_counter_incr!(asm, send_args_splat_optimized);
|
|
||||||
return CantCompile;
|
|
||||||
}
|
|
||||||
|
|
||||||
let opt_type = unsafe { get_cme_def_body_optimized_type(cme) };
|
let opt_type = unsafe { get_cme_def_body_optimized_type(cme) };
|
||||||
match opt_type {
|
match opt_type {
|
||||||
OPTIMIZED_METHOD_TYPE_SEND => {
|
OPTIMIZED_METHOD_TYPE_SEND => {
|
||||||
@ -6098,6 +6093,11 @@ fn gen_send_general(
|
|||||||
return CantCompile;
|
return CantCompile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if flags & VM_CALL_ARGS_SPLAT != 0 {
|
||||||
|
gen_counter_incr!(asm, send_args_splat_opt_call);
|
||||||
|
return CantCompile;
|
||||||
|
}
|
||||||
|
|
||||||
// Optimize for single ractor mode and avoid runtime check for
|
// Optimize for single ractor mode and avoid runtime check for
|
||||||
// "defined with an un-shareable Proc in a different Ractor"
|
// "defined with an un-shareable Proc in a different Ractor"
|
||||||
if !assume_single_ractor_mode(jit, ocb) {
|
if !assume_single_ractor_mode(jit, ocb) {
|
||||||
|
@ -218,7 +218,7 @@ make_counters! {
|
|||||||
send_args_splat_bmethod,
|
send_args_splat_bmethod,
|
||||||
send_args_splat_aref,
|
send_args_splat_aref,
|
||||||
send_args_splat_aset,
|
send_args_splat_aset,
|
||||||
send_args_splat_optimized,
|
send_args_splat_opt_call,
|
||||||
send_args_splat_cfunc_var_args,
|
send_args_splat_cfunc_var_args,
|
||||||
send_args_splat_cfunc_zuper,
|
send_args_splat_cfunc_zuper,
|
||||||
send_args_splat_cfunc_ruby2_keywords,
|
send_args_splat_cfunc_ruby2_keywords,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user