mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-14 18:10:30 +00:00
Fix discharge order of comparisons in Lua parser.
This commit is contained in:
parent
fb101458c5
commit
f22d5d9eef
@ -848,6 +848,7 @@ static void bcemit_comp(FuncState *fs, BinOpr opr, ExpDesc *e1, ExpDesc *e2)
|
|||||||
if ((op-BC_ISLT) & 1) { /* GT -> LT, GE -> LE */
|
if ((op-BC_ISLT) & 1) { /* GT -> LT, GE -> LE */
|
||||||
e1 = e2; e2 = eret; /* Swap operands. */
|
e1 = e2; e2 = eret; /* Swap operands. */
|
||||||
op = ((op-BC_ISLT)^3)+BC_ISLT;
|
op = ((op-BC_ISLT)^3)+BC_ISLT;
|
||||||
|
expr_toval(fs, e1);
|
||||||
}
|
}
|
||||||
rd = expr_toanyreg(fs, e2);
|
rd = expr_toanyreg(fs, e2);
|
||||||
ra = expr_toanyreg(fs, e1);
|
ra = expr_toanyreg(fs, e1);
|
||||||
|
Loading…
Reference in New Issue
Block a user