@@ -1289,7 +1289,7 @@ vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_call
12891289 }
12901290
12911291 if (LIKELY (cached_id == shape_id )) {
1292- RUBY_ASSERT (cached_id != OBJ_TOO_COMPLEX_SHAPE_ID );
1292+ RUBY_ASSERT (! rb_shape_id_too_complex_p ( cached_id ) );
12931293
12941294 if (index == ATTR_INDEX_NOT_SET ) {
12951295 return default_value ;
@@ -1330,7 +1330,7 @@ vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_call
13301330 }
13311331#endif
13321332
1333- if (shape_id == OBJ_TOO_COMPLEX_SHAPE_ID ) {
1333+ if (rb_shape_id_too_complex_p ( shape_id ) ) {
13341334 st_table * table = NULL ;
13351335 switch (BUILTIN_TYPE (obj )) {
13361336 case T_CLASS :
@@ -1408,7 +1408,7 @@ vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_call
14081408static void
14091409populate_cache (attr_index_t index , shape_id_t next_shape_id , ID id , const rb_iseq_t * iseq , IVC ic , const struct rb_callcache * cc , bool is_attr )
14101410{
1411- RUBY_ASSERT (next_shape_id != OBJ_TOO_COMPLEX_SHAPE_ID );
1411+ RUBY_ASSERT (! rb_shape_id_too_complex_p ( next_shape_id ) );
14121412
14131413 // Cache population code
14141414 if (is_attr ) {
@@ -1436,7 +1436,7 @@ vm_setivar_slowpath(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic,
14361436
14371437 shape_id_t next_shape_id = ROBJECT_SHAPE_ID (obj );
14381438
1439- if (next_shape_id != OBJ_TOO_COMPLEX_SHAPE_ID ) {
1439+ if (! rb_shape_id_too_complex_p ( next_shape_id ) ) {
14401440 populate_cache (index , next_shape_id , id , iseq , ic , cc , is_attr );
14411441 }
14421442
@@ -1517,7 +1517,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, shape_id_t dest_shape_id, attr_index_t i
15171517 VM_ASSERT (!rb_ractor_shareable_p (obj ) || rb_obj_frozen_p (obj ));
15181518
15191519 shape_id_t shape_id = ROBJECT_SHAPE_ID (obj );
1520- RUBY_ASSERT (dest_shape_id != OBJ_TOO_COMPLEX_SHAPE_ID );
1520+ RUBY_ASSERT (! rb_shape_id_too_complex_p ( dest_shape_id ) );
15211521
15221522 if (LIKELY (shape_id == dest_shape_id )) {
15231523 RUBY_ASSERT (dest_shape_id != INVALID_SHAPE_ID && shape_id != INVALID_SHAPE_ID );
0 commit comments