diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gc.c | 17 |
2 files changed, 8 insertions, 14 deletions
@@ -1,3 +1,8 @@ +Sun Apr 20 06:01:18 2014 Eric Wong <e@80x24.org> + + * gc.c (rb_gc_writebarrier): drop special case for big hash/array + [Bug #9518] + Sat Apr 19 15:38:29 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (primary): flush cmdarg flags inside left-paren in a @@ -4789,20 +4789,9 @@ rb_gc_writebarrier(VALUE a, VALUE b) rb_objspace_t *objspace = &rb_objspace; if (!rgengc_remembered(objspace, a)) { - int type = BUILTIN_TYPE(a); - /* TODO: 2 << 16 is just a magic number. */ - if ((type == T_ARRAY && RARRAY_LEN(a) >= 2 << 16) || - (type == T_HASH && RHASH_SIZE(a) >= 2 << 16)) { - if (!rgengc_remembered(objspace, b)) { - rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n", (void *)a, obj_type_name(a), (void *)b, obj_type_name(b)); - rgengc_remember(objspace, b); - } - } - else { - rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n", - (void *)a, obj_type_name(a), (void *)b, obj_type_name(b)); - rgengc_remember(objspace, a); - } + rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n", + (void *)a, obj_type_name(a), (void *)b, obj_type_name(b)); + rgengc_remember(objspace, a); } } } |