Skip to content

Commit 7d8695e

Browse files
committed
Stop pinning shape edges
Now that `rb_shape_traverse_from_new_root` has been eliminated there's no longer any reason to pin these objects, because we no longer need to traverse shapes downward during compaction.
1 parent a640723 commit 7d8695e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

shape.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,7 @@ shape_tree_mark(void *data)
304304
rb_shape_t *end = RSHAPE(GET_SHAPE_TREE()->next_shape_id - 1);
305305
while (cursor < end) {
306306
if (cursor->edges && !SINGLE_CHILD_P(cursor->edges)) {
307-
// FIXME: GC compaction may call `rb_shape_traverse_from_new_root`
308-
// to migrate objects from one object slot to another.
309-
// Because of this if we don't pin `cursor->edges` it might be turned
310-
// into a T_MOVED during GC.
311-
// We'd need to eliminate `SHAPE_T_OBJECT` so that GC never need to lookup
312-
// shapes this way.
313-
// rb_gc_mark_movable(cursor->edges);
314-
rb_gc_mark(cursor->edges);
307+
rb_gc_mark_movable(cursor->edges);
315308
}
316309
cursor++;
317310
}

0 commit comments

Comments
 (0)