| 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 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2534 [this.nullOk = false]) | 2534 [this.nullOk = false]) |
| 2535 : super(<HInstruction>[expression]..addAll(checks)); | 2535 : super(<HInstruction>[expression]..addAll(checks)); |
| 2536 | 2536 |
| 2537 HIs(this.typeExpression, HInstruction expression, {this.nullOk: false}) | 2537 HIs(this.typeExpression, HInstruction expression, {this.nullOk: false}) |
| 2538 : super(<HInstruction>[expression]); | 2538 : super(<HInstruction>[expression]); |
| 2539 | 2539 |
| 2540 HInstruction get expression => inputs[0]; | 2540 HInstruction get expression => inputs[0]; |
| 2541 HInstruction getCheck(int index) => inputs[index + 1]; | 2541 HInstruction getCheck(int index) => inputs[index + 1]; |
| 2542 int get checkCount => inputs.length - 1; | 2542 int get checkCount => inputs.length - 1; |
| 2543 | 2543 |
| 2544 bool hasArgumentChecks() => inputs.length >= 1; | 2544 bool hasArgumentChecks() => inputs.length > 1; |
| 2545 | 2545 |
| 2546 HType get guaranteedType => HType.BOOLEAN; | 2546 HType get guaranteedType => HType.BOOLEAN; |
| 2547 | 2547 |
| 2548 accept(HVisitor visitor) => visitor.visitIs(this); | 2548 accept(HVisitor visitor) => visitor.visitIs(this); |
| 2549 | 2549 |
| 2550 toString() => "$expression is $typeExpression"; | 2550 toString() => "$expression is $typeExpression"; |
| 2551 } | 2551 } |
| 2552 | 2552 |
| 2553 class HTypeConversion extends HCheck { | 2553 class HTypeConversion extends HCheck { |
| 2554 HType type; | 2554 HType type; |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2942 HBasicBlock get start => expression.start; | 2942 HBasicBlock get start => expression.start; |
| 2943 HBasicBlock get end { | 2943 HBasicBlock get end { |
| 2944 // We don't create a switch block if there are no cases. | 2944 // We don't create a switch block if there are no cases. |
| 2945 assert(!statements.isEmpty); | 2945 assert(!statements.isEmpty); |
| 2946 return statements.last.end; | 2946 return statements.last.end; |
| 2947 } | 2947 } |
| 2948 | 2948 |
| 2949 bool accept(HStatementInformationVisitor visitor) => | 2949 bool accept(HStatementInformationVisitor visitor) => |
| 2950 visitor.visitSwitchInfo(this); | 2950 visitor.visitSwitchInfo(this); |
| 2951 } | 2951 } |
| OLD | NEW |