ruby-changes:34855
From: ko1 <ko1@a...>
Date: Fri, 25 Jul 2014 13:47:58 +0900 (JST)
Subject: [ruby-changes:34855] ko1:r46938 (trunk): * gc.c (rb_gc_writebarrier_remember_promoted): should remember only
ko1 2014-07-25 13:47:48 +0900 (Fri, 25 Jul 2014) New Revision: 46938 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46938 Log: * gc.c (rb_gc_writebarrier_remember_promoted): should remember only OLD objects on RGENGC_AGE2_PROMOTION. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 46937) +++ ChangeLog (revision 46938) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jul 25 13:45:39 2014 Koichi Sasada <ko1@a...> + + * gc.c (rb_gc_writebarrier_remember_promoted): should remember only + OLD objects on RGENGC_AGE2_PROMOTION. + Fri Jul 25 13:42:02 2014 Koichi Sasada <ko1@a...> * gc.c (gc_mark_stacked_objects): fix error message. Index: gc.c =================================================================== --- gc.c (revision 46937) +++ gc.c (revision 46938) @@ -4984,6 +4984,15 @@ void https://github.com/ruby/ruby/blob/trunk/gc.c#L4984 rb_gc_writebarrier_remember_promoted(VALUE obj) { rb_objspace_t *objspace = &rb_objspace; + + if (RGENGC_CHECK_MODE) { + if (!RVALUE_PROMOTED_P(obj)) rb_bug("rb_gc_writebarrier_remember_promoted: called on non-promoted object"); + } + +#if RGENGC_AGE2_PROMOTION + if (!RVALUE_OLD_P(obj)) return; +#endif + rgengc_remember(objspace, obj); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/