Skip to content

Commit 24c3c97

Browse files
committed
No longer override the TYPED_UPDATE_IF_MOVED macro
With the upstream code refactored, we can now easily override its behavior in `rb_gc_impl_location`.
1 parent 2775d5a commit 24c3c97

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

gc.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -413,21 +413,11 @@ void rb_vm_update_references(void *ptr);
413413

414414
#define RMOVED(obj) ((struct RMoved *)(obj))
415415

416-
#if USE_MMTK
417-
#define TYPED_UPDATE_IF_MOVED(_objspace, _type, _thing) do { \
418-
if (rb_mmtk_enabled_p()) { \
419-
*(_type *)&(_thing) = (_type)rb_mmtk_maybe_forward((VALUE)(_thing)); \
420-
} else if (gc_object_moved_p_internal((_objspace), (VALUE)(_thing))) { \
421-
*(_type *)&(_thing) = (_type)gc_location_internal(_objspace, (VALUE)_thing); \
422-
} \
423-
} while (0)
424-
#else
425416
#define TYPED_UPDATE_IF_MOVED(_objspace, _type, _thing) do { \
426417
if (gc_object_moved_p_internal((_objspace), (VALUE)(_thing))) { \
427418
*(_type *)&(_thing) = (_type)gc_location_internal(_objspace, (VALUE)_thing); \
428419
} \
429420
} while (0)
430-
#endif
431421

432422
#define UPDATE_IF_MOVED(_objspace, _thing) TYPED_UPDATE_IF_MOVED(_objspace, VALUE, _thing)
433423

0 commit comments

Comments
 (0)