MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaK_dischargevars

Function luaK_dischargevars

lua/lcode.c:311–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309
310
311void 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
344static int code_label (FuncState *fs, int A, int b, int jump) {

Callers 9

prefixexpFunction · 0.85
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

Calls 4

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

Tested by

no test coverage detected