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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 NativeFunctionLiteral* expr) {} | 202 NativeFunctionLiteral* expr) {} |
203 | 203 |
204 | 204 |
205 void AstExpressionVisitor::VisitDoExpression(DoExpression* expr) { | 205 void AstExpressionVisitor::VisitDoExpression(DoExpression* expr) { |
206 RECURSE(VisitBlock(expr->block())); | 206 RECURSE(VisitBlock(expr->block())); |
207 RECURSE(VisitVariableProxy(expr->result())); | 207 RECURSE(VisitVariableProxy(expr->result())); |
208 } | 208 } |
209 | 209 |
210 | 210 |
211 void AstExpressionVisitor::VisitConditional(Conditional* expr) { | 211 void AstExpressionVisitor::VisitConditional(Conditional* expr) { |
212 RECURSE(Visit(expr->condition())); | 212 VisitExpression(expr); |
213 RECURSE(Visit(expr->then_expression())); | 213 RECURSE_EXPRESSION(Visit(expr->condition())); |
214 RECURSE(Visit(expr->else_expression())); | 214 RECURSE_EXPRESSION(Visit(expr->then_expression())); |
| 215 RECURSE_EXPRESSION(Visit(expr->else_expression())); |
215 } | 216 } |
216 | 217 |
217 | 218 |
218 void AstExpressionVisitor::VisitVariableProxy(VariableProxy* expr) { | 219 void AstExpressionVisitor::VisitVariableProxy(VariableProxy* expr) { |
219 VisitExpression(expr); | 220 VisitExpression(expr); |
220 } | 221 } |
221 | 222 |
222 | 223 |
223 void AstExpressionVisitor::VisitLiteral(Literal* expr) { | 224 void AstExpressionVisitor::VisitLiteral(Literal* expr) { |
224 VisitExpression(expr); | 225 VisitExpression(expr); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) { | 389 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) { |
389 VisitExpression(expr); | 390 VisitExpression(expr); |
390 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_var())); | 391 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_var())); |
391 RECURSE_EXPRESSION(VisitVariableProxy(expr->new_target_var())); | 392 RECURSE_EXPRESSION(VisitVariableProxy(expr->new_target_var())); |
392 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_function_var())); | 393 RECURSE_EXPRESSION(VisitVariableProxy(expr->this_function_var())); |
393 } | 394 } |
394 | 395 |
395 | 396 |
396 } // namespace internal | 397 } // namespace internal |
397 } // namespace v8 | 398 } // namespace v8 |
OLD | NEW |