diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-11-08 10:19:06 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-11-09 09:25:02 -0500 |
commit | f6910a61122931e4193bcc0fad18d839c319b720 (patch) | |
tree | 3d4ab8b3d6ba6204b917ac16743748dcb02e0c65 /variable.c | |
parent | c4efd170616c3ee82a07fda04f878120f1a97e98 (diff) |
Remove SHAPE_CAPACITY_CHANGE shapes
We don't need to create a shape to transition capacity as we can
transition the capacity when the capacity of the SHAPE_IVAR changes.
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/variable.c b/variable.c index 72c0fd7c2b..653fa58552 100644 --- a/variable.c +++ b/variable.c @@ -1509,7 +1509,7 @@ generic_ivar_lookup_ensure_size(st_data_t *k, st_data_t *v, st_data_t u, int exi if (!existing || ivar_lookup->resize) { if (existing) { RUBY_ASSERT(ivar_lookup->shape->type == SHAPE_IVAR); - RUBY_ASSERT(rb_shape_get_shape_by_id(ivar_lookup->shape->parent_id)->type == SHAPE_CAPACITY_CHANGE); + RUBY_ASSERT(rb_shape_get_shape_by_id(ivar_lookup->shape->parent_id)->capacity < ivar_lookup->shape->capacity); } else { FL_SET_RAW((VALUE)*k, FL_EXIVAR); @@ -1895,7 +1895,6 @@ iterate_over_shapes_with_callback(rb_shape_t *shape, rb_ivar_foreach_callback_fu } } return false; - case SHAPE_CAPACITY_CHANGE: case SHAPE_FROZEN: case SHAPE_T_OBJECT: return iterate_over_shapes_with_callback(rb_shape_get_parent(shape), callback, itr_data); |