From b8fa8865ee9e76b83cdd64d54d563ca3ef648831 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 10 Mar 2015 19:57:30 +0000 Subject: * vm_insnhelper.h: define struct IFUNC. * vm_eval.c (rb_iterate): use it. * vm_insnhelper.c (vm_yield_with_cfunc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index 9ba940c342..30849ccff6 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -1104,22 +1104,23 @@ rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1, { int state; volatile VALUE retval = Qnil; - NODE *node = NEW_IFUNC(bl_proc, data2); + struct IFUNC *ifunc = (struct IFUNC *)NEW_IFUNC(bl_proc, data2); rb_thread_t *th = GET_THREAD(); rb_control_frame_t *volatile cfp = th->cfp; - node->nd_aid = rb_frame_this_func(); + ifunc->id = rb_frame_this_func(); + TH_PUSH_TAG(th); state = TH_EXEC_TAG(); if (state == 0) { VAR_INITIALIZED(th); - VAR_INITIALIZED(node); + VAR_INITIALIZED(ifunc); iter_retry: { rb_block_t *blockptr; if (bl_proc) { blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(th->cfp); - blockptr->iseq = (void *)node; + blockptr->iseq = (void *)ifunc; blockptr->proc = 0; } else { -- cgit v1.2.3