@@ -313,7 +313,7 @@ static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NOD
313
313
LABEL_REF(le); \
314
314
LABEL_REF(lc); \
315
315
if (NIL_P(ISEQ_COMPILE_DATA(iseq)->catch_table_ary)) \
316
- RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, rb_ary_tmp_new (3)); \
316
+ RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, rb_ary_hidden_new (3)); \
317
317
rb_ary_push(ISEQ_COMPILE_DATA(iseq)->catch_table_ary, freeze_hide_obj(_e)); \
318
318
} while (0)
319
319
@@ -627,7 +627,7 @@ decl_branch_base(rb_iseq_t *iseq, const NODE *node, const char *type)
627
627
VALUE branches ;
628
628
629
629
if (NIL_P (branch_base )) {
630
- branch_base = rb_ary_tmp_new (6 );
630
+ branch_base = rb_ary_hidden_new (6 );
631
631
rb_hash_aset (structure , key , branch_base );
632
632
rb_ary_push (branch_base , ID2SYM (rb_intern (type )));
633
633
rb_ary_push (branch_base , INT2FIX (first_lineno ));
@@ -675,7 +675,7 @@ add_trace_branch_coverage(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *n
675
675
long counter_idx ;
676
676
677
677
if (NIL_P (branch )) {
678
- branch = rb_ary_tmp_new (6 );
678
+ branch = rb_ary_hidden_new (6 );
679
679
rb_hash_aset (branches , key , branch );
680
680
rb_ary_push (branch , ID2SYM (rb_intern (type )));
681
681
rb_ary_push (branch , INT2FIX (first_lineno ));
@@ -1743,7 +1743,7 @@ iseq_set_arguments_keywords(rb_iseq_t *iseq, LINK_ANCHOR *const optargs,
1743
1743
const NODE * node = args -> kw_args ;
1744
1744
struct rb_iseq_constant_body * const body = ISEQ_BODY (iseq );
1745
1745
struct rb_iseq_param_keyword * keyword ;
1746
- const VALUE default_values = rb_ary_tmp_new (1 );
1746
+ const VALUE default_values = rb_ary_hidden_new (1 );
1747
1747
const VALUE complex_mark = rb_str_tmp_new (0 );
1748
1748
int kw = 0 , rkw = 0 , di = 0 , i ;
1749
1749
@@ -1847,7 +1847,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const optargs, const NODE *cons
1847
1847
if (args -> opt_args ) {
1848
1848
const NODE * node = args -> opt_args ;
1849
1849
LABEL * label ;
1850
- VALUE labels = rb_ary_tmp_new (1 );
1850
+ VALUE labels = rb_ary_hidden_new (1 );
1851
1851
VALUE * opt_table ;
1852
1852
int i = 0 , j ;
1853
1853
@@ -4369,7 +4369,7 @@ compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int pop
4369
4369
4370
4370
if ((first_chunk && stack_len == 0 && !node_tmp ) || count >= min_tmp_ary_len ) {
4371
4371
/* The literal contains only optimizable elements, or the subarray is long enough */
4372
- VALUE ary = rb_ary_tmp_new (count );
4372
+ VALUE ary = rb_ary_hidden_new (count );
4373
4373
4374
4374
/* Create a hidden array */
4375
4375
for (; count ; count -- , node = node -> nd_next )
@@ -4420,7 +4420,7 @@ static int
4420
4420
compile_array_1 (rb_iseq_t * iseq , LINK_ANCHOR * const ret , const NODE * node )
4421
4421
{
4422
4422
if (static_literal_node_p (node , iseq )) {
4423
- VALUE ary = rb_ary_tmp_new (1 );
4423
+ VALUE ary = rb_ary_hidden_new (1 );
4424
4424
rb_ary_push (ary , static_literal_value (node , iseq ));
4425
4425
OBJ_FREEZE (ary );
4426
4426
@@ -4517,7 +4517,7 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int meth
4517
4517
4518
4518
if ((first_chunk && stack_len == 0 && !node_tmp ) || count >= min_tmp_hash_len ) {
4519
4519
/* The literal contains only optimizable elements, or the subsequence is long enough */
4520
- VALUE ary = rb_ary_tmp_new (count );
4520
+ VALUE ary = rb_ary_hidden_new (count );
4521
4521
4522
4522
/* Create a hidden hash */
4523
4523
for (; count ; count -- , node = node -> nd_next -> nd_next ) {
@@ -12077,7 +12077,7 @@ ibf_dump_iseq_list_i(st_data_t key, st_data_t val, st_data_t ptr)
12077
12077
static void
12078
12078
ibf_dump_iseq_list (struct ibf_dump * dump , struct ibf_header * header )
12079
12079
{
12080
- VALUE offset_list = rb_ary_tmp_new (dump -> iseq_table -> num_entries );
12080
+ VALUE offset_list = rb_ary_hidden_new (dump -> iseq_table -> num_entries );
12081
12081
12082
12082
struct ibf_dump_iseq_list_arg args ;
12083
12083
args .dump = dump ;
@@ -12349,7 +12349,7 @@ ibf_load_object_array(const struct ibf_load *load, const struct ibf_object_heade
12349
12349
12350
12350
const long len = (long )ibf_load_small_value (load , & reading_pos );
12351
12351
12352
- VALUE ary = header -> internal ? rb_ary_tmp_new (len ) : rb_ary_new_capa (len );
12352
+ VALUE ary = header -> internal ? rb_ary_hidden_new (len ) : rb_ary_new_capa (len );
12353
12353
int i ;
12354
12354
12355
12355
for (i = 0 ; i < len ; i ++ ) {
@@ -12744,7 +12744,7 @@ static void
12744
12744
ibf_dump_object_list (struct ibf_dump * dump , ibf_offset_t * obj_list_offset , unsigned int * obj_list_size )
12745
12745
{
12746
12746
st_table * obj_table = dump -> current_buffer -> obj_table ;
12747
- VALUE offset_list = rb_ary_tmp_new (obj_table -> num_entries );
12747
+ VALUE offset_list = rb_ary_hidden_new (obj_table -> num_entries );
12748
12748
12749
12749
struct ibf_dump_object_list_arg args ;
12750
12750
args .dump = dump ;
0 commit comments