| 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 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2284 bool get isBooleanConversionCheck => kind == BOOLEAN_CONVERSION_CHECK; | 2284 bool get isBooleanConversionCheck => kind == BOOLEAN_CONVERSION_CHECK; |
| 2285 | 2285 |
| 2286 accept(HVisitor visitor) => visitor.visitTypeConversion(this); | 2286 accept(HVisitor visitor) => visitor.visitTypeConversion(this); |
| 2287 | 2287 |
| 2288 bool isJsStatement() => isControlFlow(); | 2288 bool isJsStatement() => isControlFlow(); |
| 2289 bool isControlFlow() => isArgumentTypeCheck || isReceiverTypeCheck; | 2289 bool isControlFlow() => isArgumentTypeCheck || isReceiverTypeCheck; |
| 2290 bool canThrow() => isChecked; | 2290 bool canThrow() => isChecked; |
| 2291 | 2291 |
| 2292 int typeCode() => HInstruction.TYPE_CONVERSION_TYPECODE; | 2292 int typeCode() => HInstruction.TYPE_CONVERSION_TYPECODE; |
| 2293 bool typeEquals(HInstruction other) => other is HTypeConversion; | 2293 bool typeEquals(HInstruction other) => other is HTypeConversion; |
| 2294 bool isCodeMotionInvariant() => kind == NO_CHECK; |
| 2294 | 2295 |
| 2295 bool dataEquals(HTypeConversion other) { | 2296 bool dataEquals(HTypeConversion other) { |
| 2296 return kind == other.kind | 2297 return kind == other.kind |
| 2297 && typeExpression == other.typeExpression | 2298 && typeExpression == other.typeExpression |
| 2298 && instructionType == other.instructionType; | 2299 && instructionType == other.instructionType; |
| 2299 } | 2300 } |
| 2300 } | 2301 } |
| 2301 | 2302 |
| 2302 class HRangeConversion extends HCheck { | 2303 class HRangeConversion extends HCheck { |
| 2303 HRangeConversion(HInstruction input) : super(<HInstruction>[input]) { | 2304 HRangeConversion(HInstruction input) : super(<HInstruction>[input]) { |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 HBasicBlock get start => expression.start; | 2676 HBasicBlock get start => expression.start; |
| 2676 HBasicBlock get end { | 2677 HBasicBlock get end { |
| 2677 // We don't create a switch block if there are no cases. | 2678 // We don't create a switch block if there are no cases. |
| 2678 assert(!statements.isEmpty); | 2679 assert(!statements.isEmpty); |
| 2679 return statements.last.end; | 2680 return statements.last.end; |
| 2680 } | 2681 } |
| 2681 | 2682 |
| 2682 bool accept(HStatementInformationVisitor visitor) => | 2683 bool accept(HStatementInformationVisitor visitor) => |
| 2683 visitor.visitSwitchInfo(this); | 2684 visitor.visitSwitchInfo(this); |
| 2684 } | 2685 } |
| OLD | NEW |