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

Function jumponcond

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

Source from the content-addressed store, hash-verified

604
605
606static int jumponcond (FuncState *fs, expdesc *e, int cond) {
607 if (e->k == VRELOCABLE) {
608 Instruction ie = getcode(fs, e);
609 if (GET_OPCODE(ie) == OP_NOT) {
610 fs->pc--; /* remove previous OP_NOT */
611 return condjump(fs, OP_TEST, GETARG_B(ie), 0, !cond);
612 }
613 /* else go through */
614 }
615 discharge2anyreg(fs, e);
616 freeexp(fs, e);
617 return condjump(fs, OP_TESTSET, NO_REG, e->u.info, cond);
618}
619
620
621void luaK_goiftrue (FuncState *fs, expdesc *e) {

Callers 2

luaK_goiftrueFunction · 0.70
luaK_goiffalseFunction · 0.70

Calls 3

condjumpFunction · 0.70
discharge2anyregFunction · 0.70
freeexpFunction · 0.70

Tested by

no test coverage detected