mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-eval (exec_irep): cache mrb->c->ci to a local variable
This commit is contained in:
@@ -142,11 +142,13 @@ create_proc_from_string(mrb_state *mrb, const char *s, mrb_int len, mrb_value bi
|
||||
static mrb_value
|
||||
exec_irep(mrb_state *mrb, mrb_value self, struct RProc *proc)
|
||||
{
|
||||
mrb_callinfo *ci = mrb->c->ci;
|
||||
|
||||
/* no argument passed from eval() */
|
||||
mrb->c->ci->n = 0;
|
||||
mrb->c->ci->nk = 0;
|
||||
ci->n = 0;
|
||||
ci->nk = 0;
|
||||
/* clear block */
|
||||
mrb->c->ci->stack[1] = mrb_nil_value();
|
||||
ci->stack[1] = mrb_nil_value();
|
||||
return mrb_exec_irep(mrb, self, proc, TRUE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user