| 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 import '../closure.dart'; | 5 import '../closure.dart'; |
| 6 import '../common.dart'; | 6 import '../common.dart'; |
| 7 import '../compiler.dart' show Compiler; | 7 import '../compiler.dart' show Compiler; |
| 8 import '../constants/constant_system.dart'; | 8 import '../constants/constant_system.dart'; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 for (HInstruction user in to.usedBy) { | 667 for (HInstruction user in to.usedBy) { |
| 668 if (user == from || user is! HCheck) continue; | 668 if (user == from || user is! HCheck) continue; |
| 669 HCheck check = user; | 669 HCheck check = user; |
| 670 if (check.checkedInput == to) { | 670 if (check.checkedInput == to) { |
| 671 better = better.prepend(user); | 671 better = better.prepend(user); |
| 672 } | 672 } |
| 673 } | 673 } |
| 674 | 674 |
| 675 if (better.isEmpty) return rewrite(from, to); | 675 if (better.isEmpty) return rewrite(from, to); |
| 676 | 676 |
| 677 L1: for (HInstruction user in from.usedBy) { | 677 L1: |
| 678 for (HInstruction user in from.usedBy) { |
| 678 for (HCheck check in better) { | 679 for (HCheck check in better) { |
| 679 if (check.dominates(user)) { | 680 if (check.dominates(user)) { |
| 680 user.rewriteInput(from, check); | 681 user.rewriteInput(from, check); |
| 681 check.usedBy.add(user); | 682 check.usedBy.add(user); |
| 682 continue L1; | 683 continue L1; |
| 683 } | 684 } |
| 684 } | 685 } |
| 685 user.rewriteInput(from, to); | 686 user.rewriteInput(from, to); |
| 686 to.usedBy.add(user); | 687 to.usedBy.add(user); |
| 687 } | 688 } |
| (...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3276 class HDynamicType extends HRuntimeType { | 3277 class HDynamicType extends HRuntimeType { |
| 3277 HDynamicType(DynamicType dartType, TypeMask instructionType) | 3278 HDynamicType(DynamicType dartType, TypeMask instructionType) |
| 3278 : super(const <HInstruction>[], dartType, instructionType); | 3279 : super(const <HInstruction>[], dartType, instructionType); |
| 3279 | 3280 |
| 3280 accept(HVisitor visitor) => visitor.visitDynamicType(this); | 3281 accept(HVisitor visitor) => visitor.visitDynamicType(this); |
| 3281 | 3282 |
| 3282 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; | 3283 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; |
| 3283 | 3284 |
| 3284 bool typeEquals(HInstruction other) => other is HDynamicType; | 3285 bool typeEquals(HInstruction other) => other is HDynamicType; |
| 3285 } | 3286 } |
| OLD | NEW |