** Register a new local variable in the active 'Proto' (for debug ** information). */
| 173 | ** information). |
| 174 | */ |
| 175 | static int registerlocalvar (LexState *ls, FuncState *fs, TString *varname) { |
| 176 | Proto *f = fs->f; |
| 177 | int oldsize = f->sizelocvars; |
| 178 | luaM_growvector(ls->L, f->locvars, fs->ndebugvars, f->sizelocvars, |
| 179 | LocVar, SHRT_MAX, "local variables"); |
| 180 | while (oldsize < f->sizelocvars) |
| 181 | f->locvars[oldsize++].varname = NULL; |
| 182 | f->locvars[fs->ndebugvars].varname = varname; |
| 183 | f->locvars[fs->ndebugvars].startpc = fs->pc; |
| 184 | luaC_objbarrier(ls->L, f, varname); |
| 185 | return fs->ndebugvars++; |
| 186 | } |
| 187 | |
| 188 | |
| 189 | /* |