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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 if (_parameters == null) { | 741 if (_parameters == null) { |
742 _parameters = _decoder.getElements(Key.PARAMETERS, isOptional: true); | 742 _parameters = _decoder.getElements(Key.PARAMETERS, isOptional: true); |
743 } | 743 } |
744 return _parameters; | 744 return _parameters; |
745 } | 745 } |
746 } | 746 } |
747 | 747 |
748 abstract class FunctionTypedElementMixin | 748 abstract class FunctionTypedElementMixin |
749 implements FunctionElement, DeserializedElementZ { | 749 implements FunctionElement, DeserializedElementZ { |
750 @override | 750 @override |
751 AsyncMarker get asyncMarker => _unsupported('asyncMarker'); | |
752 | |
753 @override | |
754 FunctionElement asFunctionElement() => this; | 751 FunctionElement asFunctionElement() => this; |
755 | 752 |
756 @override | 753 @override |
757 bool get isExternal { | 754 bool get isExternal { |
758 return _decoder.getBool(Key.IS_EXTERNAL, | 755 return _decoder.getBool(Key.IS_EXTERNAL, |
759 isOptional: true, defaultValue: false); | 756 isOptional: true, defaultValue: false); |
760 } | 757 } |
761 } | 758 } |
762 | 759 |
763 abstract class ClassElementMixin implements ElementZ, ClassElement { | 760 abstract class ClassElementMixin implements ElementZ, ClassElement { |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 | 1330 |
1334 abstract class MemberElementMixin | 1331 abstract class MemberElementMixin |
1335 implements DeserializedElementZ, MemberElement { | 1332 implements DeserializedElementZ, MemberElement { |
1336 @override | 1333 @override |
1337 MemberElement get memberContext => this; | 1334 MemberElement get memberContext => this; |
1338 | 1335 |
1339 @override | 1336 @override |
1340 Name get memberName => new Name(name, library); | 1337 Name get memberName => new Name(name, library); |
1341 | 1338 |
1342 @override | 1339 @override |
1343 List<FunctionElement> get nestedClosures => const <FunctionElement>[]; | 1340 List<FunctionElement> get nestedClosures => <FunctionElement>[]; |
1344 } | 1341 } |
1345 | 1342 |
1346 abstract class FieldElementZ extends DeserializedElementZ | 1343 abstract class FieldElementZ extends DeserializedElementZ |
1347 with | 1344 with |
1348 AnalyzableElementMixin, | 1345 AnalyzableElementMixin, |
1349 AstElementMixin, | 1346 AstElementMixin, |
1350 TypedElementMixin, | 1347 TypedElementMixin, |
1351 MemberElementMixin | 1348 MemberElementMixin |
1352 implements FieldElement { | 1349 implements FieldElement { |
1353 bool _isConst; | 1350 bool _isConst; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 implements LocalFunctionElement { | 1496 implements LocalFunctionElement { |
1500 LocalFunctionElementZ(ObjectDecoder decoder) : super(decoder); | 1497 LocalFunctionElementZ(ObjectDecoder decoder) : super(decoder); |
1501 | 1498 |
1502 @override | 1499 @override |
1503 accept(ElementVisitor visitor, arg) { | 1500 accept(ElementVisitor visitor, arg) { |
1504 return visitor.visitLocalFunctionElement(this, arg); | 1501 return visitor.visitLocalFunctionElement(this, arg); |
1505 } | 1502 } |
1506 | 1503 |
1507 @override | 1504 @override |
1508 ElementKind get kind => ElementKind.FUNCTION; | 1505 ElementKind get kind => ElementKind.FUNCTION; |
| 1506 |
| 1507 @override |
| 1508 AsyncMarker get asyncMarker { |
| 1509 return _decoder.getEnum(Key.ASYNC_MARKER, AsyncMarker.values); |
| 1510 } |
1509 } | 1511 } |
1510 | 1512 |
1511 abstract class GetterElementZ extends DeserializedElementZ | 1513 abstract class GetterElementZ extends DeserializedElementZ |
1512 with | 1514 with |
1513 AnalyzableElementMixin, | 1515 AnalyzableElementMixin, |
1514 AstElementMixin, | 1516 AstElementMixin, |
1515 FunctionTypedElementMixin, | 1517 FunctionTypedElementMixin, |
1516 ParametersMixin, | 1518 ParametersMixin, |
1517 TypedElementMixin, | 1519 TypedElementMixin, |
1518 MemberElementMixin | 1520 MemberElementMixin |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 } | 2082 } |
2081 | 2083 |
2082 @override | 2084 @override |
2083 ElementKind get kind => ElementKind.PREFIX; | 2085 ElementKind get kind => ElementKind.PREFIX; |
2084 | 2086 |
2085 @override | 2087 @override |
2086 Element lookupLocalMember(String memberName) { | 2088 Element lookupLocalMember(String memberName) { |
2087 return _unsupported('lookupLocalMember'); | 2089 return _unsupported('lookupLocalMember'); |
2088 } | 2090 } |
2089 } | 2091 } |
OLD | NEW |