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

Side by Side Diff: src/ast/ast-expression-rewriter.cc

Issue 1968753004: [cleanup] Split ForOf and ForIn AST nodes apart as they share little (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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.h ('k') | src/ast/ast-expression-visitor.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.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
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
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
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-expression-visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698