зеркало из https://github.com/github/ruby.git
RJIT: Fix has_rest exit conditions
This commit is contained in:
Родитель
ee52255f93
Коммит
bf2617b8a6
|
@ -4130,8 +4130,8 @@ module RubyVM::RJIT
|
|||
return CantCompile
|
||||
end
|
||||
|
||||
if iseq_has_rest && iseq.body.param.flags.has_kw
|
||||
asm.incr_counter(:send_iseq_has_rest_and_kw)
|
||||
if iseq_has_rest && iseq.body.param.flags.has_kw && supplying_kws
|
||||
asm.incr_counter(:send_iseq_has_rest_and_kw_supplied)
|
||||
return CantCompile
|
||||
end
|
||||
|
||||
|
@ -4286,6 +4286,11 @@ module RubyVM::RJIT
|
|||
jit_call_opt_send_shift_stack(ctx, asm, argc, send_shift:)
|
||||
end
|
||||
|
||||
if iseq_has_rest
|
||||
asm.incr_counter(:send_iseq_has_rest)
|
||||
return CantCompile
|
||||
end
|
||||
|
||||
if doing_kw_call
|
||||
asm.incr_counter(:send_iseq_kw_call)
|
||||
return CantCompile
|
||||
|
@ -4301,11 +4306,6 @@ module RubyVM::RJIT
|
|||
return CantCompile
|
||||
end
|
||||
|
||||
if iseq_has_rest
|
||||
asm.incr_counter(:send_iseq_has_rest)
|
||||
return CantCompile
|
||||
end
|
||||
|
||||
# Setup the new frame
|
||||
frame_type ||= C::VM_FRAME_MAGIC_METHOD | C::VM_ENV_FLAG_LOCAL
|
||||
jit_push_frame(
|
||||
|
|
2
rjit_c.h
2
rjit_c.h
|
@ -60,7 +60,7 @@ RJIT_RUNTIME_COUNTERS(
|
|||
send_iseq_has_kwrest,
|
||||
send_iseq_ruby2_keywords,
|
||||
send_iseq_has_rest_and_captured,
|
||||
send_iseq_has_rest_and_kw,
|
||||
send_iseq_has_rest_and_kw_supplied,
|
||||
send_iseq_has_no_kw,
|
||||
send_iseq_zsuper,
|
||||
send_iseq_materialized_block,
|
||||
|
|
|
@ -1334,7 +1334,7 @@ module RubyVM::RJIT # :nodoc: all
|
|||
send_iseq_has_kwrest: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_has_kwrest)")],
|
||||
send_iseq_ruby2_keywords: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_ruby2_keywords)")],
|
||||
send_iseq_has_rest_and_captured: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_has_rest_and_captured)")],
|
||||
send_iseq_has_rest_and_kw: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_has_rest_and_kw)")],
|
||||
send_iseq_has_rest_and_kw_supplied: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_has_rest_and_kw_supplied)")],
|
||||
send_iseq_has_no_kw: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_has_no_kw)")],
|
||||
send_iseq_zsuper: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_zsuper)")],
|
||||
send_iseq_materialized_block: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_materialized_block)")],
|
||||
|
|
Загрузка…
Ссылка в новой задаче