| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library tree_ir.optimization.statement_rewriter; | 5 library tree_ir.optimization.statement_rewriter; |
| 6 | 6 |
| 7 import 'optimization.dart' show Pass; | 7 import 'optimization.dart' show Pass; |
| 8 import '../tree_ir_nodes.dart'; | 8 import '../tree_ir_nodes.dart'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 _rewriteList(node.arguments); | 381 _rewriteList(node.arguments); |
| 382 node.receiver = visitExpression(node.receiver); | 382 node.receiver = visitExpression(node.receiver); |
| 383 return node; | 383 return node; |
| 384 } | 384 } |
| 385 | 385 |
| 386 Expression visitInvokeConstructor(InvokeConstructor node) { | 386 Expression visitInvokeConstructor(InvokeConstructor node) { |
| 387 _rewriteList(node.arguments); | 387 _rewriteList(node.arguments); |
| 388 return node; | 388 return node; |
| 389 } | 389 } |
| 390 | 390 |
| 391 Expression visitConcatenateStrings(ConcatenateStrings node) { | |
| 392 _rewriteList(node.arguments); | |
| 393 return node; | |
| 394 } | |
| 395 | |
| 396 Expression visitConditional(Conditional node) { | 391 Expression visitConditional(Conditional node) { |
| 397 // Conditional expressions do not exist in the input, but they are | 392 // Conditional expressions do not exist in the input, but they are |
| 398 // introduced by if-to-conditional conversion. | 393 // introduced by if-to-conditional conversion. |
| 399 // Their subexpressions have already been processed; do not reprocess them. | 394 // Their subexpressions have already been processed; do not reprocess them. |
| 400 // | 395 // |
| 401 // Note that this can only happen for conditional expressions. It is an | 396 // Note that this can only happen for conditional expressions. It is an |
| 402 // error for any other type of expression to be visited twice or to be | 397 // error for any other type of expression to be visited twice or to be |
| 403 // created and then visited. We use this special treatment of conditionals | 398 // created and then visited. We use this special treatment of conditionals |
| 404 // to allow for assignment inlining after if-to-conditional conversion. | 399 // to allow for assignment inlining after if-to-conditional conversion. |
| 405 // | 400 // |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 IsVariableUsedVisitor(this.variable); | 1033 IsVariableUsedVisitor(this.variable); |
| 1039 | 1034 |
| 1040 visitVariableUse(VariableUse node) { | 1035 visitVariableUse(VariableUse node) { |
| 1041 if (node.variable == variable) { | 1036 if (node.variable == variable) { |
| 1042 wasFound = true; | 1037 wasFound = true; |
| 1043 } | 1038 } |
| 1044 } | 1039 } |
| 1045 | 1040 |
| 1046 visitInnerFunction(FunctionDefinition node) {} | 1041 visitInnerFunction(FunctionDefinition node) {} |
| 1047 } | 1042 } |
| OLD | NEW |