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

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

Issue 1581403007: Fix re-indexing for literals in do-expressions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix the regression test, focus on spreads 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-expression-visitor.cc ('k') | test/mjsunit/harmony/regress/regress-crbug-578038.js » ('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 26 matching lines...) Expand all
37 37
38 38
39 void AstLiteralReindexer::VisitDebuggerStatement(DebuggerStatement* node) {} 39 void AstLiteralReindexer::VisitDebuggerStatement(DebuggerStatement* node) {}
40 40
41 41
42 void AstLiteralReindexer::VisitNativeFunctionLiteral( 42 void AstLiteralReindexer::VisitNativeFunctionLiteral(
43 NativeFunctionLiteral* node) {} 43 NativeFunctionLiteral* node) {}
44 44
45 45
46 void AstLiteralReindexer::VisitDoExpression(DoExpression* node) { 46 void AstLiteralReindexer::VisitDoExpression(DoExpression* node) {
47 // TODO(caitp): literals in do expressions need re-indexing too. 47 Visit(node->block());
48 Visit(node->result());
48 } 49 }
49 50
50 51
51 void AstLiteralReindexer::VisitLiteral(Literal* node) {} 52 void AstLiteralReindexer::VisitLiteral(Literal* node) {}
52 53
53 54
54 void AstLiteralReindexer::VisitRegExpLiteral(RegExpLiteral* node) { 55 void AstLiteralReindexer::VisitRegExpLiteral(RegExpLiteral* node) {
55 UpdateIndex(node); 56 UpdateIndex(node);
56 } 57 }
57 58
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { 323 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) {
323 // We don't recurse into the declarations or body of the function literal: 324 // We don't recurse into the declarations or body of the function literal:
324 } 325 }
325 326
326 327
327 void AstLiteralReindexer::Reindex(Expression* pattern) { 328 void AstLiteralReindexer::Reindex(Expression* pattern) {
328 pattern->Accept(this); 329 pattern->Accept(this);
329 } 330 }
330 } // namespace internal 331 } // namespace internal
331 } // namespace v8 332 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-expression-visitor.cc ('k') | test/mjsunit/harmony/regress/regress-crbug-578038.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698