зеркало из https://github.com/github/ruby.git
Update method tables only if there is a class ext pointer
This makes reference updating look similar to marking, and may avoid dereferencing a wrong pointer.
This commit is contained in:
Родитель
cae657c324
Коммит
0f90630983
4
gc.c
4
gc.c
|
@ -8179,14 +8179,12 @@ gc_update_object_references(rb_objspace_t *objspace, VALUE obj)
|
|||
switch (BUILTIN_TYPE(obj)) {
|
||||
case T_CLASS:
|
||||
case T_MODULE:
|
||||
update_m_tbl(objspace, RCLASS_M_TBL(obj));
|
||||
if (RCLASS_SUPER((VALUE)obj)) {
|
||||
UPDATE_IF_MOVED(objspace, RCLASS(obj)->super);
|
||||
}
|
||||
if (!RCLASS_EXT(obj)) break;
|
||||
if (RCLASS_IV_TBL(obj)) {
|
||||
update_m_tbl(objspace, RCLASS_M_TBL(obj));
|
||||
gc_update_tbl_refs(objspace, RCLASS_IV_TBL(obj));
|
||||
}
|
||||
update_class_ext(objspace, RCLASS_EXT(obj));
|
||||
update_const_tbl(objspace, RCLASS_CONST_TBL(obj));
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче