Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: src/runtime.js

Issue 771483002: Implement ES6 @@isConcatSpreadable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename IterateExternalArrayElements, add tests which hit Fixed<Type>Array cases Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/harmony-array.js ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index c9cf825038a95ab642808b5ea027553e3b514b35..ab16aafbbf642553f62118dd1179e2db5514a8d6 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -617,6 +617,15 @@ function IsPrimitive(x) {
}
+// ES6, draft 10-14-14, section 22.1.3.1.1
+function IsConcatSpreadable(O) {
+ if (!IS_SPEC_OBJECT(O)) return false;
+ var spreadable = O[symbolIsConcatSpreadable];
+ if (IS_UNDEFINED(spreadable)) return IS_ARRAY(O);
+ return ToBoolean(spreadable);
+}
+
+
// ECMA-262, section 8.6.2.6, page 28.
function DefaultNumber(x) {
if (!IS_SYMBOL_WRAPPER(x)) {
« no previous file with comments | « src/harmony-array.js ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698