Skip to content

Commit 9240077

Browse files
committed
Remove function shape_get_next_iv_shape
1 parent 763665b commit 9240077

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

shape.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -729,18 +729,6 @@ rb_shape_object_id(shape_id_t original_shape_id)
729729
return SHAPE_ID(shape, original_shape_id) | SHAPE_ID_FL_HAS_OBJECT_ID;
730730
}
731731

732-
/*
733-
* This function is used for assertions where we don't want to increment
734-
* max_iv_count
735-
*/
736-
static inline rb_shape_t *
737-
shape_get_next_iv_shape(rb_shape_t *shape, ID id)
738-
{
739-
RUBY_ASSERT(!is_instance_id(id) || RTEST(rb_sym2str(ID2SYM(id))));
740-
bool dont_care;
741-
return get_next_shape_internal(shape, id, SHAPE_IVAR, &dont_care, true);
742-
}
743-
744732
static bool
745733
shape_get_iv_index(rb_shape_t *shape, ID id, attr_index_t *value)
746734
{
@@ -1089,7 +1077,8 @@ shape_rebuild(rb_shape_t *initial_shape, rb_shape_t *dest_shape)
10891077

10901078
switch ((enum shape_type)dest_shape->type) {
10911079
case SHAPE_IVAR:
1092-
midway_shape = shape_get_next_iv_shape(midway_shape, dest_shape->edge_name);
1080+
bool dont_care;
1081+
midway_shape = get_next_shape_internal(midway_shape, dest_shape->edge_name, SHAPE_IVAR, &dont_care, true)
10931082
break;
10941083
case SHAPE_OBJ_ID:
10951084
case SHAPE_ROOT:

0 commit comments

Comments
 (0)