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