@@ -451,7 +451,6 @@ rb_shape_alloc(ID edge_name, rb_shape_t *parent, enum shape_type type)
451451{
452452 rb_shape_t * shape = rb_shape_alloc_with_parent_id (edge_name , raw_shape_id (parent ));
453453 shape -> type = (uint8_t )type ;
454- shape -> heap_index = parent -> heap_index ;
455454 shape -> capacity = parent -> capacity ;
456455 shape -> edges = 0 ;
457456 return shape ;
@@ -755,7 +754,7 @@ rb_shape_object_id(shape_id_t original_shape_id)
755754static inline shape_id_t
756755transition_complex (shape_id_t shape_id )
757756{
758- uint8_t heap_index = RSHAPE (shape_id )-> heap_index ;
757+ uint8_t heap_index = rb_shape_heap_index (shape_id );
759758 shape_id_t next_shape_id ;
760759
761760 if (heap_index ) {
@@ -1341,7 +1340,7 @@ shape_id_t_to_rb_cShape(shape_id_t shape_id)
13411340 INT2NUM (shape -> parent_id ),
13421341 rb_shape_edge_name (shape ),
13431342 INT2NUM (shape -> next_field_index ),
1344- INT2NUM (shape -> heap_index ),
1343+ INT2NUM (rb_shape_heap_index ( shape_id ) ),
13451344 INT2NUM (shape -> type ),
13461345 INT2NUM (RSHAPE_CAPACITY (shape_id )));
13471346 rb_obj_freeze (obj );
@@ -1562,15 +1561,13 @@ Init_default_shapes(void)
15621561 rb_shape_t * root = rb_shape_alloc_with_parent_id (0 , INVALID_SHAPE_ID );
15631562 root -> capacity = 0 ;
15641563 root -> type = SHAPE_ROOT ;
1565- root -> heap_index = 0 ;
15661564 GET_SHAPE_TREE ()-> root_shape = root ;
15671565 RUBY_ASSERT (raw_shape_id (GET_SHAPE_TREE ()-> root_shape ) == ROOT_SHAPE_ID );
15681566
15691567 rb_shape_t * root_with_obj_id = rb_shape_alloc_with_parent_id (0 , ROOT_SHAPE_ID );
15701568 root_with_obj_id -> type = SHAPE_OBJ_ID ;
15711569 root_with_obj_id -> edge_name = ruby_internal_object_id ;
15721570 root_with_obj_id -> next_field_index ++ ;
1573- root_with_obj_id -> heap_index = 0 ;
15741571 RUBY_ASSERT (raw_shape_id (root_with_obj_id ) == ROOT_SHAPE_WITH_OBJ_ID );
15751572}
15761573
0 commit comments