| 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 interface HVisitor<R> { | 5 interface HVisitor<R> { |
| 6 R visitAdd(HAdd node); | 6 R visitAdd(HAdd node); |
| 7 R visitBitAnd(HBitAnd node); | 7 R visitBitAnd(HBitAnd node); |
| 8 R visitBitNot(HBitNot node); | 8 R visitBitNot(HBitNot node); |
| 9 R visitBitOr(HBitOr node); | 9 R visitBitOr(HBitOr node); |
| 10 R visitBitXor(HBitXor node); | 10 R visitBitXor(HBitXor node); |
| (...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 static final int FOR_IN_LOOP = 3; | 2540 static final int FOR_IN_LOOP = 3; |
| 2541 static final int NOT_A_LOOP = -1; | 2541 static final int NOT_A_LOOP = -1; |
| 2542 | 2542 |
| 2543 final int kind; | 2543 final int kind; |
| 2544 final HExpressionInformation initializer; | 2544 final HExpressionInformation initializer; |
| 2545 final HExpressionInformation condition; | 2545 final HExpressionInformation condition; |
| 2546 final HStatementInformation body; | 2546 final HStatementInformation body; |
| 2547 final HExpressionInformation updates; | 2547 final HExpressionInformation updates; |
| 2548 final TargetElement target; | 2548 final TargetElement target; |
| 2549 final List<LabelElement> labels; | 2549 final List<LabelElement> labels; |
| 2550 final Node sourcePosition; |
| 2550 | 2551 |
| 2551 HLoopBlockInformation(this.kind, | 2552 HLoopBlockInformation(this.kind, |
| 2552 this.initializer, | 2553 this.initializer, |
| 2553 this.condition, | 2554 this.condition, |
| 2554 this.body, | 2555 this.body, |
| 2555 this.updates, | 2556 this.updates, |
| 2556 this.target, | 2557 this.target, |
| 2557 this.labels); | 2558 this.labels, |
| 2559 this.sourcePosition); |
| 2558 | 2560 |
| 2559 HBasicBlock get start() { | 2561 HBasicBlock get start() { |
| 2560 if (initializer !== null) return initializer.start; | 2562 if (initializer !== null) return initializer.start; |
| 2561 if (kind == DO_WHILE_LOOP) { | 2563 if (kind == DO_WHILE_LOOP) { |
| 2562 return body.start; | 2564 return body.start; |
| 2563 } | 2565 } |
| 2564 return condition.start; | 2566 return condition.start; |
| 2565 } | 2567 } |
| 2566 | 2568 |
| 2567 HBasicBlock get loopHeader() { | 2569 HBasicBlock get loopHeader() { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2658 HBasicBlock get start() => expression.start; | 2660 HBasicBlock get start() => expression.start; |
| 2659 HBasicBlock get end() { | 2661 HBasicBlock get end() { |
| 2660 // We don't create a switch block if there are no cases. | 2662 // We don't create a switch block if there are no cases. |
| 2661 assert(!statements.isEmpty()); | 2663 assert(!statements.isEmpty()); |
| 2662 return statements.last().end; | 2664 return statements.last().end; |
| 2663 } | 2665 } |
| 2664 | 2666 |
| 2665 bool accept(HStatementInformationVisitor visitor) => | 2667 bool accept(HStatementInformationVisitor visitor) => |
| 2666 visitor.visitSwitchInfo(this); | 2668 visitor.visitSwitchInfo(this); |
| 2667 } | 2669 } |
| OLD | NEW |