summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-05-08 20:16:00 +0200
committerJean Boussier <[email protected]>2025-05-09 10:22:51 +0200
commit677d075c2901198aad2f17b7d9f07af021c5e974 ()
tree7b852d0dcb2bc6d98df23b661f1c7652262f318c
parentf82523f14bf69f73a4660611a16a67a88a408eda (diff)
Refactor `rb_shape_transition_too_complex` to return an ID.
Notes: Merged: https://.com/ruby/ruby/pull/13283
-rw-r--r--shape.c6
-rw-r--r--shape.h2
-rw-r--r--variable.c4
3 files changed, 6 insertions, 6 deletions
@@ -742,11 +742,11 @@ shape_transition_too_complex(rb_shape_t *original_shape)
return next_shape;
}
-rb_shape_t *
-rb_shape_transition_shape_too_complex(VALUE obj)
{
rb_shape_t *original_shape = rb_shape_get_shape(obj);
- return shape_transition_too_complex(original_shape);
}
bool
@@ -166,7 +166,7 @@ void rb_shape_set_shape(VALUE obj, rb_shape_t *shape);
rb_shape_t *rb_shape_get_shape(VALUE obj);
bool rb_shape_frozen_shape_p(rb_shape_t *shape);
shape_id_t rb_shape_transition_frozen(VALUE obj);
-rb_shape_t *rb_shape_transition_shape_too_complex(VALUE obj);
bool rb_shape_transition_shape_remove_ivar(VALUE obj, ID id, rb_shape_t *shape, VALUE *removed);
rb_shape_t *rb_shape_get_next(rb_shape_t *shape, VALUE obj, ID id);
rb_shape_t *rb_shape_get_next_no_warnings(rb_shape_t *shape, VALUE obj, ID id);
@@ -1511,7 +1511,7 @@ static void
obj_transition_too_complex(VALUE obj, st_table *table)
{
RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
- shape_id_t shape_id = rb_shape_id(rb_shape_transition_shape_too_complex(obj));
VALUE *old_fields = NULL;
@@ -1803,7 +1803,7 @@ generic_ivar_set_too_complex_table(VALUE obj, void *data)
if (!rb_gen_fields_tbl_get(obj, 0, &fields_tbl)) {
fields_tbl = xmalloc(sizeof(struct gen_fields_tbl));
#if !SHAPE_IN_BASIC_FLAGS
- fields_tbl->shape_id = rb_shape_id(rb_shape_transition_shape_too_complex(obj));
#endif
fields_tbl->as.complex.table = st_init_numtable_with_size(1);