| 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 part of ssa; | 5 import '../compiler.dart' show Compiler; |
| 6 import '../constants/values.dart'; |
| 7 import '../elements/elements.dart'; |
| 8 import '../js_backend/js_backend.dart'; |
| 9 import '../types/types.dart'; |
| 10 import '../universe/selector.dart' show Selector; |
| 11 |
| 12 import 'nodes.dart'; |
| 6 | 13 |
| 7 /** | 14 /** |
| 8 * Replaces some instructions with specialized versions to make codegen easier. | 15 * Replaces some instructions with specialized versions to make codegen easier. |
| 9 * Caches codegen information on nodes. | 16 * Caches codegen information on nodes. |
| 10 */ | 17 */ |
| 11 class SsaInstructionSelection extends HBaseVisitor { | 18 class SsaInstructionSelection extends HBaseVisitor { |
| 12 final Compiler compiler; | 19 final Compiler compiler; |
| 13 HGraph graph; | 20 HGraph graph; |
| 14 | 21 |
| 15 SsaInstructionSelection(this.compiler); | 22 SsaInstructionSelection(this.compiler); |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 } | 766 } |
| 760 | 767 |
| 761 // If [thenInput] is defined in the first predecessor, then it is only used | 768 // If [thenInput] is defined in the first predecessor, then it is only used |
| 762 // by [phi] and can be generated at use site. | 769 // by [phi] and can be generated at use site. |
| 763 if (identical(thenInput.block, end.predecessors[0])) { | 770 if (identical(thenInput.block, end.predecessors[0])) { |
| 764 assert(thenInput.usedBy.length == 1); | 771 assert(thenInput.usedBy.length == 1); |
| 765 markAsGenerateAtUseSite(thenInput); | 772 markAsGenerateAtUseSite(thenInput); |
| 766 } | 773 } |
| 767 } | 774 } |
| 768 } | 775 } |
| OLD | NEW |