Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index d9e1fe5c994030f40461167faac8b3df4d60ff22..d49b6d267dd2c93d69daaca86caa07282b268bf6 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -465,6 +465,16 @@ function TO_STRING() { |
} |
+// ES6, draft 07-18-14, section 7.1.15 |
+function TO_LENGTH(arg) { |
rossberg
2014/09/10 07:23:55
This should be ToLength, and move to the next sect
caitp (gmail)
2014/09/10 14:26:05
As you saw, this was moved into a separate CL so t
|
+ arg = ToInteger(arg); |
+ if (arg < +0) { |
rossberg
2014/09/10 07:23:55
Nit: The + is redundant (and may potentially be mo
caitp (gmail)
2014/09/10 14:26:04
Removed in crrev.com/552273002
|
+ return 0; |
+ } |
+ return arg < $Number.MAX_SAFE_INTEGER ? arg : $Number.MAX_SAFE_INTEGER; |
+} |
+ |
+ |
/* ------------------------------------- |
- - - C o n v e r s i o n s - - - |
------------------------------------- |