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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 abstract class FunctionTypedElementMixin | 748 abstract class FunctionTypedElementMixin |
749 implements FunctionElement, DeserializedElementZ { | 749 implements FunctionElement, DeserializedElementZ { |
750 @override | 750 @override |
751 FunctionElement asFunctionElement() => this; | 751 FunctionElement asFunctionElement() => this; |
752 | 752 |
753 @override | 753 @override |
754 bool get isExternal { | 754 bool get isExternal { |
755 return _decoder.getBool(Key.IS_EXTERNAL, | 755 return _decoder.getBool(Key.IS_EXTERNAL, |
756 isOptional: true, defaultValue: false); | 756 isOptional: true, defaultValue: false); |
757 } | 757 } |
| 758 |
| 759 @override |
| 760 List<DartType> get typeVariables => functionSignature.typeVariables; |
758 } | 761 } |
759 | 762 |
760 abstract class ClassElementMixin implements ElementZ, ClassElement { | 763 abstract class ClassElementMixin implements ElementZ, ClassElement { |
761 InterfaceType _createType(List<DartType> typeArguments) { | 764 InterfaceType _createType(List<DartType> typeArguments) { |
762 return new InterfaceType(this, typeArguments); | 765 return new InterfaceType(this, typeArguments); |
763 } | 766 } |
764 | 767 |
765 @override | 768 @override |
766 ElementKind get kind => ElementKind.CLASS; | 769 ElementKind get kind => ElementKind.CLASS; |
767 | 770 |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 | 1327 |
1325 @override | 1328 @override |
1326 SourceSpan get sourcePosition => enclosingClass.sourcePosition; | 1329 SourceSpan get sourcePosition => enclosingClass.sourcePosition; |
1327 | 1330 |
1328 @override | 1331 @override |
1329 FunctionType get type { | 1332 FunctionType get type { |
1330 // TODO(johnniwinther): Ensure that the function type substitutes type | 1333 // TODO(johnniwinther): Ensure that the function type substitutes type |
1331 // variables correctly. | 1334 // variables correctly. |
1332 return definingConstructor.type; | 1335 return definingConstructor.type; |
1333 } | 1336 } |
| 1337 |
| 1338 @override |
| 1339 List<DartType> get typeVariables => _unsupported("typeVariables"); |
1334 } | 1340 } |
1335 | 1341 |
1336 abstract class MemberElementMixin | 1342 abstract class MemberElementMixin |
1337 implements DeserializedElementZ, MemberElement { | 1343 implements DeserializedElementZ, MemberElement { |
1338 @override | 1344 @override |
1339 MemberElement get memberContext => this; | 1345 MemberElement get memberContext => this; |
1340 | 1346 |
1341 @override | 1347 @override |
1342 Name get memberName => new Name(name, library); | 1348 Name get memberName => new Name(name, library); |
1343 | 1349 |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1868 bool get isNamed => _decoder.getBool(Key.IS_NAMED); | 1874 bool get isNamed => _decoder.getBool(Key.IS_NAMED); |
1869 | 1875 |
1870 @override | 1876 @override |
1871 bool get isOptional => _decoder.getBool(Key.IS_OPTIONAL); | 1877 bool get isOptional => _decoder.getBool(Key.IS_OPTIONAL); |
1872 | 1878 |
1873 @override | 1879 @override |
1874 LibraryElement get library => executableContext.library; | 1880 LibraryElement get library => executableContext.library; |
1875 | 1881 |
1876 @override | 1882 @override |
1877 MemberElement get memberContext => executableContext.memberContext; | 1883 MemberElement get memberContext => executableContext.memberContext; |
| 1884 |
| 1885 @override |
| 1886 List<DartType> get typeVariables => functionSignature.typeVariables; |
1878 } | 1887 } |
1879 | 1888 |
1880 class LocalParameterElementZ extends ParameterElementZ | 1889 class LocalParameterElementZ extends ParameterElementZ |
1881 implements LocalParameterElement { | 1890 implements LocalParameterElement { |
1882 LocalParameterElementZ(ObjectDecoder decoder) : super(decoder); | 1891 LocalParameterElementZ(ObjectDecoder decoder) : super(decoder); |
1883 | 1892 |
1884 @override | 1893 @override |
1885 accept(ElementVisitor visitor, arg) { | 1894 accept(ElementVisitor visitor, arg) { |
1886 return visitor.visitParameterElement(this, arg); | 1895 return visitor.visitParameterElement(this, arg); |
1887 } | 1896 } |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2087 } | 2096 } |
2088 | 2097 |
2089 @override | 2098 @override |
2090 ElementKind get kind => ElementKind.PREFIX; | 2099 ElementKind get kind => ElementKind.PREFIX; |
2091 | 2100 |
2092 @override | 2101 @override |
2093 Element lookupLocalMember(String memberName) { | 2102 Element lookupLocalMember(String memberName) { |
2094 return _unsupported('lookupLocalMember'); | 2103 return _unsupported('lookupLocalMember'); |
2095 } | 2104 } |
2096 } | 2105 } |
OLD | NEW |