BUG=
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/
552273002
Patch from Caitlin Potter <caitpotter88@gmail.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24036
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
+// ES6, draft 08-24-14, section 7.1.15
+function ToLength(arg) {
+ arg = ToInteger(arg);
+ if (arg < 0) return 0;
+ return arg < $Number.MAX_SAFE_INTEGER ? arg : $Number.MAX_SAFE_INTEGER;
+}
+
+
// ECMA-262, section 9.6, page 34.
function ToUint32(x) {
if (%_IsSmi(x) && x >= 0) return x;