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