| 3971 | |
| 3972 | |
| 3973 | void luaK_dischargevars (FuncState *fs, expdesc *e) { |
| 3974 | switch (e->k) { |
| 3975 | case VLOCAL: { |
| 3976 | e->k = VNONRELOC; |
| 3977 | break; |
| 3978 | } |
| 3979 | case VUPVAL: { |
| 3980 | e->u.s.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.s.info, 0); |
| 3981 | e->k = VRELOCABLE; |
| 3982 | break; |
| 3983 | } |
| 3984 | case VGLOBAL: { |
| 3985 | e->u.s.info = luaK_codeABx(fs, OP_GETGLOBAL, 0, e->u.s.info); |
| 3986 | e->k = VRELOCABLE; |
| 3987 | break; |
| 3988 | } |
| 3989 | case VINDEXED: { |
| 3990 | freereg(fs, e->u.s.aux); |
| 3991 | freereg(fs, e->u.s.info); |
| 3992 | e->u.s.info = luaK_codeABC(fs, OP_GETTABLE, 0, e->u.s.info, e->u.s.aux); |
| 3993 | e->k = VRELOCABLE; |
| 3994 | break; |
| 3995 | } |
| 3996 | case VVARARG: |
| 3997 | case VCALL: { |
| 3998 | luaK_setoneret(fs, e); |
| 3999 | break; |
| 4000 | } |
| 4001 | default: break; /* there is one value available (somewhere) */ |
| 4002 | } |
| 4003 | } |
| 4004 | |
| 4005 | |
| 4006 | static int code_label (FuncState *fs, int A, int b, int jump) { |
no test coverage detected