R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/
504343005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23440
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
x = TO_NUMBER_INLINE(x);
if (x > 0) return 1;
if (x < 0) return -1;
- if (x === 0) return x;
- return NAN;
+ // -0, 0 or NaN.
+ return x;
}
// ES6 draft 09-27-13, section 20.2.2.34.
x = TO_NUMBER_INLINE(x);
if (x > 0) return MathFloor(x);
if (x < 0) return MathCeil(x);
- if (x === 0) return x;
- return NAN;
+ // -0, 0 or NaN.
+ return x;
}
// ES6 draft 09-27-13, section 20.2.2.30.