| 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 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2275 class HIs extends HInstruction { | 2275 class HIs extends HInstruction { |
| 2276 final DartType typeExpression; | 2276 final DartType typeExpression; |
| 2277 final bool nullOk; | 2277 final bool nullOk; |
| 2278 | 2278 |
| 2279 HIs(this.typeExpression, List<HInstruction> inputs, {this.nullOk: false}) | 2279 HIs(this.typeExpression, List<HInstruction> inputs, {this.nullOk: false}) |
| 2280 : super(inputs) { | 2280 : super(inputs) { |
| 2281 setUseGvn(); | 2281 setUseGvn(); |
| 2282 } | 2282 } |
| 2283 | 2283 |
| 2284 HInstruction get expression => inputs[0]; | 2284 HInstruction get expression => inputs[0]; |
| 2285 HInstruction get checkCall => inputs[1]; | 2285 HInstruction getCheck(int index) => inputs[index + 1]; |
| 2286 int get checkCount => inputs.length - 1; |
| 2286 | 2287 |
| 2287 bool hasArgumentsCheck() => inputs.length > 1; | 2288 bool hasArgumentChecks() => inputs.length > 1; |
| 2288 | 2289 |
| 2289 HType get guaranteedType => HType.BOOLEAN; | 2290 HType get guaranteedType => HType.BOOLEAN; |
| 2290 | 2291 |
| 2291 accept(HVisitor visitor) => visitor.visitIs(this); | 2292 accept(HVisitor visitor) => visitor.visitIs(this); |
| 2292 | 2293 |
| 2293 toString() => "$expression is $typeExpression"; | 2294 toString() => "$expression is $typeExpression"; |
| 2294 | 2295 |
| 2295 int typeCode() => HInstruction.IS_TYPECODE; | 2296 int typeCode() => HInstruction.IS_TYPECODE; |
| 2296 bool typeEquals(HInstruction other) => other is HIs; | 2297 bool typeEquals(HInstruction other) => other is HIs; |
| 2297 bool dataEquals(HIs other) { | 2298 bool dataEquals(HIs other) { |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2701 HBasicBlock get start => expression.start; | 2702 HBasicBlock get start => expression.start; |
| 2702 HBasicBlock get end { | 2703 HBasicBlock get end { |
| 2703 // We don't create a switch block if there are no cases. | 2704 // We don't create a switch block if there are no cases. |
| 2704 assert(!statements.isEmpty); | 2705 assert(!statements.isEmpty); |
| 2705 return statements.last.end; | 2706 return statements.last.end; |
| 2706 } | 2707 } |
| 2707 | 2708 |
| 2708 bool accept(HStatementInformationVisitor visitor) => | 2709 bool accept(HStatementInformationVisitor visitor) => |
| 2709 visitor.visitSwitchInfo(this); | 2710 visitor.visitSwitchInfo(this); |
| 2710 } | 2711 } |
| OLD | NEW |