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

Function luaK_goiftrue

lua/lcode.c:546–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544
545
546void luaK_goiftrue (FuncState *fs, expdesc *e) {
547 int pc; /* pc of last jump */
548 luaK_dischargevars(fs, e);
549 switch (e->k) {
550 case VK: case VKNUM: case VTRUE: {
551 pc = NO_JUMP; /* always true; do nothing */
552 break;
553 }
554 case VFALSE: {
555 pc = luaK_jump(fs); /* always jump */
556 break;
557 }
558 case VJMP: {
559 invertjump(fs, e);
560 pc = e->u.s.info;
561 break;
562 }
563 default: {
564 pc = jumponcond(fs, e, 0);
565 break;
566 }
567 }
568 luaK_concat(fs, &e->f, pc); /* insert last jump in `f' list */
569 luaK_patchtohere(fs, e->t);
570 e->t = NO_JUMP;
571}
572
573
574static void luaK_goiffalse (FuncState *fs, expdesc *e) {

Callers 2

condFunction · 0.85
luaK_infixFunction · 0.85

Calls 6

luaK_dischargevarsFunction · 0.85
luaK_jumpFunction · 0.85
invertjumpFunction · 0.85
jumponcondFunction · 0.85
luaK_concatFunction · 0.85
luaK_patchtohereFunction · 0.85

Tested by

no test coverage detected