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

Unified Diff: src/parsing/pattern-rewriter.cc

Issue 1704533002: Support rest element pattern with user-defined iterable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/js/runtime.js ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/pattern-rewriter.cc
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc
index 6e20282785d0ba3495b2b4b723f69cb6e861bfd6..5f6086896a1999fb2007ab8e078f9ae9b4e3f1e2 100644
--- a/src/parsing/pattern-rewriter.cc
+++ b/src/parsing/pattern-rewriter.cc
@@ -482,7 +482,7 @@ void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node,
if (spread != nullptr) {
// array = [];
- // if (!done) %concat_iterable_to_array(array, iterator);
+ // if (!done) %concat_iterator_to_array(array, iterator);
auto empty_exprs = new (zone()) ZoneList<Expression*>(0, zone());
auto array = CreateTempVar(factory()->NewArrayLiteral(
empty_exprs,
@@ -495,7 +495,7 @@ void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node,
arguments->Add(factory()->NewVariableProxy(array), zone());
arguments->Add(factory()->NewVariableProxy(iterator), zone());
auto spread_into_array_call =
- factory()->NewCallRuntime(Context::CONCAT_ITERABLE_TO_ARRAY_INDEX,
+ factory()->NewCallRuntime(Context::CONCAT_ITERATOR_TO_ARRAY_INDEX,
arguments, RelocInfo::kNoPosition);
auto if_statement = factory()->NewIfStatement(
« no previous file with comments | « src/js/runtime.js ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698