| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import '../compiler.dart' show Compiler; | 5 import '../compiler.dart' show Compiler; |
| 6 import '../constants/values.dart'; | 6 import '../constants/values.dart'; |
| 7 import '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../js_backend/js_backend.dart'; | 8 import '../js_backend/js_backend.dart'; |
| 9 import '../types/types.dart'; | 9 import '../types/types.dart'; |
| 10 import '../universe/selector.dart' show Selector; | 10 import '../universe/selector.dart' show Selector; |
| 11 | |
| 12 import 'nodes.dart'; | 11 import 'nodes.dart'; |
| 13 | 12 |
| 14 /** | 13 /** |
| 15 * Replaces some instructions with specialized versions to make codegen easier. | 14 * Replaces some instructions with specialized versions to make codegen easier. |
| 16 * Caches codegen information on nodes. | 15 * Caches codegen information on nodes. |
| 17 */ | 16 */ |
| 18 class SsaInstructionSelection extends HBaseVisitor { | 17 class SsaInstructionSelection extends HBaseVisitor { |
| 19 final Compiler compiler; | 18 final Compiler compiler; |
| 20 HGraph graph; | 19 HGraph graph; |
| 21 | 20 |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 } | 776 } |
| 778 | 777 |
| 779 // If [thenInput] is defined in the first predecessor, then it is only used | 778 // If [thenInput] is defined in the first predecessor, then it is only used |
| 780 // by [phi] and can be generated at use site. | 779 // by [phi] and can be generated at use site. |
| 781 if (identical(thenInput.block, end.predecessors[0])) { | 780 if (identical(thenInput.block, end.predecessors[0])) { |
| 782 assert(thenInput.usedBy.length == 1); | 781 assert(thenInput.usedBy.length == 1); |
| 783 markAsGenerateAtUseSite(thenInput); | 782 markAsGenerateAtUseSite(thenInput); |
| 784 } | 783 } |
| 785 } | 784 } |
| 786 } | 785 } |
| OLD | NEW |