Rename rb_shape_id_canonical_p -> rb_shape_canonical_p

This commit is contained in:
Jean Boussier 2025-05-27 14:08:30 +02:00
parent 6c4ae85211
commit 326c120aa7
Notes: git 2025-05-27 13:34:16 +00:00
3 changed files with 4 additions and 4 deletions

View File

@ -339,7 +339,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
shape_id_t dest_shape_id = src_shape_id;
shape_id_t initial_shape_id = RBASIC_SHAPE_ID(dest);
if (RSHAPE(initial_shape_id)->heap_index != RSHAPE(src_shape_id)->heap_index || !rb_shape_id_canonical_p(src_shape_id)) {
if (RSHAPE(initial_shape_id)->heap_index != RSHAPE(src_shape_id)->heap_index || !rb_shape_canonical_p(src_shape_id)) {
RUBY_ASSERT(RSHAPE(initial_shape_id)->type == SHAPE_T_OBJECT);
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);

View File

@ -142,7 +142,7 @@ void rb_shape_copy_fields(VALUE dest, VALUE *dest_buf, shape_id_t dest_shape_id,
void rb_shape_copy_complex_ivars(VALUE dest, VALUE obj, shape_id_t src_shape_id, st_table *fields_table);
static inline bool
rb_shape_id_canonical_p(shape_id_t shape_id)
rb_shape_canonical_p(shape_id_t shape_id)
{
return !RSHAPE(shape_id)->flags;
}

View File

@ -1659,7 +1659,7 @@ rb_obj_init_too_complex(VALUE obj, st_table *table)
{
// This method is meant to be called on newly allocated object.
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));
RUBY_ASSERT(rb_shape_id_canonical_p(RBASIC_SHAPE_ID(obj)));
RUBY_ASSERT(rb_shape_canonical_p(RBASIC_SHAPE_ID(obj)));
RUBY_ASSERT(RSHAPE_LEN(RBASIC_SHAPE_ID(obj)) == 0);
obj_transition_too_complex(obj, table);
@ -2340,7 +2340,7 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj)
shape_id_t dest_shape_id = src_shape_id;
shape_id_t initial_shape_id = rb_obj_shape_id(dest);
if (!rb_shape_id_canonical_p(src_shape_id)) {
if (!rb_shape_canonical_p(src_shape_id)) {
RUBY_ASSERT(RSHAPE(initial_shape_id)->type == SHAPE_ROOT);
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);