Move logic from x_gc.c to mark_sweep.c.