MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaK_dischargevars

Function luaK_dischargevars

Source/Misc/lua/src/lua.c:3973–4003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 9

discharge2regFunction · 0.85
luaK_exp2nextregFunction · 0.85
luaK_exp2anyregFunction · 0.85
luaK_exp2valFunction · 0.85
luaK_goiftrueFunction · 0.85
luaK_goiffalseFunction · 0.85
codenotFunction · 0.85
luaK_posfixFunction · 0.85
prefixexpFunction · 0.85

Calls 4

luaK_codeABCFunction · 0.85
luaK_codeABxFunction · 0.85
freeregFunction · 0.85
luaK_setoneretFunction · 0.85

Tested by

no test coverage detected