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.h" | 5 #include "src/ast/ast.h" |
6 #include "src/ast/ast-expression-rewriter.h" | 6 #include "src/ast/ast-expression-rewriter.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 | 163 |
164 void AstExpressionRewriter::VisitForInStatement(ForInStatement* node) { | 164 void AstExpressionRewriter::VisitForInStatement(ForInStatement* node) { |
165 AST_REWRITE_PROPERTY(Expression, node, each); | 165 AST_REWRITE_PROPERTY(Expression, node, each); |
166 AST_REWRITE_PROPERTY(Expression, node, subject); | 166 AST_REWRITE_PROPERTY(Expression, node, subject); |
167 AST_REWRITE_PROPERTY(Statement, node, body); | 167 AST_REWRITE_PROPERTY(Statement, node, body); |
168 } | 168 } |
169 | 169 |
170 | 170 |
171 void AstExpressionRewriter::VisitForOfStatement(ForOfStatement* node) { | 171 void AstExpressionRewriter::VisitForOfStatement(ForOfStatement* node) { |
172 AST_REWRITE_PROPERTY(Expression, node, each); | |
173 AST_REWRITE_PROPERTY(Expression, node, assign_iterator); | 172 AST_REWRITE_PROPERTY(Expression, node, assign_iterator); |
174 AST_REWRITE_PROPERTY(Expression, node, next_result); | 173 AST_REWRITE_PROPERTY(Expression, node, next_result); |
175 AST_REWRITE_PROPERTY(Expression, node, result_done); | 174 AST_REWRITE_PROPERTY(Expression, node, result_done); |
176 AST_REWRITE_PROPERTY(Expression, node, assign_each); | 175 AST_REWRITE_PROPERTY(Expression, node, assign_each); |
177 AST_REWRITE_PROPERTY(Expression, node, subject); | |
178 AST_REWRITE_PROPERTY(Statement, node, body); | 176 AST_REWRITE_PROPERTY(Statement, node, body); |
179 } | 177 } |
180 | 178 |
181 | 179 |
182 void AstExpressionRewriter::VisitTryCatchStatement(TryCatchStatement* node) { | 180 void AstExpressionRewriter::VisitTryCatchStatement(TryCatchStatement* node) { |
183 AST_REWRITE_PROPERTY(Block, node, try_block); | 181 AST_REWRITE_PROPERTY(Block, node, try_block); |
184 // Not visiting the variable. | 182 // Not visiting the variable. |
185 AST_REWRITE_PROPERTY(Block, node, catch_block); | 183 AST_REWRITE_PROPERTY(Block, node, catch_block); |
186 } | 184 } |
187 | 185 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 398 |
401 void AstExpressionRewriter::VisitRewritableExpression( | 399 void AstExpressionRewriter::VisitRewritableExpression( |
402 RewritableExpression* node) { | 400 RewritableExpression* node) { |
403 REWRITE_THIS(node); | 401 REWRITE_THIS(node); |
404 AST_REWRITE(Expression, node->expression(), node->Rewrite(replacement)); | 402 AST_REWRITE(Expression, node->expression(), node->Rewrite(replacement)); |
405 } | 403 } |
406 | 404 |
407 | 405 |
408 } // namespace internal | 406 } // namespace internal |
409 } // namespace v8 | 407 } // namespace v8 |
OLD | NEW |