diff options
author | Jimmy Miller <jimmy.miller@shopify.com> | 2023-03-17 16:11:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-17 16:11:30 -0400 |
commit | 5d0a1ffafa61da04dbda38a5cb5565bcb8032a78 (patch) | |
tree | 44ca032d8bd812899c6a6f6bb9bfac2143044291 /yjit | |
parent | 2d97f87407f89986a2c7619d2a7a75ccd68386ef (diff) |
YJIT: Rest and block_arg support (#7557)
* YJIT: Rest and block_arg support
* Update bootstraptest/test_yjit.rb
---------
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/codegen.rs | 9 | ||||
-rw-r--r-- | yjit/src/stats.rs | 3 |
2 files changed, 3 insertions, 9 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 177bdfe088..855182b341 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -5180,9 +5180,9 @@ fn move_rest_args_to_stack(array: Opnd, num_args: u32, ctx: &mut Context, asm: & let array_len_opnd = get_array_len(asm, array); - asm.comment("Side exit if length doesn't not equal remaining args"); + asm.comment("Side exit if length is less than required"); asm.cmp(array_len_opnd, num_args.into()); - asm.jbe(counted_exit!(ocb, side_exit, send_splatarray_length_not_equal)); + asm.jl(counted_exit!(ocb, side_exit, send_iseq_has_rest_and_splat_not_equal)); asm.comment("Push arguments from array"); @@ -5412,11 +5412,6 @@ fn gen_send_iseq( return CantCompile; } - if iseq_has_rest && unsafe { get_iseq_flags_has_block(iseq) } { - gen_counter_incr!(asm, send_iseq_has_rest_and_block); - return CantCompile; - } - if iseq_has_rest && unsafe { get_iseq_flags_has_kw(iseq) } { gen_counter_incr!(asm, send_iseq_has_rest_and_kw); return CantCompile; diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs index 5f8f841ffc..b096e28e07 100644 --- a/yjit/src/stats.rs +++ b/yjit/src/stats.rs @@ -253,11 +253,10 @@ make_counters! { send_send_getter, send_send_builtin, send_iseq_has_rest_and_captured, - send_iseq_has_rest_and_splat_fewer, send_iseq_has_rest_and_send, - send_iseq_has_rest_and_block, send_iseq_has_rest_and_kw, send_iseq_has_rest_and_optional, + send_iseq_has_rest_and_splat_not_equal, send_is_a_class_mismatch, send_instance_of_class_mismatch, |