| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 visitBailoutTarget(HBailoutTarget node); | 7 R visitBailoutTarget(HBailoutTarget node); |
| 8 R visitBitAnd(HBitAnd node); | 8 R visitBitAnd(HBitAnd node); |
| 9 R visitBitNot(HBitNot node); | 9 R visitBitNot(HBitNot node); |
| 10 R visitBitOr(HBitOr node); | 10 R visitBitOr(HBitOr node); |
| (...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 toString() => 'goto'; | 1634 toString() => 'goto'; |
| 1635 accept(HVisitor visitor) => visitor.visitGoto(this); | 1635 accept(HVisitor visitor) => visitor.visitGoto(this); |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 class HTry extends HControlFlow { | 1638 class HTry extends HControlFlow { |
| 1639 HParameterValue exception; | 1639 HParameterValue exception; |
| 1640 HBasicBlock finallyBlock; | 1640 HBasicBlock finallyBlock; |
| 1641 HTry() : super(const <HInstruction>[]); | 1641 HTry() : super(const <HInstruction>[]); |
| 1642 toString() => 'try'; | 1642 toString() => 'try'; |
| 1643 accept(HVisitor visitor) => visitor.visitTry(this); | 1643 accept(HVisitor visitor) => visitor.visitTry(this); |
| 1644 HBasicBlock get joinBlock() => this.block.successors.last(); |
| 1644 } | 1645 } |
| 1645 | 1646 |
| 1646 class HIf extends HConditionalBranch { | 1647 class HIf extends HConditionalBranch { |
| 1647 bool hasElse; | 1648 bool hasElse; |
| 1648 HIf(HInstruction condition, this.hasElse) : super(<HInstruction>[condition]); | 1649 HIf(HInstruction condition, this.hasElse) : super(<HInstruction>[condition]); |
| 1649 toString() => 'if'; | 1650 toString() => 'if'; |
| 1650 accept(HVisitor visitor) => visitor.visitIf(this); | 1651 accept(HVisitor visitor) => visitor.visitIf(this); |
| 1651 | 1652 |
| 1652 HBasicBlock get thenBlock() { | 1653 HBasicBlock get thenBlock() { |
| 1653 assert(block.dominatedBlocks[0] === block.successors[0]); | 1654 assert(block.dominatedBlocks[0] === block.successors[0]); |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 | 2133 |
| 2133 HInstruction get expression() => inputs[0]; | 2134 HInstruction get expression() => inputs[0]; |
| 2134 | 2135 |
| 2135 HType computeType() => HType.BOOLEAN; | 2136 HType computeType() => HType.BOOLEAN; |
| 2136 bool hasExpectedType() => true; | 2137 bool hasExpectedType() => true; |
| 2137 | 2138 |
| 2138 accept(HVisitor visitor) => visitor.visitIs(this); | 2139 accept(HVisitor visitor) => visitor.visitIs(this); |
| 2139 | 2140 |
| 2140 toString() => "$expression is $typeExpression"; | 2141 toString() => "$expression is $typeExpression"; |
| 2141 } | 2142 } |
| OLD | NEW |