зеркало из https://github.com/github/ruby.git
* gc.c (rb_copy_wb_protected_attribute): need demote for old objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5155a402ab
Коммит
38cfec906d
|
@ -1,3 +1,7 @@
|
|||
Thu Mar 19 16:08:42 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (rb_copy_wb_protected_attribute): need demote for old objects.
|
||||
|
||||
Thu Mar 19 10:31:00 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* random.c (fill_random_bytes): release the handle in the static
|
||||
|
|
11
gc.c
11
gc.c
|
@ -5730,9 +5730,16 @@ void
|
|||
rb_copy_wb_protected_attribute(VALUE dest, VALUE obj)
|
||||
{
|
||||
#if USE_RGENGC
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
|
||||
if (RVALUE_WB_UNPROTECTED(obj)) {
|
||||
MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(dest), dest);
|
||||
RVALUE_AGE_RESET_RAW(dest);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
check_rvalue_consistency(dest);
|
||||
|
|
Загрузка…
Ссылка в новой задаче