OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Implementation of the element model used for deserialiation. | 5 /// Implementation of the element model used for deserialiation. |
6 /// | 6 /// |
7 /// These classes are created by [ElementDeserializer] triggered by the | 7 /// These classes are created by [ElementDeserializer] triggered by the |
8 /// [Deserializer]. | 8 /// [Deserializer]. |
9 | 9 |
10 library dart2js.serialization.modelz; | 10 library dart2js.serialization.modelz; |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 ClassElement subclass, InterfaceType supertype, InterfaceType mixin) | 936 ClassElement subclass, InterfaceType supertype, InterfaceType mixin) |
937 : this._subclass = subclass, | 937 : this._subclass = subclass, |
938 this.supertype = supertype, | 938 this.supertype = supertype, |
939 this.interfaces = const Link<DartType>().prepend(mixin), | 939 this.interfaces = const Link<DartType>().prepend(mixin), |
940 this.name = "${supertype.name}+${mixin.name}"; | 940 this.name = "${supertype.name}+${mixin.name}"; |
941 | 941 |
942 @override | 942 @override |
943 CompilationUnitElement get compilationUnit => _subclass.compilationUnit; | 943 CompilationUnitElement get compilationUnit => _subclass.compilationUnit; |
944 | 944 |
945 @override | 945 @override |
| 946 bool get isTopLevel => true; |
| 947 |
| 948 @override |
946 bool get isUnnamedMixinApplication => true; | 949 bool get isUnnamedMixinApplication => true; |
947 | 950 |
948 Link<ConstructorElement> get constructors { | 951 Link<ConstructorElement> get constructors { |
949 if (_constructors == null) { | 952 if (_constructors == null) { |
950 LinkBuilder<ConstructorElement> builder = | 953 LinkBuilder<ConstructorElement> builder = |
951 new LinkBuilder<ConstructorElement>(); | 954 new LinkBuilder<ConstructorElement>(); |
952 for (ConstructorElement definingConstructor in superclass.constructors) { | 955 for (ConstructorElement definingConstructor in superclass.constructors) { |
953 if (definingConstructor.isGenerativeConstructor && | 956 if (definingConstructor.isGenerativeConstructor && |
954 definingConstructor.memberName.isAccessibleFrom(library)) { | 957 definingConstructor.memberName.isAccessibleFrom(library)) { |
955 builder.addLast( | 958 builder.addLast( |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 ConstantConstructor get constantConstructor => null; | 1257 ConstantConstructor get constantConstructor => null; |
1255 | 1258 |
1256 @override | 1259 @override |
1257 ConstructorElement get effectiveTarget => this; | 1260 ConstructorElement get effectiveTarget => this; |
1258 | 1261 |
1259 @override | 1262 @override |
1260 Element get enclosingElement => enclosingClass; | 1263 Element get enclosingElement => enclosingClass; |
1261 | 1264 |
1262 @override | 1265 @override |
1263 FunctionSignature get functionSignature { | 1266 FunctionSignature get functionSignature { |
1264 return _unsupported('functionSignature'); | 1267 // TODO(johnniwinther): Ensure that the function signature (and with it the |
| 1268 // function type) substitutes type variables correctly. |
| 1269 return definingConstructor.functionSignature; |
1265 } | 1270 } |
1266 | 1271 |
1267 @override | 1272 @override |
1268 bool get hasFunctionSignature { | 1273 bool get hasFunctionSignature { |
1269 return _unsupported('hasFunctionSignature'); | 1274 return _unsupported('hasFunctionSignature'); |
1270 } | 1275 } |
1271 | 1276 |
1272 @override | 1277 @override |
1273 ConstructorElement get immediateRedirectionTarget => null; | 1278 ConstructorElement get immediateRedirectionTarget => null; |
1274 | 1279 |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2101 } | 2106 } |
2102 | 2107 |
2103 @override | 2108 @override |
2104 ElementKind get kind => ElementKind.PREFIX; | 2109 ElementKind get kind => ElementKind.PREFIX; |
2105 | 2110 |
2106 @override | 2111 @override |
2107 Element lookupLocalMember(String memberName) { | 2112 Element lookupLocalMember(String memberName) { |
2108 return _unsupported('lookupLocalMember'); | 2113 return _unsupported('lookupLocalMember'); |
2109 } | 2114 } |
2110 } | 2115 } |
OLD | NEW |