summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-16 08:27:36 +0000
committernari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-16 08:27:36 +0000
commit832d5a832961b8cd6b58ec91079fa24af099f458 (patch)
treeb5b5064e635500603e58e362d74a9a920dbd87b6 /iseq.c
parent8c7172605b2bad7935c85ec99ccd864ca17f5d65 (diff)
* iseq.c (rb_iseq_clone): use longlife object and insert write barrier.
* vm_insnhelper.c (vm_cref_push): ditto. * vm_insnhelper.h (COPY_CREF): insert write barrier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index a102941cfc..6220aa8927 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1285,9 +1285,9 @@ rb_iseq_clone(VALUE iseqval, VALUE newcbase)
iseq1->orig = iseqval;
}
if (newcbase) {
- iseq1->cref_stack = NEW_BLOCK(newcbase);
+ iseq1->cref_stack = NEW_NODE_LONGLIFE(NODE_BLOCK, newcbase, 0, 0);
if (iseq0->cref_stack->nd_next) {
- iseq1->cref_stack->nd_next = iseq0->cref_stack->nd_next;
+ iseq1->cref_stack->nd_next = (NODE *)rb_gc_write_barrier((VALUE)iseq0->cref_stack->nd_next);
}
}