MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaK_goiftrue

Function luaK_goiftrue

ThirdParty/lua/lua/lcode.c:654–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652
653
654void luaK_goiftrue (FuncState *fs, expdesc *e) {
655 int pc; /* pc of last jump */
656 luaK_dischargevars(fs, e);
657 switch (e->k) {
658 case VJMP: {
659 invertjump(fs, e);
660 pc = e->u.info;
661 break;
662 }
663 case VK: case VKFLT: case VKINT: case VTRUE: {
664 pc = NO_JUMP; /* always true; do nothing */
665 break;
666 }
667 default: {
668 pc = jumponcond(fs, e, 0);
669 break;
670 }
671 }
672 luaK_concat(fs, &e->f, pc); /* insert last jump in 'f' list */
673 luaK_patchtohere(fs, e->t);
674 e->t = NO_JUMP;
675}
676
677
678void luaK_goiffalse (FuncState *fs, expdesc *e) {

Callers 3

condFunction · 0.85
test_then_blockFunction · 0.85
luaK_infixFunction · 0.85

Calls 5

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

Tested by 1

test_then_blockFunction · 0.68