diff options
Diffstat (limited to 'src/lj_parse.c')
-rw-r--r-- | src/lj_parse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_parse.c b/src/lj_parse.c index 663525ab..000772fe 100644 --- a/src/lj_parse.c +++ b/src/lj_parse.c | |||
@@ -636,6 +636,7 @@ static void invertjump(FuncState *fs, ExpDesc *e) | |||
636 | 636 | ||
637 | static BCPos jumponcond(FuncState *fs, ExpDesc *e, int cond) | 637 | static BCPos jumponcond(FuncState *fs, ExpDesc *e, int cond) |
638 | { | 638 | { |
639 | BCPos pc; | ||
639 | if (e->k == VRELOCABLE) { | 640 | if (e->k == VRELOCABLE) { |
640 | BCIns *i = bcptr(fs, e); | 641 | BCIns *i = bcptr(fs, e); |
641 | if (bc_op(*i) == BC_NOT) { | 642 | if (bc_op(*i) == BC_NOT) { |
@@ -648,9 +649,10 @@ static BCPos jumponcond(FuncState *fs, ExpDesc *e, int cond) | |||
648 | reserveregs(fs, 1); | 649 | reserveregs(fs, 1); |
649 | discharge2reg(fs, e, fs->freereg-1); | 650 | discharge2reg(fs, e, fs->freereg-1); |
650 | } | 651 | } |
651 | freeexp(fs, e); | ||
652 | emitAD(fs, cond ? BC_ISTC : BC_ISFC, NO_REG, e->u.s.info); | 652 | emitAD(fs, cond ? BC_ISTC : BC_ISFC, NO_REG, e->u.s.info); |
653 | return emit_jump(fs); | 653 | pc = emit_jump(fs); |
654 | freeexp(fs, e); | ||
655 | return pc; | ||
654 | } | 656 | } |
655 | 657 | ||
656 | static void goiftrue(FuncState *fs, ExpDesc *e) | 658 | static void goiftrue(FuncState *fs, ExpDesc *e) |