| 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 visitBitAnd(HBitAnd node); | 7 R visitBitAnd(HBitAnd node); |
| 8 R visitBitNot(HBitNot node); | 8 R visitBitNot(HBitNot node); |
| 9 R visitBitOr(HBitOr node); | 9 R visitBitOr(HBitOr node); |
| 10 R visitBitXor(HBitXor node); | 10 R visitBitXor(HBitXor node); |
| (...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2201 // However it turns out that inserting an integer check in the optimized | 2201 // However it turns out that inserting an integer check in the optimized |
| 2202 // version is cheaper than having another bailout case. This is true, | 2202 // version is cheaper than having another bailout case. This is true, |
| 2203 // because the integer check will simply throw if it fails. | 2203 // because the integer check will simply throw if it fails. |
| 2204 return HType.UNKNOWN; | 2204 return HType.UNKNOWN; |
| 2205 } | 2205 } |
| 2206 | 2206 |
| 2207 bool get builtin() => receiver.isMutableArray() && index.isInteger(); | 2207 bool get builtin() => receiver.isMutableArray() && index.isInteger(); |
| 2208 } | 2208 } |
| 2209 | 2209 |
| 2210 class HIs extends HInstruction { | 2210 class HIs extends HInstruction { |
| 2211 final Type typeName; | 2211 final Type typeExpression; |
| 2212 final bool nullOk; | 2212 final bool nullOk; |
| 2213 | 2213 |
| 2214 HIs(this.typeName, HInstruction expression, [nullOk = false]) | 2214 HIs(this.typeExpression, HInstruction expression, [nullOk = false]) |
| 2215 : this.nullOk = nullOk, super(<HInstruction>[expression]); | 2215 : this.nullOk = nullOk, super(<HInstruction>[expression]); |
| 2216 | 2216 |
| 2217 HInstruction get expression() => inputs[0]; | 2217 HInstruction get expression() => inputs[0]; |
| 2218 | 2218 |
| 2219 HType get guaranteedType() => HType.BOOLEAN; | 2219 HType get guaranteedType() => HType.BOOLEAN; |
| 2220 | 2220 |
| 2221 accept(HVisitor visitor) => visitor.visitIs(this); | 2221 accept(HVisitor visitor) => visitor.visitIs(this); |
| 2222 | 2222 |
| 2223 toString() => "$expression is $typeName"; | 2223 toString() => "$expression is $typeExpression"; |
| 2224 } | 2224 } |
| 2225 | 2225 |
| 2226 class HIfBlockInformation { | 2226 class HIfBlockInformation { |
| 2227 final HIf branch; | 2227 final HIf branch; |
| 2228 final SubGraph thenGraph; | 2228 final SubGraph thenGraph; |
| 2229 final SubGraph elseGraph; | 2229 final SubGraph elseGraph; |
| 2230 final HBasicBlock joinBlock; | 2230 final HBasicBlock joinBlock; |
| 2231 HIfBlockInformation(this.branch, | 2231 HIfBlockInformation(this.branch, |
| 2232 this.thenGraph, | 2232 this.thenGraph, |
| 2233 this.elseGraph, | 2233 this.elseGraph, |
| 2234 this.joinBlock); | 2234 this.joinBlock); |
| 2235 } | 2235 } |
| OLD | NEW |