mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
IFEQ and IFNE are identical for us. We just expect the same boolean on the stack and side exit if not.
This commit is contained in:
parent
ca4e6419ee
commit
4e34cfc559
@ -1198,23 +1198,14 @@ LIns* TraceRecorder::f2i(LIns* f)
|
||||
return lir->insCall(F_doubleToInt32, &f);
|
||||
}
|
||||
|
||||
bool TraceRecorder::ifop(bool sense)
|
||||
bool TraceRecorder::ifop()
|
||||
{
|
||||
jsval& v = stackval(-1);
|
||||
LIns* cond_ins;
|
||||
bool cond;
|
||||
if (JSVAL_IS_BOOLEAN(v)) {
|
||||
cond_ins = lir->ins_eq0(get(&v));
|
||||
cond = JSVAL_TO_BOOLEAN(v);
|
||||
guard(!JSVAL_TO_BOOLEAN(v), lir->ins_eq0(get(&v)));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sense) {
|
||||
cond = !cond;
|
||||
cond_ins = lir->ins_eq0(cond_ins);
|
||||
}
|
||||
guard(cond, cond_ins);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1573,11 +1564,11 @@ bool TraceRecorder::JSOP_GOTO()
|
||||
}
|
||||
bool TraceRecorder::JSOP_IFEQ()
|
||||
{
|
||||
return ifop(true);
|
||||
return ifop();
|
||||
}
|
||||
bool TraceRecorder::JSOP_IFNE()
|
||||
{
|
||||
return ifop(false);
|
||||
return ifop();
|
||||
}
|
||||
bool TraceRecorder::JSOP_ARGUMENTS()
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ class TraceRecorder {
|
||||
|
||||
nanojit::LIns* f2i(nanojit::LIns* f);
|
||||
|
||||
bool ifop(bool sense);
|
||||
bool ifop();
|
||||
bool inc(jsval& v, jsint incr, bool pre = true);
|
||||
bool cmp(nanojit::LOpcode op, bool negate = false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user