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 '../compiler.dart' show | 7 import '../compiler.dart' show |
8 Compiler, | 8 Compiler, |
9 isPrivateName; | 9 isPrivateName; |
10 import '../constants/constant_constructors.dart'; | 10 import '../constants/constant_constructors.dart'; |
(...skipping 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2319 int get hashCode => id; | 2319 int get hashCode => id; |
2320 | 2320 |
2321 bool get hasBackendMembers => !backendMembers.isEmpty; | 2321 bool get hasBackendMembers => !backendMembers.isEmpty; |
2322 | 2322 |
2323 bool get isUnnamedMixinApplication => false; | 2323 bool get isUnnamedMixinApplication => false; |
2324 | 2324 |
2325 @override | 2325 @override |
2326 bool get isEnumClass => false; | 2326 bool get isEnumClass => false; |
2327 | 2327 |
2328 InterfaceType computeType(Compiler compiler) { | 2328 InterfaceType computeType(Compiler compiler) { |
2329 if (thisTypeCache == null) { | 2329 if (isPatch) { |
| 2330 origin.computeType(compiler); |
| 2331 thisTypeCache = origin.thisType; |
| 2332 rawTypeCache = origin.rawType; |
| 2333 } else if (thisTypeCache == null) { |
2330 computeThisAndRawType(compiler, computeTypeParameters(compiler)); | 2334 computeThisAndRawType(compiler, computeTypeParameters(compiler)); |
2331 } | 2335 } |
2332 return thisTypeCache; | 2336 return thisTypeCache; |
2333 } | 2337 } |
2334 | 2338 |
2335 void computeThisAndRawType(Compiler compiler, List<DartType> typeVariables) { | 2339 void computeThisAndRawType(Compiler compiler, List<DartType> typeVariables) { |
2336 if (thisTypeCache == null) { | 2340 if (thisTypeCache == null) { |
2337 if (origin == null) { | 2341 if (origin == null) { |
2338 setThisAndRawTypes(compiler, typeVariables); | 2342 setThisAndRawTypes(compiler, typeVariables); |
2339 } else { | 2343 } else { |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2910 AstElement get definingElement; | 2914 AstElement get definingElement; |
2911 | 2915 |
2912 bool get hasResolvedAst => definingElement.hasTreeElements; | 2916 bool get hasResolvedAst => definingElement.hasTreeElements; |
2913 | 2917 |
2914 ResolvedAst get resolvedAst { | 2918 ResolvedAst get resolvedAst { |
2915 return new ResolvedAst(declaration, | 2919 return new ResolvedAst(declaration, |
2916 definingElement.node, definingElement.treeElements); | 2920 definingElement.node, definingElement.treeElements); |
2917 } | 2921 } |
2918 | 2922 |
2919 } | 2923 } |
OLD | NEW |