summaryrefslogtreecommitdiff
path: root/shape.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-12-15 12:00:30 -0500
committerPeter Zhu <peter@peterzhu.ca>2022-12-15 12:00:30 -0500
commitf50aa19da63067c4b0de5964b6632df20202e71c (patch)
tree0c8167251eeffb1a6bf32f78a97acb06068bfb03 /shape.c
parent9c54466e299aa91af225bc2d92a3d7755730948f (diff)
downloadruby-f50aa19da63067c4b0de5964b6632df20202e71c.tar.gz
Revert "Fix Object Movement allocation in GC"
This reverts commit 9c54466e299aa91af225bc2d92a3d7755730948f. We're seeing crashes in Shopify CI after this commit.
Diffstat (limited to 'shape.c')
-rw-r--r--shape.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/shape.c b/shape.c
index 6227958d2c..86572f9fde 100644
--- a/shape.c
+++ b/shape.c
@@ -404,39 +404,6 @@ rb_shape_id_offset(void)
}
rb_shape_t *
-rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *dest_shape)
-{
- RUBY_ASSERT(initial_shape->type == SHAPE_T_OBJECT);
- rb_shape_t *next_shape = initial_shape;
-
- if (dest_shape->type != initial_shape->type) {
- next_shape = rb_shape_traverse_from_new_root(initial_shape, rb_shape_get_parent(dest_shape));
- if (!next_shape) {
- return NULL;
- }
- }
-
- switch ((enum shape_type)dest_shape->type) {
- case SHAPE_IVAR:
- if (!next_shape->edges) {
- return NULL;
- }
- if (!rb_id_table_lookup(next_shape->edges, dest_shape->edge_name, (VALUE *)&next_shape)) {
- return NULL;
- }
- break;
- case SHAPE_ROOT:
- case SHAPE_FROZEN:
- case SHAPE_CAPACITY_CHANGE:
- case SHAPE_INITIAL_CAPACITY:
- case SHAPE_T_OBJECT:
- break;
- }
-
- return next_shape;
-}
-
-rb_shape_t *
rb_shape_rebuild_shape(rb_shape_t * initial_shape, rb_shape_t * dest_shape)
{
rb_shape_t * midway_shape;