diff options
author | Alan Wu <[email protected]> | 2024-08-13 16:56:35 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-13 20:56:35 +0000 |
commit | 525008cd7879a047e3c310eb63dcef901b23be56 (patch) | |
tree | 06080a03efbd3b48bc4840d1b13dfe0ea54c6baa /insns.def | |
parent | b80b8399262c628298f6aed2bc0e4bdefb371a2a (diff) |
Delete newarraykwsplat
The pushtoarraykwsplat instruction was designed to replace newarraykwsplat,
and we now meet the condition for deletion mentioned in
77c1233f79a0f96a081b70da533fbbde4f3037fa.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11371
Merged-By: XrXr
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 20 |
1 files changed, 0 insertions, 20 deletions
@@ -452,26 +452,6 @@ newarray val = rb_ec_ary_new_from_values(ec, num, STACK_ADDR_FROM_TOP(num)); } -/* put new array initialized with num values on the stack. There - should be at least one element on the stack, and the top element - should be a hash. If the top element is empty, it is not - included in the array. - */ -DEFINE_INSN -newarraykwsplat -(rb_num_t num) -(...) -(VALUE val) -// attr rb_snum_t sp_inc = 1 - (rb_snum_t)num; -{ - if (RHASH_EMPTY_P(*STACK_ADDR_FROM_TOP(1))) { - val = rb_ary_new4(num-1, STACK_ADDR_FROM_TOP(num)); - } - else { - val = rb_ary_new4(num, STACK_ADDR_FROM_TOP(num)); - } -} - /* push hash onto array unless the hash is empty (as empty keyword splats should be ignored). */ |