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

Function jumponcond

deps/lua/src/lcode.c:524–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522
523
524static int jumponcond (FuncState *fs, expdesc *e, int cond) {
525 if (e->k == VRELOCABLE) {
526 Instruction ie = getcode(fs, e);
527 if (GET_OPCODE(ie) == OP_NOT) {
528 fs->pc--; /* remove previous OP_NOT */
529 return condjump(fs, OP_TEST, GETARG_B(ie), 0, !cond);
530 }
531 /* else go through */
532 }
533 discharge2anyreg(fs, e);
534 freeexp(fs, e);
535 return condjump(fs, OP_TESTSET, NO_REG, e->u.s.info, cond);
536}
537
538
539void 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