diff options
| author | Mike Pall <mike> | 2009-12-08 19:52:28 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2009-12-08 19:52:28 +0100 |
| commit | 5287b9326479ea2b7dddd6f642673e58e5a7f354 (patch) | |
| tree | f6f9fe375652f6cfc607d8c5f022ccbaff857c4d /src/lj_parse.c | |
| parent | 2d0ef4522bebcc380e9aaf21b9bebcb62fcfc4fe (diff) | |
| download | luajit-2.0.0-beta2-hotfix2.tar.gz luajit-2.0.0-beta2-hotfix2.tar.bz2 luajit-2.0.0-beta2-hotfix2.zip | |
LuaJIT-2.0.0-beta2 hotfix #2v2.0.0-beta2-hotfix2
Fix lua_tocfunction().
Fix cutoff register in JMP bytecode for some conditional expressions.
Fix PHI marking algorithm for references from variant slots.
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) |
