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; | |
6 | |
7 /** | 5 /** |
8 * The [LiveRange] class covers a range where an instruction is live. | 6 * The [LiveRange] class covers a range where an instruction is live. |
9 */ | 7 */ |
10 class LiveRange { | 8 class LiveRange { |
11 final int start; | 9 final int start; |
12 // [end] is not final because it can be updated due to loops. | 10 // [end] is not final because it can be updated due to loops. |
13 int end; | 11 int end; |
14 LiveRange(this.start, this.end) { | 12 LiveRange(this.start, this.end) { |
15 assert(start <= end); | 13 assert(start <= end); |
16 } | 14 } |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 if (!needsName(input)) { | 650 if (!needsName(input)) { |
653 names.addAssignment(predecessor, input, phi); | 651 names.addAssignment(predecessor, input, phi); |
654 } else { | 652 } else { |
655 names.addCopy(predecessor, input, phi); | 653 names.addCopy(predecessor, input, phi); |
656 } | 654 } |
657 } | 655 } |
658 | 656 |
659 namer.allocateName(phi); | 657 namer.allocateName(phi); |
660 } | 658 } |
661 } | 659 } |
OLD | NEW |