summaryrefslogtreecommitdiff
path: root/vm_insnhelper.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 /vm_insnhelper.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 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 05608fd159..28d0ea31c6 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -285,10 +285,10 @@ vm_cref_push(rb_thread_t *th, VALUE klass, int noex, rb_block_t *blockptr)
cref->nd_visi = noex;
if (blockptr) {
- cref->nd_next = vm_get_cref0(blockptr->iseq, blockptr->ep);
+ OBJ_WRITE(cref, &cref->nd_next, vm_get_cref0(blockptr->iseq, blockptr->ep));
}
else if (cfp) {
- cref->nd_next = vm_get_cref0(cfp->iseq, cfp->ep);
+ OBJ_WRITE(cref, &cref->nd_next, vm_get_cref0(cfp->iseq, cfp->ep));
}
/* TODO: why cref->nd_next is 1? */
if (cref->nd_next && cref->nd_next != (void *) 1 &&