Fixed double-as-integer check not handling negative zero (bug 452170, r=gal).

This commit is contained in:
David Anderson 2008-08-29 15:37:37 -07:00
parent a2fdc866ff
commit f720beb914

View File

@ -295,7 +295,7 @@ static bool isPromoteInt(LIns* i)
{
jsdouble d;
return i->isop(LIR_i2f) || i->isconst() ||
(i->isconstq() && ((d = i->constvalf()) == (jsdouble)(jsint)d));
(i->isconstq() && ((d = i->constvalf()) == (jsdouble)(jsint)d) && !JSDOUBLE_IS_NEGZERO(d));
}
static bool isPromoteUint(LIns* i)