summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authortmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 02:28:04 +0000
committertmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 02:28:04 +0000
commit8f77cfb308061ff49de0a47e82816c8dafa27963 (patch)
treeac9037ccb926ebba75aea42697db2ca59efc0ab0 /class.c
parent779ae78995977305aa5aec9cb5b562dcf54c22e7 (diff)
gc.c: promote long-lived NODE_CREF objects to oldgen
* include/ruby/ruby.h: add RGENGC_WB_PROTECTED_NODE_CREF setting In a large app, this reduces the size of remembered_shady_object_count by 80%. [Bug #9225] [ruby-core:58947] * gc.c (rb_node_newnode): add FL_WB_PROTECTED flag to NODE_CREF * class.c (rewrite_cref_stack): insert OBJ_WRITE for NODE_CREF * iseq.c (set_relation): ditto * iseq.c (rb_iseq_clone): ditto * vm_eval.c (rb_yield_refine_block): ditto * vm_insnhelper.c (vm_cref_push): ditto * vm_insnhelper.h (COPY_CREF): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class.c b/class.c
index 7e03693..66495eb 100644
--- a/class.c
+++ b/class.c
@@ -239,7 +239,7 @@ rewrite_cref_stack(NODE *node, VALUE old_klass, VALUE new_klass, NODE **new_cref
while (node) {
if (node->nd_clss == old_klass) {
new_node = NEW_CREF(new_klass);
- new_node->nd_next = node->nd_next;
+ OBJ_WRITE(new_node, &new_node->nd_next, node->nd_next);
*new_cref_ptr = new_node;
return;
}