mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2188 from takeru/dont_reset_ridx_eidx
Don't reset ridx,eidx. And fix for #1949
This commit is contained in:
@@ -2251,10 +2251,10 @@ RETRY_TRY_BLOCK:
|
||||
/* stop VM */
|
||||
L_STOP:
|
||||
{
|
||||
int n = mrb->c->ci->eidx;
|
||||
|
||||
while (n--) {
|
||||
ecall(mrb, n);
|
||||
int eidx_stop = mrb->c->ci == mrb->c->cibase ? 0 : mrb->c->ci[-1].eidx;
|
||||
int eidx = mrb->c->ci->eidx;
|
||||
while (eidx > eidx_stop) {
|
||||
ecall(mrb, --eidx);
|
||||
}
|
||||
}
|
||||
ERR_PC_CLR(mrb);
|
||||
@@ -2307,8 +2307,6 @@ mrb_toplevel_run(mrb_state *mrb, struct RProc *proc)
|
||||
}
|
||||
ci = cipush(mrb);
|
||||
ci->acc = CI_ACC_SKIP;
|
||||
ci->eidx = 0;
|
||||
ci->ridx = 0;
|
||||
ci->target_class = mrb->object_class;
|
||||
v = mrb_context_run(mrb, proc, mrb_top_self(mrb), 0);
|
||||
cipop(mrb);
|
||||
|
||||
Reference in New Issue
Block a user