mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (gc_writebarrier_generational): fix messages for rb_bug().
Remove `rb_' prefix. * gc.c (gc_writebarrier_incremental): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0ca50790f
commit
fce98c9e88
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Tue Mar 24 19:10:24 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* gc.c (gc_writebarrier_generational): fix messages for rb_bug().
|
||||||
|
Remove `rb_' prefix.
|
||||||
|
|
||||||
|
* gc.c (gc_writebarrier_incremental): ditto.
|
||||||
|
|
||||||
Tue Mar 24 17:34:01 2015 Shugo Maeda <shugo@ruby-lang.org>
|
Tue Mar 24 17:34:01 2015 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* README.ja.md: should be chunibyo.
|
* README.ja.md: should be chunibyo.
|
||||||
|
|
12
gc.c
12
gc.c
|
@ -5536,14 +5536,14 @@ gc_writebarrier_generational(rb_objspace_t *objspace, VALUE a, VALUE b)
|
||||||
if (RGENGC_CHECK_MODE) {
|
if (RGENGC_CHECK_MODE) {
|
||||||
if (!RVALUE_OLD_P(a)) rb_bug("gc_writebarrier_generational: %s is not an old object.", obj_info(a));
|
if (!RVALUE_OLD_P(a)) rb_bug("gc_writebarrier_generational: %s is not an old object.", obj_info(a));
|
||||||
if ( RVALUE_OLD_P(b)) rb_bug("gc_writebarrier_generational: %s is an old object.", obj_info(b));
|
if ( RVALUE_OLD_P(b)) rb_bug("gc_writebarrier_generational: %s is an old object.", obj_info(b));
|
||||||
if (is_incremental_marking(objspace)) rb_bug("rb_gc_writebarrier_generational: called while incremental marking: %s -> %s", obj_info(a), obj_info(b));
|
if (is_incremental_marking(objspace)) rb_bug("gc_writebarrier_generational: called while incremental marking: %s -> %s", obj_info(a), obj_info(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
/* mark `a' and remember (default behaviour) */
|
/* mark `a' and remember (default behaviour) */
|
||||||
if (!rgengc_remembered(objspace, a)) {
|
if (!rgengc_remembered(objspace, a)) {
|
||||||
rgengc_remember(objspace, a);
|
rgengc_remember(objspace, a);
|
||||||
gc_report(1, objspace, "rb_gc_writebarrier_generational: %s (remembered) -> %s\n", obj_info(a), obj_info(b));
|
gc_report(1, objspace, "gc_writebarrier_generational: %s (remembered) -> %s\n", obj_info(a), obj_info(b));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* mark `b' and remember */
|
/* mark `b' and remember */
|
||||||
|
@ -5579,18 +5579,18 @@ NOINLINE(static void gc_writebarrier_incremental(rb_objspace_t *objspace, VALUE
|
||||||
static void
|
static void
|
||||||
gc_writebarrier_incremental(rb_objspace_t *objspace, VALUE a, VALUE b)
|
gc_writebarrier_incremental(rb_objspace_t *objspace, VALUE a, VALUE b)
|
||||||
{
|
{
|
||||||
gc_report(2, objspace, "rb_gc_writebarrier_incremental: [LG] %s -> %s\n", obj_info(a), obj_info(b));
|
gc_report(2, objspace, "gc_writebarrier_incremental: [LG] %s -> %s\n", obj_info(a), obj_info(b));
|
||||||
|
|
||||||
if (RVALUE_BLACK_P(a)) {
|
if (RVALUE_BLACK_P(a)) {
|
||||||
if (RVALUE_WHITE_P(b)) {
|
if (RVALUE_WHITE_P(b)) {
|
||||||
if (!RVALUE_WB_UNPROTECTED(a)) {
|
if (!RVALUE_WB_UNPROTECTED(a)) {
|
||||||
gc_report(2, objspace, "rb_gc_writebarrier_incremental: [IN] %s -> %s\n", obj_info(a), obj_info(b));
|
gc_report(2, objspace, "gc_writebarrier_incremental: [IN] %s -> %s\n", obj_info(a), obj_info(b));
|
||||||
gc_mark_from(objspace, b, a);
|
gc_mark_from(objspace, b, a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (RVALUE_OLD_P(a) && !RVALUE_OLD_P(b)) {
|
else if (RVALUE_OLD_P(a) && !RVALUE_OLD_P(b)) {
|
||||||
if (!RVALUE_WB_UNPROTECTED(b)) {
|
if (!RVALUE_WB_UNPROTECTED(b)) {
|
||||||
gc_report(1, objspace, "rb_gc_writebarrier_incremental: [GN] %s -> %s\n", obj_info(a), obj_info(b));
|
gc_report(1, objspace, "gc_writebarrier_incremental: [GN] %s -> %s\n", obj_info(a), obj_info(b));
|
||||||
RVALUE_AGE_SET_OLD(objspace, b);
|
RVALUE_AGE_SET_OLD(objspace, b);
|
||||||
|
|
||||||
if (RVALUE_BLACK_P(b)) {
|
if (RVALUE_BLACK_P(b)) {
|
||||||
|
@ -5598,7 +5598,7 @@ gc_writebarrier_incremental(rb_objspace_t *objspace, VALUE a, VALUE b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gc_report(1, objspace, "rb_gc_writebarrier_incremental: [LL] %s -> %s\n", obj_info(a), obj_info(b));
|
gc_report(1, objspace, "gc_writebarrier_incremental: [LL] %s -> %s\n", obj_info(a), obj_info(b));
|
||||||
gc_remember_unprotected(objspace, b);
|
gc_remember_unprotected(objspace, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue