Skip to content

Commit 629ecd6

Browse files
committed
Sync gc_impl.h and mmtk.c
1 parent 0abe6d6 commit 629ecd6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

gc/gc_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ GC_IMPL_FN VALUE rb_gc_impl_stat_heap(void *objspace_ptr, VALUE heap_name, VALUE
117117
GC_IMPL_FN const char *rb_gc_impl_active_gc_name(void);
118118
// Miscellaneous
119119
GC_IMPL_FN struct rb_gc_object_metadata_entry *rb_gc_impl_object_metadata(void *objspace_ptr, VALUE obj);
120-
GC_IMPL_FN bool rb_gc_impl_pointer_to_heap_p(void *objspace_ptr, const void *ptr);
120+
GC_IMPL_FN bool rb_gc_impl_live_object_p(void *objspace_ptr, const void *ptr);
121121
GC_IMPL_FN bool rb_gc_impl_garbage_object_p(void *objspace_ptr, VALUE obj);
122122
GC_IMPL_FN void rb_gc_impl_set_event_hook(void *objspace_ptr, const rb_event_flag_t event);
123123
GC_IMPL_FN void rb_gc_impl_copy_attributes(void *objspace_ptr, VALUE dest, VALUE obj);

gc/mmtk/mmtk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ rb_gc_impl_mark_and_pin(void *objspace_ptr, VALUE obj)
10341034
void
10351035
rb_gc_impl_mark_maybe(void *objspace_ptr, VALUE obj)
10361036
{
1037-
if (rb_gc_impl_pointer_to_heap_p(objspace_ptr, (const void *)obj)) {
1037+
if (rb_gc_impl_live_object_p(objspace_ptr, (const void *)obj)) {
10381038
rb_gc_impl_mark_and_pin(objspace_ptr, obj);
10391039
}
10401040
}
@@ -1080,12 +1080,12 @@ rb_gc_impl_writebarrier(void *objspace_ptr, VALUE a, VALUE b)
10801080
if (SPECIAL_CONST_P(b)) return;
10811081

10821082
#ifdef MMTK_DEBUG
1083-
if (!rb_gc_impl_pointer_to_heap_p(objspace_ptr, (void *)a)) {
1083+
if (!rb_gc_impl_live_object_p(objspace_ptr, (void *)a)) {
10841084
char buff[256];
10851085
rb_bug("a: %s is not an object", rb_raw_obj_info(buff, 256, a));
10861086
}
10871087

1088-
if (!rb_gc_impl_pointer_to_heap_p(objspace_ptr, (void *)b)) {
1088+
if (!rb_gc_impl_live_object_p(objspace_ptr, (void *)b)) {
10891089
char buff[256];
10901090
rb_bug("b: %s is not an object", rb_raw_obj_info(buff, 256, b));
10911091
}
@@ -1624,7 +1624,7 @@ rb_gc_impl_object_metadata(void *objspace_ptr, VALUE obj)
16241624
}
16251625

16261626
bool
1627-
rb_gc_impl_pointer_to_heap_p(void *objspace_ptr, const void *ptr)
1627+
rb_gc_impl_live_object_p(void *objspace_ptr, const void *ptr)
16281628
{
16291629
if (ptr == NULL) return false;
16301630
if ((uintptr_t)ptr % sizeof(void*) != 0) return false;

0 commit comments

Comments
 (0)