| 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 part of ssa; |
| 6 | 6 |
| 7 abstract class HVisitor<R> { | 7 abstract class HVisitor<R> { |
| 8 R visitAdd(HAdd node); | 8 R visitAdd(HAdd node); |
| 9 R visitBailoutTarget(HBailoutTarget node); | 9 R visitBailoutTarget(HBailoutTarget node); |
| 10 R visitBitAnd(HBitAnd node); | 10 R visitBitAnd(HBitAnd node); |
| (...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2582 final SourceFileLocation endSourcePosition; | 2582 final SourceFileLocation endSourcePosition; |
| 2583 | 2583 |
| 2584 HLoopBlockInformation(this.kind, | 2584 HLoopBlockInformation(this.kind, |
| 2585 this.initializer, | 2585 this.initializer, |
| 2586 this.condition, | 2586 this.condition, |
| 2587 this.body, | 2587 this.body, |
| 2588 this.updates, | 2588 this.updates, |
| 2589 this.target, | 2589 this.target, |
| 2590 this.labels, | 2590 this.labels, |
| 2591 this.sourcePosition, | 2591 this.sourcePosition, |
| 2592 this.endSourcePosition); | 2592 this.endSourcePosition) { |
| 2593 assert( |
| 2594 (kind == DO_WHILE_LOOP ? body.start : condition.start).isLoopHeader()); |
| 2595 } |
| 2593 | 2596 |
| 2594 HBasicBlock get start { | 2597 HBasicBlock get start { |
| 2595 if (initializer != null) return initializer.start; | 2598 if (initializer != null) return initializer.start; |
| 2596 if (kind == DO_WHILE_LOOP) { | 2599 if (kind == DO_WHILE_LOOP) { |
| 2597 return body.start; | 2600 return body.start; |
| 2598 } | 2601 } |
| 2599 return condition.start; | 2602 return condition.start; |
| 2600 } | 2603 } |
| 2601 | 2604 |
| 2602 HBasicBlock get loopHeader { | 2605 HBasicBlock get loopHeader { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2693 HBasicBlock get start => expression.start; | 2696 HBasicBlock get start => expression.start; |
| 2694 HBasicBlock get end { | 2697 HBasicBlock get end { |
| 2695 // We don't create a switch block if there are no cases. | 2698 // We don't create a switch block if there are no cases. |
| 2696 assert(!statements.isEmpty); | 2699 assert(!statements.isEmpty); |
| 2697 return statements.last.end; | 2700 return statements.last.end; |
| 2698 } | 2701 } |
| 2699 | 2702 |
| 2700 bool accept(HStatementInformationVisitor visitor) => | 2703 bool accept(HStatementInformationVisitor visitor) => |
| 2701 visitor.visitSwitchInfo(this); | 2704 visitor.visitSwitchInfo(this); |
| 2702 } | 2705 } |
| OLD | NEW |