From dd34ac647fb5d6842941b3529d1452797862cc23 Mon Sep 17 00:00:00 2001 From: dearblue Date: Sat, 3 Apr 2021 21:17:48 +0900 Subject: Make `mrb_exec_irep()` allow non-VM to enter. Change the old `mrb_exec_irep()` as-is to static `mrb_exec_irep_vm()`. Extract the VM entry part from the old `exec_irep()` in `mruby-eval/src/eval.c` and make it the core of the new `mrb_exec_irep()`. --- mrbgems/mruby-eval/src/eval.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'mrbgems/mruby-eval/src/eval.c') diff --git a/mrbgems/mruby-eval/src/eval.c b/mrbgems/mruby-eval/src/eval.c index 978d4fc30..508f5ffcb 100644 --- a/mrbgems/mruby-eval/src/eval.c +++ b/mrbgems/mruby-eval/src/eval.c @@ -131,15 +131,6 @@ exec_irep(mrb_state *mrb, mrb_value self, struct RProc *proc, mrb_func_t posthoo { /* no argument passed from eval() */ mrb->c->ci->argc = 0; - if (mrb->c->ci->acc < 0) { - ptrdiff_t cioff = mrb->c->ci - mrb->c->cibase; - mrb_value ret = mrb_top_run(mrb, proc, self, 0); - if (mrb->exc) { - mrb_exc_raise(mrb, mrb_obj_value(mrb->exc)); - } - mrb->c->ci = mrb->c->cibase + cioff; - return ret; - } /* clear block */ mrb->c->ci->stack[1] = mrb_nil_value(); return mrb_exec_irep(mrb, self, proc, posthook); -- cgit v1.2.3