mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
avoid unnecessary pool/syms restoration
This commit is contained in:
@@ -920,10 +920,12 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
if (mrb->exc) goto L_RAISE;
|
||||
/* pop stackpos */
|
||||
ci = mrb->c->ci;
|
||||
if (!MRB_PROC_CFUNC_P(ci[-1].proc)) {
|
||||
irep = ci[-1].proc->body.irep;
|
||||
pool = irep->pool;
|
||||
syms = irep->syms;
|
||||
if (!ci->target_class) { /* return from context modifying method (resume/yield) */
|
||||
if (!MRB_PROC_CFUNC_P(ci[-1].proc)) {
|
||||
irep = ci[-1].proc->body.irep;
|
||||
pool = irep->pool;
|
||||
syms = irep->syms;
|
||||
}
|
||||
}
|
||||
regs = mrb->c->stack = mrb->c->stbase + ci->stackidx;
|
||||
pc = ci->pc;
|
||||
|
||||
Reference in New Issue
Block a user