| 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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 } | 1083 } |
| 1084 _constantConstructor = ConstantConstructorDeserializer.deserialize(data); | 1084 _constantConstructor = ConstantConstructorDeserializer.deserialize(data); |
| 1085 } | 1085 } |
| 1086 return _constantConstructor; | 1086 return _constantConstructor; |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 @override | 1089 @override |
| 1090 AsyncMarker get asyncMarker => AsyncMarker.SYNC; | 1090 AsyncMarker get asyncMarker => AsyncMarker.SYNC; |
| 1091 | 1091 |
| 1092 @override | 1092 @override |
| 1093 ConstructorElement get definingConstructor { | 1093 ConstructorElement get definingConstructor => null; |
| 1094 String name = | |
| 1095 _decoder.getString(Key.DEFINING_CONSTRUCTOR, isOptional: true); | |
| 1096 if (name != null) { | |
| 1097 return enclosingClass.superclass.lookupConstructor(name); | |
| 1098 } | |
| 1099 return null; | |
| 1100 } | |
| 1101 | 1094 |
| 1102 @override | 1095 @override |
| 1103 ConstructorElement get effectiveTarget { | 1096 ConstructorElement get effectiveTarget { |
| 1104 if (_effectiveTarget == null) { | 1097 if (_effectiveTarget == null) { |
| 1105 _effectiveTarget = | 1098 _effectiveTarget = |
| 1106 _decoder.getElement(Key.EFFECTIVE_TARGET, isOptional: true); | 1099 _decoder.getElement(Key.EFFECTIVE_TARGET, isOptional: true); |
| 1107 if (_effectiveTarget == null) { | 1100 if (_effectiveTarget == null) { |
| 1108 _effectiveTarget = this; | 1101 _effectiveTarget = this; |
| 1109 } | 1102 } |
| 1110 } | 1103 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1136 } | 1129 } |
| 1137 | 1130 |
| 1138 class GenerativeConstructorElementZ extends ConstructorElementZ { | 1131 class GenerativeConstructorElementZ extends ConstructorElementZ { |
| 1139 GenerativeConstructorElementZ(ObjectDecoder decoder) : super(decoder); | 1132 GenerativeConstructorElementZ(ObjectDecoder decoder) : super(decoder); |
| 1140 | 1133 |
| 1141 @override | 1134 @override |
| 1142 ElementKind get kind => ElementKind.GENERATIVE_CONSTRUCTOR; | 1135 ElementKind get kind => ElementKind.GENERATIVE_CONSTRUCTOR; |
| 1143 | 1136 |
| 1144 @override | 1137 @override |
| 1145 bool get isRedirectingGenerative => _decoder.getBool(Key.IS_REDIRECTING); | 1138 bool get isRedirectingGenerative => _decoder.getBool(Key.IS_REDIRECTING); |
| 1139 } |
| 1140 |
| 1141 class DefaultConstructorElementZ extends ConstructorElementZ { |
| 1142 DefaultConstructorElementZ(ObjectDecoder decoder) : super(decoder); |
| 1146 | 1143 |
| 1147 @override | 1144 @override |
| 1148 bool get isSynthesized => definingConstructor != null; | 1145 ElementKind get kind => ElementKind.GENERATIVE_CONSTRUCTOR; |
| 1146 |
| 1147 @override |
| 1148 bool get isSynthesized => true; |
| 1149 |
| 1150 @override |
| 1151 ConstructorElement get definingConstructor { |
| 1152 return enclosingClass.superclass.lookupConstructor(''); |
| 1153 } |
| 1149 } | 1154 } |
| 1150 | 1155 |
| 1151 class FactoryConstructorElementZ extends ConstructorElementZ { | 1156 class FactoryConstructorElementZ extends ConstructorElementZ { |
| 1152 FactoryConstructorElementZ(ObjectDecoder decoder) : super(decoder); | 1157 FactoryConstructorElementZ(ObjectDecoder decoder) : super(decoder); |
| 1153 | 1158 |
| 1154 @override | 1159 @override |
| 1155 ElementKind get kind => ElementKind.FACTORY_CONSTRUCTOR; | 1160 ElementKind get kind => ElementKind.FACTORY_CONSTRUCTOR; |
| 1156 } | 1161 } |
| 1157 | 1162 |
| 1158 class RedirectingFactoryConstructorElementZ extends ConstructorElementZ { | 1163 class RedirectingFactoryConstructorElementZ extends ConstructorElementZ { |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2080 } | 2085 } |
| 2081 | 2086 |
| 2082 @override | 2087 @override |
| 2083 ElementKind get kind => ElementKind.PREFIX; | 2088 ElementKind get kind => ElementKind.PREFIX; |
| 2084 | 2089 |
| 2085 @override | 2090 @override |
| 2086 Element lookupLocalMember(String memberName) { | 2091 Element lookupLocalMember(String memberName) { |
| 2087 return _unsupported('lookupLocalMember'); | 2092 return _unsupported('lookupLocalMember'); |
| 2088 } | 2093 } |
| 2089 } | 2094 } |
| OLD | NEW |