@@ -142,19 +142,19 @@ get_next_shape_internal(rb_shape_t* shape, ID id, VALUE obj, enum shape_type sha
142142
143143 switch (shape_type ) {
144144 case SHAPE_IVAR :
145- new_shape -> iv_count = rb_shape_get_shape_by_id (new_shape -> parent_id )-> iv_count + 1 ;
145+ new_shape -> next_iv_index = rb_shape_get_shape_by_id (new_shape -> parent_id )-> next_iv_index + 1 ;
146146
147- // Check if we should update max_iv_count on the object's class
147+ // Check if we should update next_iv_index on the object's class
148148 if (BUILTIN_TYPE (obj ) == T_OBJECT ) {
149149 VALUE klass = rb_obj_class (obj );
150- if (new_shape -> iv_count > RCLASS_EXT (klass )-> max_iv_count ) {
151- RCLASS_EXT (klass )-> max_iv_count = new_shape -> iv_count ;
150+ if (new_shape -> next_iv_index > RCLASS_EXT (klass )-> max_iv_count ) {
151+ RCLASS_EXT (klass )-> max_iv_count = new_shape -> next_iv_index ;
152152 }
153153 }
154154 break ;
155155 case SHAPE_IVAR_UNDEF :
156156 case SHAPE_FROZEN :
157- new_shape -> iv_count = rb_shape_get_shape_by_id (new_shape -> parent_id )-> iv_count ;
157+ new_shape -> next_iv_index = rb_shape_get_shape_by_id (new_shape -> parent_id )-> next_iv_index ;
158158 break ;
159159 case SHAPE_ROOT :
160160 rb_bug ("Unreachable" );
@@ -244,8 +244,8 @@ rb_shape_get_iv_index(rb_shape_t * shape, ID id, attr_index_t *value)
244244
245245 switch (shape_type ) {
246246 case SHAPE_IVAR :
247- RUBY_ASSERT (shape -> iv_count > 0 );
248- * value = shape -> iv_count - 1 ;
247+ RUBY_ASSERT (shape -> next_iv_index > 0 );
248+ * value = shape -> next_iv_index - 1 ;
249249 return true;
250250 case SHAPE_IVAR_UNDEF :
251251 case SHAPE_ROOT :
@@ -280,7 +280,7 @@ rb_shape_alloc_with_parent_id(ID edge_name, shape_id_t parent_id)
280280 rb_shape_t * shape = shape_alloc ();
281281
282282 shape -> edge_name = edge_name ;
283- shape -> iv_count = 0 ;
283+ shape -> next_iv_index = 0 ;
284284 shape -> parent_id = parent_id ;
285285
286286 return shape ;
@@ -404,12 +404,12 @@ rb_shape_edge_name(VALUE self)
404404}
405405
406406static VALUE
407- rb_shape_iv_count (VALUE self )
407+ rb_shape_next_iv_index (VALUE self )
408408{
409409 rb_shape_t * shape ;
410410 TypedData_Get_Struct (self , rb_shape_t , & shape_data_type , shape );
411411
412- return INT2NUM (shape -> iv_count );
412+ return INT2NUM (shape -> next_iv_index );
413413}
414414
415415static VALUE
@@ -526,7 +526,7 @@ Init_shape(void)
526526 rb_define_method (rb_cShape , "parent" , rb_shape_parent , 0 );
527527 rb_define_method (rb_cShape , "edges" , rb_shape_edges , 0 );
528528 rb_define_method (rb_cShape , "edge_name" , rb_shape_edge_name , 0 );
529- rb_define_method (rb_cShape , "iv_count " , rb_shape_iv_count , 0 );
529+ rb_define_method (rb_cShape , "next_iv_index " , rb_shape_next_iv_index , 0 );
530530 rb_define_method (rb_cShape , "depth" , rb_shape_export_depth , 0 );
531531 rb_define_method (rb_cShape , "id" , rb_wrapped_shape_id , 0 );
532532 rb_define_method (rb_cShape , "type" , rb_shape_type , 0 );
0 commit comments