зеркало из https://github.com/github/ruby.git
* gc.c (rb_copy_wb_protected_attribute): demote `dest' object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1643234fe3
Коммит
531f775fd4
|
@ -1,3 +1,7 @@
|
|||
Thu Mar 19 21:25:25 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (rb_copy_wb_protected_attribute): demote `dest' object.
|
||||
|
||||
Thu Mar 19 16:18:00 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c, internal.h: export rb_gc_verify_internal_consistency().
|
||||
|
|
7
gc.c
7
gc.c
|
@ -5734,13 +5734,18 @@ rb_copy_wb_protected_attribute(VALUE dest, VALUE obj)
|
|||
#if USE_RGENGC
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
|
||||
if (RGENGC_CHECK_MODE > 0 && RVALUE_WB_UNPROTECTED(dest)) {
|
||||
rb_bug("rb_copy_wb_protected_attribute: dest should not be WB unprotected - %s",
|
||||
obj_info(dest));
|
||||
}
|
||||
|
||||
if (RVALUE_WB_UNPROTECTED(obj)) {
|
||||
if (!RVALUE_OLD_P(dest)) {
|
||||
MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(dest), dest);
|
||||
RVALUE_AGE_RESET_RAW(dest);
|
||||
}
|
||||
else {
|
||||
RVALUE_DEMOTE(objspace, obj);
|
||||
RVALUE_DEMOTE(objspace, dest);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче