OLD | NEW |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 179 |
180 void AstLiteralReindexer::VisitSpread(Spread* node) { | 180 void AstLiteralReindexer::VisitSpread(Spread* node) { |
181 // This is reachable because ParserBase::ParseArrowFunctionLiteral calls | 181 // This is reachable because ParserBase::ParseArrowFunctionLiteral calls |
182 // ReindexLiterals before calling RewriteDestructuringAssignments. | 182 // ReindexLiterals before calling RewriteDestructuringAssignments. |
183 Visit(node->expression()); | 183 Visit(node->expression()); |
184 } | 184 } |
185 | 185 |
186 | 186 |
187 void AstLiteralReindexer::VisitEmptyParentheses(EmptyParentheses* node) {} | 187 void AstLiteralReindexer::VisitEmptyParentheses(EmptyParentheses* node) {} |
188 | 188 |
| 189 void AstLiteralReindexer::VisitGetIterator(GetIterator* node) { |
| 190 Visit(node->iterable()); |
| 191 } |
189 | 192 |
190 void AstLiteralReindexer::VisitForInStatement(ForInStatement* node) { | 193 void AstLiteralReindexer::VisitForInStatement(ForInStatement* node) { |
191 Visit(node->each()); | 194 Visit(node->each()); |
192 Visit(node->enumerable()); | 195 Visit(node->enumerable()); |
193 Visit(node->body()); | 196 Visit(node->body()); |
194 } | 197 } |
195 | 198 |
196 | 199 |
197 void AstLiteralReindexer::VisitForOfStatement(ForOfStatement* node) { | 200 void AstLiteralReindexer::VisitForOfStatement(ForOfStatement* node) { |
198 Visit(node->assign_iterator()); | 201 Visit(node->assign_iterator()); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 } | 312 } |
310 | 313 |
311 | 314 |
312 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { | 315 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { |
313 // We don't recurse into the declarations or body of the function literal: | 316 // We don't recurse into the declarations or body of the function literal: |
314 } | 317 } |
315 | 318 |
316 void AstLiteralReindexer::Reindex(Expression* pattern) { Visit(pattern); } | 319 void AstLiteralReindexer::Reindex(Expression* pattern) { Visit(pattern); } |
317 } // namespace internal | 320 } // namespace internal |
318 } // namespace v8 | 321 } // namespace v8 |
OLD | NEW |