From 525008cd7879a047e3c310eb63dcef901b23be56 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Tue, 13 Aug 2024 16:56:35 -0400 Subject: Delete newarraykwsplat The pushtoarraykwsplat instruction was designed to replace newarraykwsplat, and we now meet the condition for deletion mentioned in 77c1233f79a0f96a081b70da533fbbde4f3037fa. --- insns.def | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'insns.def') diff --git a/insns.def b/insns.def index 1597755b37..c8dcd61bec 100644 --- a/insns.def +++ b/insns.def @@ -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). */ -- cgit v1.2.3