| 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 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 2398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2409 HInstruction typeInfo, [this.nullOk = false]) | 2409 HInstruction typeInfo, [this.nullOk = false]) |
| 2410 : super(<HInstruction>[expression, typeInfo]); | 2410 : super(<HInstruction>[expression, typeInfo]); |
| 2411 | 2411 |
| 2412 HIs(this.typeExpression, HInstruction expression, [this.nullOk = false]) | 2412 HIs(this.typeExpression, HInstruction expression, [this.nullOk = false]) |
| 2413 : super(<HInstruction>[expression]); | 2413 : super(<HInstruction>[expression]); |
| 2414 | 2414 |
| 2415 HInstruction get expression => inputs[0]; | 2415 HInstruction get expression => inputs[0]; |
| 2416 | 2416 |
| 2417 HInstruction get typeInfoCall => inputs[1]; | 2417 HInstruction get typeInfoCall => inputs[1]; |
| 2418 | 2418 |
| 2419 bool hasTypeInfo() => inputs.length == 2; |
| 2420 |
| 2419 HType get guaranteedType => HType.BOOLEAN; | 2421 HType get guaranteedType => HType.BOOLEAN; |
| 2420 | 2422 |
| 2421 accept(HVisitor visitor) => visitor.visitIs(this); | 2423 accept(HVisitor visitor) => visitor.visitIs(this); |
| 2422 | 2424 |
| 2423 toString() => "$expression is $typeExpression"; | 2425 toString() => "$expression is $typeExpression"; |
| 2424 } | 2426 } |
| 2425 | 2427 |
| 2426 class HTypeConversion extends HCheck { | 2428 class HTypeConversion extends HCheck { |
| 2427 HType type; | 2429 HType type; |
| 2428 final int kind; | 2430 final int kind; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2799 HBasicBlock get start => expression.start; | 2801 HBasicBlock get start => expression.start; |
| 2800 HBasicBlock get end { | 2802 HBasicBlock get end { |
| 2801 // We don't create a switch block if there are no cases. | 2803 // We don't create a switch block if there are no cases. |
| 2802 assert(!statements.isEmpty()); | 2804 assert(!statements.isEmpty()); |
| 2803 return statements.last().end; | 2805 return statements.last().end; |
| 2804 } | 2806 } |
| 2805 | 2807 |
| 2806 bool accept(HStatementInformationVisitor visitor) => | 2808 bool accept(HStatementInformationVisitor visitor) => |
| 2807 visitor.visitSwitchInfo(this); | 2809 visitor.visitSwitchInfo(this); |
| 2808 } | 2810 } |
| OLD | NEW |