After thinking about Bill's comment, I realized there is a bug in change r2367 where the fast Smi test was originally introduced. While it is necessary that a value needs to be non-Smi in order to be -0, it is not sufficient because you can have a non-Smi positive zero. Consider: > var x = .3 > 1/Math.max(x-x, -0) -Infinity //Bug! > 1/Math.max(-0, x-x) Infinity
I have fixed this bug by putting the 1/x<0 test back in, and updated the tests to cover this case. http://codereview.chromium.org/470001 -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
