From eb69eebfd701a01292c116ada098a71bb25ee625 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 1 Jun 2017 08:28:38 +0900 Subject: Simplify code since OP_EXEC never takes CFUNC Proc; #3678 --- src/vm.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'src/vm.c') diff --git a/src/vm.c b/src/vm.c index b3d2b7e10..b9292693c 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2626,25 +2626,13 @@ RETRY_TRY_BLOCK: p->target_class = ci->target_class; ci->proc = p; - if (MRB_PROC_CFUNC_P(p)) { - ci->nregs = 0; - mrb->c->stack[0] = p->body.func(mrb, recv); - mrb_gc_arena_restore(mrb, ai); - if (mrb->exc) goto L_RAISE; - /* pop stackpos */ - mrb->c->stack = mrb->c->ci->stackent; - cipop(mrb); - NEXT; - } - else { - irep = p->body.irep; - pool = irep->pool; - syms = irep->syms; - stack_extend(mrb, irep->nregs); - ci->nregs = irep->nregs; - pc = irep->iseq; - JUMP; - } + irep = p->body.irep; + pool = irep->pool; + syms = irep->syms; + stack_extend(mrb, irep->nregs); + ci->nregs = irep->nregs; + pc = irep->iseq; + JUMP; } CASE(OP_METHOD) { -- cgit v1.2.3