diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-25 04:47:48 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-25 04:47:48 +0000 |
commit | 61a28934578f067f36f632f5a386366143798a69 (patch) | |
tree | fbd45e1a840bcdb92b6fe8910d67fc41c2c008df /gc.c | |
parent | 009bf7be44eb7f9019de23125a9238831ce90a82 (diff) | |
download | ruby-61a28934578f067f36f632f5a386366143798a69.tar.gz |
* gc.c (rb_gc_writebarrier_remember_promoted): should remember only
OLD objects on RGENGC_AGE2_PROMOTION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4984,6 +4984,15 @@ void 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); } |