| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 masks; | 5 part of masks; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A type mask that wraps an other one, and delegate all its | 8 * A type mask that wraps an other one, and delegate all its |
| 9 * implementation methods to it. | 9 * implementation methods to it. |
| 10 */ | 10 */ |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool needsNoSuchMethodHandling(Selector selector, ClosedWorld closedWorld) { | 96 bool needsNoSuchMethodHandling(Selector selector, ClosedWorld closedWorld) { |
| 97 return forwardTo.needsNoSuchMethodHandling(selector, closedWorld); | 97 return forwardTo.needsNoSuchMethodHandling(selector, closedWorld); |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool canHit(Element element, Selector selector, ClosedWorld closedWorld) { | 100 bool canHit(Element element, Selector selector, ClosedWorld closedWorld) { |
| 101 return forwardTo.canHit(element, selector, closedWorld); | 101 return forwardTo.canHit(element, selector, closedWorld); |
| 102 } | 102 } |
| 103 | 103 |
| 104 Element locateSingleElement(Selector selector, Compiler compiler) { | 104 Element locateSingleElement(Selector selector, ClosedWorld closedWorld) { |
| 105 return forwardTo.locateSingleElement(selector, compiler); | 105 return forwardTo.locateSingleElement(selector, closedWorld); |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool equalsDisregardNull(other) { | 108 bool equalsDisregardNull(other) { |
| 109 if (other is! ForwardingTypeMask) return false; | 109 if (other is! ForwardingTypeMask) return false; |
| 110 if (forwardTo.isNullable) { | 110 if (forwardTo.isNullable) { |
| 111 return forwardTo == other.forwardTo.nullable(); | 111 return forwardTo == other.forwardTo.nullable(); |
| 112 } else { | 112 } else { |
| 113 return forwardTo == other.forwardTo.nonNullable(); | 113 return forwardTo == other.forwardTo.nonNullable(); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 | 116 |
| 117 bool operator ==(other) { | 117 bool operator ==(other) { |
| 118 return equalsDisregardNull(other) && isNullable == other.isNullable; | 118 return equalsDisregardNull(other) && isNullable == other.isNullable; |
| 119 } | 119 } |
| 120 | 120 |
| 121 int get hashCode => throw "Subclass should implement hashCode getter"; | 121 int get hashCode => throw "Subclass should implement hashCode getter"; |
| 122 } | 122 } |
| OLD | NEW |