Get rid of rb_shape_canonical_p
This commit is contained in:
parent
8b0868cbb1
commit
cc48fcdff2
Notes:
git
2025-05-27 10:45:39 +00:00
8
shape.h
8
shape.h
@ -150,16 +150,10 @@ rb_obj_shape(VALUE obj)
|
|||||||
return RSHAPE(rb_obj_shape_id(obj));
|
return RSHAPE(rb_obj_shape_id(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
|
||||||
rb_shape_canonical_p(rb_shape_t *shape)
|
|
||||||
{
|
|
||||||
return !shape->flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
rb_shape_id_canonical_p(shape_id_t shape_id)
|
rb_shape_id_canonical_p(shape_id_t shape_id)
|
||||||
{
|
{
|
||||||
return rb_shape_canonical_p(RSHAPE(shape_id));
|
return !RSHAPE(shape_id)->flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline shape_id_t
|
static inline shape_id_t
|
||||||
|
@ -1663,7 +1663,7 @@ rb_obj_init_too_complex(VALUE obj, st_table *table)
|
|||||||
{
|
{
|
||||||
// This method is meant to be called on newly allocated object.
|
// This method is meant to be called on newly allocated object.
|
||||||
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));
|
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));
|
||||||
RUBY_ASSERT(rb_shape_canonical_p(rb_obj_shape(obj)));
|
RUBY_ASSERT(rb_shape_id_canonical_p(RBASIC_SHAPE_ID(obj)));
|
||||||
RUBY_ASSERT(rb_obj_shape(obj)->next_field_index == 0);
|
RUBY_ASSERT(rb_obj_shape(obj)->next_field_index == 0);
|
||||||
|
|
||||||
obj_transition_too_complex(obj, table);
|
obj_transition_too_complex(obj, table);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user