MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaK_goiftrue

Function luaK_goiftrue

src/Chain/libraries/glua/lcode.cpp:655–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

luaK_infixFunction · 0.85
condFunction · 0.85
test_then_blockFunction · 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