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

Unified Diff: src/runtime.js

Issue 1151503002: [destructuring] Implement spread binding patterns. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments addressed Created 5 years, 7 months 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
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index ab79a4bbde0853ee3f39b68c2cf8518fb8f8f975..a2ce3306a05b1d296abb691d2bd29ca43ae8b643 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -930,6 +930,14 @@ function SameValueZero(x, y) {
return x === y;
}
+function ConcatIterableToArray(target, iterable) {
+ var index = target.length;
+ for (var element of iterable) {
+ %AddElement(target, index++, element, NONE);
+ }
+ return target;
+}
+
/* ---------------------------------
- - - U t i l i t i e s - - -
@@ -1008,6 +1016,7 @@ function ToPositiveInteger(x, rangeErrorIndex) {
//----------------------------------------------------------------------------
+$concatIterableToArray = ConcatIterableToArray;
$defaultNumber = DefaultNumber;
$defaultString = DefaultString;
$NaN = %GetRootNaN();
« src/pattern-rewriter.cc ('K') | « src/preparser.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698