Thank you for reviewing. I have updated the patch.
http://codereview.chromium.org/567011/diff/1/3 File src/runtime.cc (right): http://codereview.chromium.org/567011/diff/1/3#newcode4666 src/runtime.cc:4666: return Heap::NumberFromDouble(integer - (integer - x > 0.5)); On 2010/02/02 08:52:29, Lasse Reichstein wrote:
Apart from the implicit conversion from boolean to 0/1, this seems
fine. I'll
add a conditional expression (.. ? 1 : 0).
I changed it to ?:. http://codereview.chromium.org/567011/diff/1/2 File test/mjsunit/math-round.js (right): http://codereview.chromium.org/567011/diff/1/2#newcode39 test/mjsunit/math-round.js:39: assertEquals(0, Math.round(-0.5)); On 2010/02/02 08:52:29, Lasse Reichstein wrote:
Should actually be equal to -0, but our assertEquals doesn't
distinguish 0 and
-0 (the usual way of testing (x == -0) is (1/x == -Infinity)).
Done. http://codereview.chromium.org/567011 -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev