@@ -1554,7 +1554,7 @@ rb_ivar_delete(VALUE obj, ID id, VALUE undef)
15541554 MEMCPY (ROBJECT_FIELDS (obj ), fields , VALUE , new_fields_count );
15551555 xfree (fields );
15561556 }
1557- rb_shape_set_shape_id (obj , next_shape_id );
1557+ rb_obj_set_shape_id (obj , next_shape_id );
15581558
15591559 if (locked ) {
15601560 RB_VM_LOCK_LEAVE_LEV (& lev );
@@ -1617,13 +1617,13 @@ obj_transition_too_complex(VALUE obj, st_table *table)
16171617 if (!(RBASIC (obj )-> flags & ROBJECT_EMBED )) {
16181618 old_fields = ROBJECT_FIELDS (obj );
16191619 }
1620- rb_shape_set_shape_id (obj , shape_id );
1620+ rb_obj_set_shape_id (obj , shape_id );
16211621 ROBJECT_SET_FIELDS_HASH (obj , table );
16221622 break ;
16231623 case T_CLASS :
16241624 case T_MODULE :
16251625 old_fields = RCLASS_PRIME_FIELDS (obj );
1626- rb_shape_set_shape_id (obj , shape_id );
1626+ rb_obj_set_shape_id (obj , shape_id );
16271627 RCLASS_SET_FIELDS_HASH (obj , table );
16281628 break ;
16291629 default :
@@ -1638,7 +1638,7 @@ obj_transition_too_complex(VALUE obj, st_table *table)
16381638 * and hold the table because the xmalloc could trigger a GC
16391639 * compaction. We want the table to be updated rather than
16401640 * the original fields. */
1641- rb_shape_set_shape_id (obj , shape_id );
1641+ rb_obj_set_shape_id (obj , shape_id );
16421642 old_fields_tbl -> as .complex .table = table ;
16431643 old_fields = (VALUE * )old_fields_tbl ;
16441644 }
@@ -1647,7 +1647,7 @@ obj_transition_too_complex(VALUE obj, st_table *table)
16471647 fields_tbl -> as .complex .table = table ;
16481648 st_insert (gen_ivs , (st_data_t )obj , (st_data_t )fields_tbl );
16491649
1650- rb_shape_set_shape_id (obj , shape_id );
1650+ rb_obj_set_shape_id (obj , shape_id );
16511651 }
16521652 }
16531653
@@ -1831,7 +1831,7 @@ generic_fields_lookup_ensure_size(st_data_t *k, st_data_t *v, st_data_t u, int e
18311831
18321832 fields_lookup -> fields_tbl = fields_tbl ;
18331833 if (fields_lookup -> shape_id ) {
1834- rb_shape_set_shape_id (fields_lookup -> obj , fields_lookup -> shape_id );
1834+ rb_obj_set_shape_id (fields_lookup -> obj , fields_lookup -> shape_id );
18351835 }
18361836
18371837 return ST_CONTINUE ;
@@ -1986,7 +1986,7 @@ obj_ivar_set_shape_resize_fields(VALUE obj, attr_index_t old_capa, attr_index_t
19861986static void
19871987obj_ivar_set_set_shape_id (VALUE obj , shape_id_t shape_id , void * _data )
19881988{
1989- rb_shape_set_shape_id (obj , shape_id );
1989+ rb_obj_set_shape_id (obj , shape_id );
19901990}
19911991
19921992static void
@@ -2038,7 +2038,7 @@ rb_vm_set_ivar_id(VALUE obj, ID id, VALUE val)
20382038}
20392039
20402040bool
2041- rb_shape_set_shape_id (VALUE obj , shape_id_t shape_id )
2041+ rb_obj_set_shape_id (VALUE obj , shape_id_t shape_id )
20422042{
20432043 if (rb_obj_shape_id (obj ) == shape_id ) {
20442044 return false;
@@ -2063,7 +2063,7 @@ void rb_obj_freeze_inline(VALUE x)
20632063 if (rb_shape_too_complex_p (next_shape_id ) && !rb_shape_obj_too_complex_p (x )) {
20642064 rb_evict_fields_to_hash (x );
20652065 }
2066- rb_shape_set_shape_id (x , next_shape_id );
2066+ rb_obj_set_shape_id (x , next_shape_id );
20672067
20682068 if (RBASIC_CLASS (x )) {
20692069 rb_freeze_singleton_class (x );
@@ -2354,7 +2354,7 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj)
23542354 }
23552355
23562356 if (!RSHAPE (dest_shape_id )-> capacity ) {
2357- rb_shape_set_shape_id (dest , dest_shape_id );
2357+ rb_obj_set_shape_id (dest , dest_shape_id );
23582358 FL_UNSET (dest , FL_EXIVAR );
23592359 return ;
23602360 }
@@ -2375,7 +2375,7 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj)
23752375 st_insert (generic_fields_tbl_no_ractor_check (obj ), (st_data_t )dest , (st_data_t )new_fields_tbl );
23762376 }
23772377
2378- rb_shape_set_shape_id (dest , dest_shape_id );
2378+ rb_obj_set_shape_id (dest , dest_shape_id );
23792379 }
23802380 return ;
23812381
@@ -4671,7 +4671,7 @@ class_ivar_set_shape_resize_fields(VALUE obj, attr_index_t _old_capa, attr_index
46714671static void
46724672class_ivar_set_set_shape_id (VALUE obj , shape_id_t shape_id , void * _data )
46734673{
4674- rb_shape_set_shape_id (obj , shape_id );
4674+ rb_obj_set_shape_id (obj , shape_id );
46754675}
46764676
46774677static void
0 commit comments