mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
allocation size of irep->iv is irep->nlocals-1.
This commit is contained in:
@@ -55,18 +55,18 @@ search_variable(mrb_state *mrb, mrb_sym vsym, int bnest)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static mrb_bool
|
||||
potential_upvar_p(struct mrb_locals *lv, uint16_t v, uint16_t nlocals)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (v >= nlocals) return FALSE;
|
||||
/* skip arguments */
|
||||
for (i=0; i<nlocals; i++) {
|
||||
for (i=0; i<nlocals-1; i++) {
|
||||
if (lv[i].name == 0)
|
||||
break;
|
||||
return i < v;
|
||||
}
|
||||
if (i == nlocals) return v < nlocals;
|
||||
return i < v && v < nlocals;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -126,8 +126,6 @@ patch_irep(mrb_state *mrb, mrb_irep *irep, int bnest)
|
||||
}
|
||||
}
|
||||
|
||||
void mrb_codedump_all(mrb_state *mrb, struct RProc *proc);
|
||||
|
||||
static struct RProc*
|
||||
create_proc_from_string(mrb_state *mrb, char *s, int len, mrb_value binding, char *file, mrb_int line)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user