| 329 | |
| 330 | |
| 331 | static void adjust_assign(LexState *ls, int nvars, int nexps, expdesc *e) { |
| 332 | FuncState *fs = ls->fs; |
| 333 | int extra = nvars - nexps; |
| 334 | if (hasmultret(e->k)) { |
| 335 | extra++; /* includes call itself */ |
| 336 | if (extra < 0) extra = 0; |
| 337 | luaK_setreturns(fs, e, extra); /* last exp. provides the difference */ |
| 338 | if (extra > 1) luaK_reserveregs(fs, extra - 1); |
| 339 | } |
| 340 | else { |
| 341 | if (e->k != VVOID) luaK_exp2nextreg(fs, e); /* close last expression */ |
| 342 | if (extra > 0) { |
| 343 | int reg = fs->freereg; |
| 344 | luaK_reserveregs(fs, extra); |
| 345 | luaK_nil(fs, reg, extra); |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | |
| 351 | static void enterlevel(LexState *ls) { |
no test coverage detected