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

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

Issue 1314843002: Visit additional AST nodes as expressions in AstExpressionVisitor . (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised Created 5 years, 3 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 | « no previous file | test/cctest/test-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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast-expression-visitor.h" 7 #include "src/ast-expression-visitor.h"
8 8
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 235
236 void AstExpressionVisitor::VisitAssignment(Assignment* expr) { 236 void AstExpressionVisitor::VisitAssignment(Assignment* expr) {
237 VisitExpression(expr); 237 VisitExpression(expr);
238 RECURSE_EXPRESSION(Visit(expr->target())); 238 RECURSE_EXPRESSION(Visit(expr->target()));
239 RECURSE_EXPRESSION(Visit(expr->value())); 239 RECURSE_EXPRESSION(Visit(expr->value()));
240 } 240 }
241 241
242 242
243 void AstExpressionVisitor::VisitYield(Yield* expr) { 243 void AstExpressionVisitor::VisitYield(Yield* expr) {
244 RECURSE(Visit(expr->generator_object())); 244 VisitExpression(expr);
245 RECURSE(Visit(expr->expression())); 245 RECURSE_EXPRESSION(Visit(expr->generator_object()));
246 RECURSE_EXPRESSION(Visit(expr->expression()));
246 } 247 }
247 248
248 249
249 void AstExpressionVisitor::VisitThrow(Throw* expr) { 250 void AstExpressionVisitor::VisitThrow(Throw* expr) {
250 RECURSE(Visit(expr->exception())); 251 VisitExpression(expr);
252 RECURSE_EXPRESSION(Visit(expr->exception()));
251 } 253 }
252 254
253 255
254 void AstExpressionVisitor::VisitProperty(Property* expr) { 256 void AstExpressionVisitor::VisitProperty(Property* expr) {
255 RECURSE(Visit(expr->obj())); 257 VisitExpression(expr);
256 RECURSE(Visit(expr->key())); 258 RECURSE_EXPRESSION(Visit(expr->obj()));
259 RECURSE_EXPRESSION(Visit(expr->key()));
257 } 260 }
258 261
259 262
260 void AstExpressionVisitor::VisitCall(Call* expr) { 263 void AstExpressionVisitor::VisitCall(Call* expr) {
261 VisitExpression(expr); 264 VisitExpression(expr);
262 RECURSE_EXPRESSION(Visit(expr->expression())); 265 RECURSE_EXPRESSION(Visit(expr->expression()));
263 ZoneList<Expression*>* args = expr->arguments(); 266 ZoneList<Expression*>* args = expr->arguments();
264 for (int i = 0; i < args->length(); ++i) { 267 for (int i = 0; i < args->length(); ++i) {
265 Expression* arg = args->at(i); 268 Expression* arg = args->at(i);
266 RECURSE_EXPRESSION(Visit(arg)); 269 RECURSE_EXPRESSION(Visit(arg));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 339
337 void AstExpressionVisitor::VisitSuperPropertyReference( 340 void AstExpressionVisitor::VisitSuperPropertyReference(
338 SuperPropertyReference* expr) {} 341 SuperPropertyReference* expr) {}
339 342
340 343
341 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) {} 344 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) {}
342 } 345 }
343 346
344 347
345 } // namespace v8::internal 348 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-ast-expression-visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698