Chromium Code Reviews| 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/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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 void AstExpressionVisitor::VisitLiteral(Literal* expr) { | 223 void AstExpressionVisitor::VisitLiteral(Literal* expr) { |
| 224 VisitExpression(expr); | 224 VisitExpression(expr); |
| 225 } | 225 } |
| 226 | 226 |
| 227 | 227 |
| 228 void AstExpressionVisitor::VisitRegExpLiteral(RegExpLiteral* expr) { | 228 void AstExpressionVisitor::VisitRegExpLiteral(RegExpLiteral* expr) { |
| 229 VisitExpression(expr); | 229 VisitExpression(expr); |
| 230 } | 230 } |
| 231 | 231 |
| 232 | 232 |
| 233 void AstExpressionVisitor::VisitAssignmentPattern(AssignmentPattern* expr) { | |
| 234 VisitExpression(expr); | |
| 235 RECURSE_EXPRESSION(Visit(expr->expression())); | |
|
adamk
2015/11/20 22:42:58
For each visitor, how did you decide whether to vi
| |
| 236 } | |
| 237 | |
| 238 | |
| 233 void AstExpressionVisitor::VisitObjectLiteral(ObjectLiteral* expr) { | 239 void AstExpressionVisitor::VisitObjectLiteral(ObjectLiteral* expr) { |
| 234 VisitExpression(expr); | 240 VisitExpression(expr); |
| 235 ZoneList<ObjectLiteralProperty*>* props = expr->properties(); | 241 ZoneList<ObjectLiteralProperty*>* props = expr->properties(); |
| 236 for (int i = 0; i < props->length(); ++i) { | 242 for (int i = 0; i < props->length(); ++i) { |
| 237 ObjectLiteralProperty* prop = props->at(i); | 243 ObjectLiteralProperty* prop = props->at(i); |
| 238 if (!prop->key()->IsLiteral()) { | 244 if (!prop->key()->IsLiteral()) { |
| 239 RECURSE_EXPRESSION(Visit(prop->key())); | 245 RECURSE_EXPRESSION(Visit(prop->key())); |
| 240 } | 246 } |
| 241 RECURSE_EXPRESSION(Visit(prop->value())); | 247 RECURSE_EXPRESSION(Visit(prop->value())); |
| 242 } | 248 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) { | 394 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) { |
| 389 VisitExpression(expr); | 395 VisitExpression(expr); |
| 390 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_var())); | 396 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_var())); |
| 391 RECURSE_EXPRESSION(VisitVariableProxy(expr->new_target_var())); | 397 RECURSE_EXPRESSION(VisitVariableProxy(expr->new_target_var())); |
| 392 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_function_var())); | 398 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_function_var())); |
| 393 } | 399 } |
| 394 | 400 |
| 395 | 401 |
| 396 } // namespace internal | 402 } // namespace internal |
| 397 } // namespace v8 | 403 } // namespace v8 |
| OLD | NEW |