| 522 | |
| 523 | |
| 524 | static 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 | |
| 539 | void luaK_goiftrue (FuncState *fs, expdesc *e) { |
no test coverage detected