mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
RJIT: Properly reject keyword splat with yield
See the fix for YJIT.
This commit is contained in:
parent
bbd249e351
commit
7b253cfea4
3 changed files with 7 additions and 0 deletions
|
@ -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)")],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue