Move special constant check in rb_gc_location to gc.c
This commit is contained in:
parent
d0968b1b4c
commit
d28368d27f
Notes:
git
2024-12-16 18:32:54 +00:00
4
gc.c
4
gc.c
@ -3150,6 +3150,10 @@ check_id_table_move(VALUE value, void *data)
|
|||||||
VALUE
|
VALUE
|
||||||
rb_gc_location(VALUE value)
|
rb_gc_location(VALUE value)
|
||||||
{
|
{
|
||||||
|
if (SPECIAL_CONST_P(value)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
return rb_gc_impl_location(rb_gc_get_objspace(), value);
|
return rb_gc_impl_location(rb_gc_get_objspace(), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4012,7 +4012,6 @@ rb_gc_impl_location(void *objspace_ptr, VALUE value)
|
|||||||
{
|
{
|
||||||
VALUE destination;
|
VALUE destination;
|
||||||
|
|
||||||
if (!SPECIAL_CONST_P(value)) {
|
|
||||||
asan_unpoisoning_object(value) {
|
asan_unpoisoning_object(value) {
|
||||||
if (BUILTIN_TYPE(value) == T_MOVED) {
|
if (BUILTIN_TYPE(value) == T_MOVED) {
|
||||||
destination = (VALUE)RMOVED(value)->destination;
|
destination = (VALUE)RMOVED(value)->destination;
|
||||||
@ -4022,10 +4021,6 @@ rb_gc_impl_location(void *objspace_ptr, VALUE value)
|
|||||||
destination = value;
|
destination = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
destination = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return destination;
|
return destination;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user