diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-19 21:24:45 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-19 21:24:45 +0000 |
commit | 1d2d053bdaabed835bab26c8c18f03805fb300cc (patch) | |
tree | a6fae4e1f64d98726141fdab4602d6c8dae20ae7 /gc.c | |
parent | c501345218dc5fb0fae90d56a0c6fd19d38df5bb (diff) | |
download | ruby-1d2d053bdaabed835bab26c8c18f03805fb300cc.tar.gz |
gc.c: drop special case for big hash/array
* gc.c (rb_gc_writebarrier): drop special case for big hash/array
[Bug #9518]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -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); } } } |