| 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 library elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart' show Resolution, Parsing; | 8 import '../common/resolution.dart' show Resolution, Parsing; |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../constants/constant_constructors.dart'; | 10 import '../constants/constant_constructors.dart'; |
| (...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2220 assert(!isRedirectingFactory || effectiveTargetInternal != null); | 2220 assert(!isRedirectingFactory || effectiveTargetInternal != null); |
| 2221 if (isRedirectingFactory) { | 2221 if (isRedirectingFactory) { |
| 2222 return effectiveTargetInternal; | 2222 return effectiveTargetInternal; |
| 2223 } | 2223 } |
| 2224 if (isPatched) { | 2224 if (isPatched) { |
| 2225 return effectiveTargetInternal ?? this; | 2225 return effectiveTargetInternal ?? this; |
| 2226 } | 2226 } |
| 2227 return this; | 2227 return this; |
| 2228 } | 2228 } |
| 2229 | 2229 |
| 2230 InterfaceType get effectiveTargetType { | 2230 DartType get effectiveTargetType { |
| 2231 assert(invariant(this, _effectiveTargetType != null, | 2231 assert(invariant(this, _effectiveTargetType != null, |
| 2232 message: 'Effective target type has not yet been computed for $this.')); | 2232 message: 'Effective target type has not yet been computed for $this.')); |
| 2233 return _effectiveTargetType; | 2233 return _effectiveTargetType; |
| 2234 } | 2234 } |
| 2235 | 2235 |
| 2236 InterfaceType computeEffectiveTargetType(InterfaceType newType) { | 2236 DartType computeEffectiveTargetType(InterfaceType newType) { |
| 2237 if (!isRedirectingFactory) return newType; | 2237 if (!isRedirectingFactory) return newType; |
| 2238 return effectiveTargetType.substByContext(newType); | 2238 return effectiveTargetType.substByContext(newType); |
| 2239 } | 2239 } |
| 2240 | 2240 |
| 2241 bool get isEffectiveTargetMalformed { | 2241 bool get isEffectiveTargetMalformed { |
| 2242 if (!isRedirectingFactory) return false; | 2242 if (!isRedirectingFactory) return false; |
| 2243 assert(invariant(this, _isEffectiveTargetMalformed != null, | 2243 assert(invariant(this, _isEffectiveTargetMalformed != null, |
| 2244 message: 'Malformedness has not yet been computed for $this.')); | 2244 message: 'Malformedness has not yet been computed for $this.')); |
| 2245 return _isEffectiveTargetMalformed == true; | 2245 return _isEffectiveTargetMalformed == true; |
| 2246 } | 2246 } |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3127 | 3127 |
| 3128 bool get hasResolvedAst { | 3128 bool get hasResolvedAst { |
| 3129 return definingElement.hasNode && definingElement.hasTreeElements; | 3129 return definingElement.hasNode && definingElement.hasTreeElements; |
| 3130 } | 3130 } |
| 3131 | 3131 |
| 3132 ResolvedAst get resolvedAst { | 3132 ResolvedAst get resolvedAst { |
| 3133 return new ResolvedAst( | 3133 return new ResolvedAst( |
| 3134 declaration, definingElement.node, definingElement.treeElements); | 3134 declaration, definingElement.node, definingElement.treeElements); |
| 3135 } | 3135 } |
| 3136 } | 3136 } |
| OLD | NEW |