Bug 888613 - Micro-optimization of js::ToInteger. r=jwalden

--HG--
extra : rebase_source : 3e5774bec875860659b500ae9ab87c404f213c47
This commit is contained in:
Till Schneidereit 2013-07-02 00:48:18 +02:00
parent 70a0130389
commit 7e9b9262b5

View File

@ -292,9 +292,7 @@ ToInteger(double d)
return d;
}
bool neg = (d < 0);
d = floor(neg ? -d : d);
return neg ? -d : d;
return d < 0 ? ceil(d) : floor(d);
}
} /* namespace js */