** Start the scope for the last 'nvars' created variables. */
| 309 | ** Start the scope for the last 'nvars' created variables. |
| 310 | */ |
| 311 | static void adjustlocalvars (LexState *ls, int nvars) { |
| 312 | FuncState *fs = ls->fs; |
| 313 | int reglevel = luaY_nvarstack(fs); |
| 314 | int i; |
| 315 | for (i = 0; i < nvars; i++) { |
| 316 | int vidx = fs->nactvar++; |
| 317 | Vardesc *var = getlocalvardesc(fs, vidx); |
| 318 | var->vd.ridx = reglevel++; |
| 319 | var->vd.pidx = registerlocalvar(ls, fs, var->vd.name); |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | |
| 324 | /* |