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

Function jumponcond

lua/lcode.c:531–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529
530
531static int jumponcond (FuncState *fs, expdesc *e, int cond) {
532 if (e->k == VRELOCABLE) {
533 Instruction ie = getcode(fs, e);
534 if (GET_OPCODE(ie) == OP_NOT) {
535 fs->pc--; /* remove previous OP_NOT */
536 return condjump(fs, OP_TEST, GETARG_B(ie), 0, !cond);
537 }
538 /* else go through */
539 }
540 discharge2anyreg(fs, e);
541 freeexp(fs, e);
542 return condjump(fs, OP_TESTSET, NO_REG, e->u.s.info, cond);
543}
544
545
546void luaK_goiftrue (FuncState *fs, expdesc *e) {

Callers 2

luaK_goiftrueFunction · 0.85
luaK_goiffalseFunction · 0.85

Calls 3

condjumpFunction · 0.85
discharge2anyregFunction · 0.85
freeexpFunction · 0.85

Tested by

no test coverage detected