MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaK_goiffalse

Function luaK_goiffalse

Source/Misc/lua/src/lua.c:4236–4260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4234
4235
4236static void luaK_goiffalse (FuncState *fs, expdesc *e) {
4237int pc; /* pc of last jump */
4238luaK_dischargevars(fs, e);
4239switch (e->k) {
4240case VNIL: case VFALSE: {
4241pc = NO_JUMP; /* always false; do nothing */
4242break;
4243}
4244case VTRUE: {
4245pc = luaK_jump(fs); /* always jump */
4246break;
4247}
4248case VJMP: {
4249pc = e->u.s.info;
4250break;
4251}
4252default: {
4253pc = jumponcond(fs, e, 1);
4254break;
4255}
4256}
4257luaK_concat(fs, &e->t, pc); /* insert last jump in `t' list */
4258luaK_patchtohere(fs, e->f);
4259e->f = NO_JUMP;
4260}
4261
4262
4263static void codenot (FuncState *fs, expdesc *e) {

Callers 1

luaK_infixFunction · 0.85

Calls 5

luaK_dischargevarsFunction · 0.85
luaK_jumpFunction · 0.85
jumponcondFunction · 0.85
luaK_concatFunction · 0.85
luaK_patchtohereFunction · 0.85

Tested by

no test coverage detected