| 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 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 if (input == target) return HType.UNKNOWN; | 1375 if (input == target) return HType.UNKNOWN; |
| 1376 if (isString() || left.isString()) { | 1376 if (isString() || left.isString()) { |
| 1377 return (input == left) ? HType.STRING : HType.UNKNOWN; | 1377 return (input == left) ? HType.STRING : HType.UNKNOWN; |
| 1378 } | 1378 } |
| 1379 if (right.isString()) return HType.STRING; | 1379 if (right.isString()) return HType.STRING; |
| 1380 if (isNumber() || left.isNumber() || right.isNumber()) return HType.NUMBER; | 1380 if (isNumber() || left.isNumber() || right.isNumber()) return HType.NUMBER; |
| 1381 return HType.UNKNOWN; | 1381 return HType.UNKNOWN; |
| 1382 } | 1382 } |
| 1383 | 1383 |
| 1384 AddOperation get operation() => const AddOperation(); | 1384 AddOperation get operation() => const AddOperation(); |
| 1385 |
| 1385 int typeCode() => 5; | 1386 int typeCode() => 5; |
| 1386 bool typeEquals(other) => other is HAdd; | 1387 bool typeEquals(other) => other is HAdd; |
| 1387 bool dataEquals(HInstruction other) => true; | 1388 bool dataEquals(HInstruction other) => true; |
| 1388 } | 1389 } |
| 1389 | 1390 |
| 1390 class HDivide extends HBinaryArithmetic { | 1391 class HDivide extends HBinaryArithmetic { |
| 1391 HDivide(HStatic target, HInstruction left, HInstruction right) | 1392 HDivide(HStatic target, HInstruction left, HInstruction right) |
| 1392 : super(target, left, right); | 1393 : super(target, left, right); |
| 1393 accept(HVisitor visitor) => visitor.visitDivide(this); | 1394 accept(HVisitor visitor) => visitor.visitDivide(this); |
| 1394 | 1395 |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 class HIfBlockInformation { | 2144 class HIfBlockInformation { |
| 2144 final HIf branch; | 2145 final HIf branch; |
| 2145 final SubGraph thenGraph; | 2146 final SubGraph thenGraph; |
| 2146 final SubGraph elseGraph; | 2147 final SubGraph elseGraph; |
| 2147 final HBasicBlock joinBlock; | 2148 final HBasicBlock joinBlock; |
| 2148 HIfBlockInformation(this.branch, | 2149 HIfBlockInformation(this.branch, |
| 2149 this.thenGraph, | 2150 this.thenGraph, |
| 2150 this.elseGraph, | 2151 this.elseGraph, |
| 2151 this.joinBlock); | 2152 this.joinBlock); |
| 2152 } | 2153 } |
| OLD | NEW |