ruby/yjit
Jeremy Evans a950f23078 Ensure f(**kw, &block) calls kw.to_hash before block.to_proc
Previously, block.to_proc was called first, by vm_caller_setup_arg_block.
kw.to_hash was called later inside CALLER_SETUP_ARG or setup_parameters_complex.

This adds a splatkw instruction that is inserted before sends with
ARGS_BLOCKARG and KW_SPLAT and without KW_SPLAT_MUT. This is not needed in the
KW_SPLAT_MUT case, because then you know the value is a hash, and you don't
need to call to_hash on it.

The splatkw instruction checks whether the second to top block is a hash,
and if not, replaces it with the value of calling to_hash on it (using
rb_to_hash_type).  As it is always before a send with ARGS_BLOCKARG and
KW_SPLAT, second to top is the keyword splat, and top is the passed block.
2023-12-09 13:15:47 -08:00
..
bindgen Refactor rb_shape_transition_shape_capa out 2023-11-08 11:02:55 +01:00
src Ensure f(**kw, &block) calls kw.to_hash before block.to_proc 2023-12-09 13:15:47 -08:00
.gitignore
Cargo.lock YJIT: Make yjit_alloc_size available by default (#8426) 2023-09-13 10:48:14 -04:00
Cargo.toml YJIT: Make yjit_alloc_size available by default (#8426) 2023-09-13 10:48:14 -04:00
not_gmake.mk YJIT: Fix shared/static library symbol leaks 2023-01-27 12:28:09 -05:00
yjit.mk YJIT: Simplify linker flavor check 2023-10-05 17:31:54 -04:00