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

Side by Side Diff: src/ast/ast-literal-reindexer.cc

Issue 1592713002: Clean up dead code after spread desugaring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/ast-numbering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast/ast-literal-reindexer.h" 5 #include "src/ast/ast-literal-reindexer.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 181
182 182
183 void AstLiteralReindexer::VisitCompareOperation(CompareOperation* node) { 183 void AstLiteralReindexer::VisitCompareOperation(CompareOperation* node) {
184 Visit(node->left()); 184 Visit(node->left());
185 Visit(node->right()); 185 Visit(node->right());
186 } 186 }
187 187
188 188
189 void AstLiteralReindexer::VisitSpread(Spread* node) { 189 void AstLiteralReindexer::VisitSpread(Spread* node) {
190 #if 0
191 // This is reachable because ParserBase::ParseArrowFunctionLiteral calls
192 // ReindexLiterals before calling RewriteDestructuringAssignments.
193 // Breaking test case: var f = ([...a]) => {}
194 // TODO(rossberg): Add a proper TODO here as to what needs to be done.
195 UNREACHABLE();
196 #else
nickie 2016/01/18 11:34:45 Andreas, does this stay?
nickie 2016/01/18 14:25:39 We decided the first two lines of the comment stay
190 Visit(node->expression()); 197 Visit(node->expression());
198 #endif
191 } 199 }
192 200
193 201
194 void AstLiteralReindexer::VisitEmptyParentheses(EmptyParentheses* node) {} 202 void AstLiteralReindexer::VisitEmptyParentheses(EmptyParentheses* node) {}
195 203
196 204
197 void AstLiteralReindexer::VisitForInStatement(ForInStatement* node) { 205 void AstLiteralReindexer::VisitForInStatement(ForInStatement* node) {
198 Visit(node->each()); 206 Visit(node->each());
199 Visit(node->enumerable()); 207 Visit(node->enumerable());
200 Visit(node->body()); 208 Visit(node->body());
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { 330 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) {
323 // We don't recurse into the declarations or body of the function literal: 331 // We don't recurse into the declarations or body of the function literal:
324 } 332 }
325 333
326 334
327 void AstLiteralReindexer::Reindex(Expression* pattern) { 335 void AstLiteralReindexer::Reindex(Expression* pattern) {
328 pattern->Accept(this); 336 pattern->Accept(this);
329 } 337 }
330 } // namespace internal 338 } // namespace internal
331 } // namespace v8 339 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698