зеркало из https://github.com/github/ruby.git
RJIT: Properly reject keyword splat with `yield`
See the fix for YJIT.
This commit is contained in:
Родитель
bbd249e351
Коммит
7b253cfea4
|
@ -4452,6 +4452,11 @@ module RubyVM::RJIT
|
|||
return CantCompile
|
||||
end
|
||||
|
||||
if flags & C::VM_CALL_KW_SPLAT != 0
|
||||
asm.incr_counter(:send_iseq_kw_splat)
|
||||
return CantCompile
|
||||
end
|
||||
|
||||
if iseq_has_rest && opt_num != 0
|
||||
asm.incr_counter(:send_iseq_has_rest_and_optional)
|
||||
return CantCompile
|
||||
|
|
1
rjit_c.h
1
rjit_c.h
|
@ -69,6 +69,7 @@ RJIT_RUNTIME_COUNTERS(
|
|||
send_iseq_has_rest,
|
||||
send_iseq_block_arg0_splat,
|
||||
send_iseq_kw_call,
|
||||
send_iseq_kw_splat,
|
||||
send_iseq_splat,
|
||||
send_iseq_has_rest_and_optional,
|
||||
send_iseq_arity_error,
|
||||
|
|
|
@ -1388,6 +1388,7 @@ module RubyVM::RJIT # :nodoc: all
|
|||
send_iseq_has_rest: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_has_rest)")],
|
||||
send_iseq_block_arg0_splat: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_block_arg0_splat)")],
|
||||
send_iseq_kw_call: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_kw_call)")],
|
||||
send_iseq_kw_splat: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_kw_splat)")],
|
||||
send_iseq_splat: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_splat)")],
|
||||
send_iseq_has_rest_and_optional: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_has_rest_and_optional)")],
|
||||
send_iseq_arity_error: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_arity_error)")],
|
||||
|
|
Загрузка…
Ссылка в новой задаче