| 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 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 Visit(node->expression()); | 83 Visit(node->expression()); |
| 84 } | 84 } |
| 85 | 85 |
| 86 | 86 |
| 87 void AstLiteralReindexer::VisitReturnStatement(ReturnStatement* node) { | 87 void AstLiteralReindexer::VisitReturnStatement(ReturnStatement* node) { |
| 88 Visit(node->expression()); | 88 Visit(node->expression()); |
| 89 } | 89 } |
| 90 | 90 |
| 91 | 91 |
| 92 void AstLiteralReindexer::VisitYield(Yield* node) { | 92 void AstLiteralReindexer::VisitYield(Yield* node) { |
| 93 Visit(node->generator_object()); | |
| 94 Visit(node->expression()); | 93 Visit(node->expression()); |
| 95 } | 94 } |
| 96 | 95 |
| 97 | 96 |
| 98 void AstLiteralReindexer::VisitThrow(Throw* node) { Visit(node->exception()); } | 97 void AstLiteralReindexer::VisitThrow(Throw* node) { Visit(node->exception()); } |
| 99 | 98 |
| 100 | 99 |
| 101 void AstLiteralReindexer::VisitUnaryOperation(UnaryOperation* node) { | 100 void AstLiteralReindexer::VisitUnaryOperation(UnaryOperation* node) { |
| 102 Visit(node->expression()); | 101 Visit(node->expression()); |
| 103 } | 102 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 Visit(node->expression()); | 183 Visit(node->expression()); |
| 185 } | 184 } |
| 186 | 185 |
| 187 | 186 |
| 188 void AstLiteralReindexer::VisitEmptyParentheses(EmptyParentheses* node) {} | 187 void AstLiteralReindexer::VisitEmptyParentheses(EmptyParentheses* node) {} |
| 189 | 188 |
| 190 void AstLiteralReindexer::VisitGetIterator(GetIterator* node) { | 189 void AstLiteralReindexer::VisitGetIterator(GetIterator* node) { |
| 191 Visit(node->iterable()); | 190 Visit(node->iterable()); |
| 192 } | 191 } |
| 193 | 192 |
| 193 void AstLiteralReindexer::VisitInternalVariable(InternalVariable* node) {} |
| 194 |
| 194 void AstLiteralReindexer::VisitForInStatement(ForInStatement* node) { | 195 void AstLiteralReindexer::VisitForInStatement(ForInStatement* node) { |
| 195 Visit(node->each()); | 196 Visit(node->each()); |
| 196 Visit(node->enumerable()); | 197 Visit(node->enumerable()); |
| 197 Visit(node->body()); | 198 Visit(node->body()); |
| 198 } | 199 } |
| 199 | 200 |
| 200 | 201 |
| 201 void AstLiteralReindexer::VisitForOfStatement(ForOfStatement* node) { | 202 void AstLiteralReindexer::VisitForOfStatement(ForOfStatement* node) { |
| 202 Visit(node->assign_iterator()); | 203 Visit(node->assign_iterator()); |
| 203 Visit(node->next_result()); | 204 Visit(node->next_result()); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } | 314 } |
| 314 | 315 |
| 315 | 316 |
| 316 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { | 317 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { |
| 317 // We don't recurse into the declarations or body of the function literal: | 318 // We don't recurse into the declarations or body of the function literal: |
| 318 } | 319 } |
| 319 | 320 |
| 320 void AstLiteralReindexer::Reindex(Expression* pattern) { Visit(pattern); } | 321 void AstLiteralReindexer::Reindex(Expression* pattern) { Visit(pattern); } |
| 321 } // namespace internal | 322 } // namespace internal |
| 322 } // namespace v8 | 323 } // namespace v8 |
| OLD | NEW |