diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-19 07:14:12 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-19 07:14:12 +0000 |
commit | f537854ff33fce2723ac7ff46180a990b5b0df5d (patch) | |
tree | ab151bfe555f873b3d33fb1c4d4bcc2fe688d1a2 | |
parent | 38cfec906d1cc99a5743d66c44f3245eea90e56d (diff) | |
download | ruby-f537854ff33fce2723ac7ff46180a990b5b0df5d.tar.gz |
* gc.c (newobj_of): fix RGENGC_OLD_NEWOBJ_CHECK logics.
* skip on incremental marking because not sure what happen :p
* rb_gc_writebarrier_remember() is enough to mark children.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 8 |
2 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,9 @@ +Thu Mar 19 16:12:01 2015 Koichi Sasada <ko1@atdot.net> + + * gc.c (newobj_of): fix RGENGC_OLD_NEWOBJ_CHECK logics. + * skip on incremental marking because not sure what happen :p + * rb_gc_writebarrier_remember() is enough to mark children. + Thu Mar 19 16:08:42 2015 Koichi Sasada <ko1@atdot.net> * gc.c (rb_copy_wb_protected_attribute): need demote for old objects. @@ -1748,7 +1748,8 @@ newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3) { static int newobj_cnt = RGENGC_OLD_NEWOBJ_CHECK; - if (flags & FL_WB_PROTECTED && /* do not promote WB unprotected objects */ + if (!is_incremental_marking(objspace) && + flags & FL_WB_PROTECTED && /* do not promote WB unprotected objects */ ! RB_TYPE_P(obj, T_ARRAY)) { /* array.c assumes that allocated objects are new */ if (--newobj_cnt == 0) { newobj_cnt = RGENGC_OLD_NEWOBJ_CHECK; @@ -1756,10 +1757,7 @@ newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3) gc_mark_set(objspace, obj); RVALUE_AGE_SET_OLD(objspace, obj); - if (is_pointer_to_heap(objspace, (void *)klass)) RB_OBJ_WRITTEN(obj, Qundef, klass); - if (is_pointer_to_heap(objspace, (void *)v1)) RB_OBJ_WRITTEN(obj, Qundef, v1); - if (is_pointer_to_heap(objspace, (void *)v2)) RB_OBJ_WRITTEN(obj, Qundef, v2); - if (is_pointer_to_heap(objspace, (void *)v3)) RB_OBJ_WRITTEN(obj, Qundef, v3); + rb_gc_writebarrier_remember(obj); } } } |