MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaK_goiftrue

Function luaK_goiftrue

deps/lua/src/lcode.c:539–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537
538
539void luaK_goiftrue (FuncState *fs, expdesc *e) {
540 int pc; /* pc of last jump */
541 luaK_dischargevars(fs, e);
542 switch (e->k) {
543 case VK: case VKNUM: case VTRUE: {
544 pc = NO_JUMP; /* always true; do nothing */
545 break;
546 }
547 case VJMP: {
548 invertjump(fs, e);
549 pc = e->u.s.info;
550 break;
551 }
552 default: {
553 pc = jumponcond(fs, e, 0);
554 break;
555 }
556 }
557 luaK_concat(fs, &e->f, pc); /* insert last jump in `f' list */
558 luaK_patchtohere(fs, e->t);
559 e->t = NO_JUMP;
560}
561
562
563static void luaK_goiffalse (FuncState *fs, expdesc *e) {

Callers 2

condFunction · 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

no test coverage detected