diff options
author | nari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-16 08:27:36 +0000 |
---|---|---|
committer | nari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-16 08:27:36 +0000 |
commit | 832d5a832961b8cd6b58ec91079fa24af099f458 (patch) | |
tree | b5b5064e635500603e58e362d74a9a920dbd87b6 /vm_insnhelper.c | |
parent | 8c7172605b2bad7935c85ec99ccd864ca17f5d65 (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 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 13bbcf799b..0889e8aee9 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1032,12 +1032,12 @@ static NODE * vm_cref_push(rb_thread_t *th, VALUE klass, int noex) { rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(th, th->cfp); - NODE *cref = NEW_BLOCK(klass); + NODE *cref = NEW_NODE_LONGLIFE(NODE_BLOCK, klass, 0, 0); cref->nd_file = 0; cref->nd_visi = noex; if (cfp) { - cref->nd_next = vm_get_cref(cfp->iseq, cfp->lfp, cfp->dfp); + cref->nd_next = (NODE *)rb_gc_write_barrier((VALUE)vm_get_cref(cfp->iseq, cfp->lfp, cfp->dfp)); } return cref; |