LuaJIT-2.0.0-beta2 hotfix #2

Fix lua_tocfunction().
Fix cutoff register in JMP bytecode for some conditional expressions.
Fix PHI marking algorithm for references from variant slots.
This commit is contained in:
Mike Pall
2009-12-08 19:52:28 +01:00
parent 2d0ef4522b
commit 5287b93264
3 changed files with 20 additions and 11 deletions

View File

@@ -636,6 +636,7 @@ static void invertjump(FuncState *fs, ExpDesc *e)
static BCPos jumponcond(FuncState *fs, ExpDesc *e, int cond)
{
BCPos pc;
if (e->k == VRELOCABLE) {
BCIns *i = bcptr(fs, e);
if (bc_op(*i) == BC_NOT) {
@@ -648,9 +649,10 @@ static BCPos jumponcond(FuncState *fs, ExpDesc *e, int cond)
reserveregs(fs, 1);
discharge2reg(fs, e, fs->freereg-1);
}
freeexp(fs, e);
emitAD(fs, cond ? BC_ISTC : BC_ISFC, NO_REG, e->u.s.info);
return emit_jump(fs);
pc = emit_jump(fs);
freeexp(fs, e);
return pc;
}
static void goiftrue(FuncState *fs, ExpDesc *e)