| 309 | |
| 310 | |
| 311 | void luaK_dischargevars (FuncState *fs, expdesc *e) { |
| 312 | switch (e->k) { |
| 313 | case VLOCAL: { |
| 314 | e->k = VNONRELOC; |
| 315 | break; |
| 316 | } |
| 317 | case VUPVAL: { |
| 318 | e->u.s.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.s.info, 0); |
| 319 | e->k = VRELOCABLE; |
| 320 | break; |
| 321 | } |
| 322 | case VGLOBAL: { |
| 323 | e->u.s.info = luaK_codeABx(fs, OP_GETGLOBAL, 0, e->u.s.info); |
| 324 | e->k = VRELOCABLE; |
| 325 | break; |
| 326 | } |
| 327 | case VINDEXED: { |
| 328 | freereg(fs, e->u.s.aux); |
| 329 | freereg(fs, e->u.s.info); |
| 330 | e->u.s.info = luaK_codeABC(fs, OP_GETTABLE, 0, e->u.s.info, e->u.s.aux); |
| 331 | e->k = VRELOCABLE; |
| 332 | break; |
| 333 | } |
| 334 | case VVARARG: |
| 335 | case VCALL: { |
| 336 | luaK_setoneret(fs, e); |
| 337 | break; |
| 338 | } |
| 339 | default: break; /* there is one value available (somewhere) */ |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | |
| 344 | static int code_label (FuncState *fs, int A, int b, int jump) { |
no test coverage detected