MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaK_goiftrue

Function luaK_goiftrue

third-party/lua-5.2.4/src/lcode.c:621–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619
620
621void luaK_goiftrue (FuncState *fs, expdesc *e) {
622 int pc; /* pc of last jump */
623 luaK_dischargevars(fs, e);
624 switch (e->k) {
625 case VJMP: {
626 invertjump(fs, e);
627 pc = e->u.info;
628 break;
629 }
630 case VK: case VKNUM: case VTRUE: {
631 pc = NO_JUMP; /* always true; do nothing */
632 break;
633 }
634 default: {
635 pc = jumponcond(fs, e, 0);
636 break;
637 }
638 }
639 luaK_concat(fs, &e->f, pc); /* insert last jump in `f' list */
640 luaK_patchtohere(fs, e->t);
641 e->t = NO_JUMP;
642}
643
644
645void luaK_goiffalse (FuncState *fs, expdesc *e) {

Callers 3

condFunction · 0.70
test_then_blockFunction · 0.70
luaK_infixFunction · 0.70

Calls 5

luaK_dischargevarsFunction · 0.70
invertjumpFunction · 0.70
jumponcondFunction · 0.70
luaK_concatFunction · 0.70
luaK_patchtohereFunction · 0.70

Tested by 1

test_then_blockFunction · 0.56