Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Side by Side Diff: pkg/compiler/lib/src/serialization/modelz.dart

Issue 1299413002: Move common identifiers, names and selectors to a separate library. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 with ClassMemberMixin, InstanceMemberMixin { 1226 with ClassMemberMixin, InstanceMemberMixin {
1227 InstanceSetterElementZ(ObjectDecoder decoder) 1227 InstanceSetterElementZ(ObjectDecoder decoder)
1228 : super(decoder); 1228 : super(decoder);
1229 } 1229 }
1230 1230
1231 abstract class TypeDeclarationMixin<T extends GenericType> 1231 abstract class TypeDeclarationMixin<T extends GenericType>
1232 implements DeserializedElementZ, TypeDeclarationElement { 1232 implements DeserializedElementZ, TypeDeclarationElement {
1233 List<DartType> _typeVariables; 1233 List<DartType> _typeVariables;
1234 T _rawType; 1234 T _rawType;
1235 T _thisType; 1235 T _thisType;
1236 Name _memberName;
1237
1238 Name get memberName {
1239 if (_memberName == null) {
1240 _memberName = new Name(name, library);
1241 }
1242 return _memberName;
1243 }
1236 1244
1237 void _ensureTypes() { 1245 void _ensureTypes() {
1238 if (_typeVariables == null) { 1246 if (_typeVariables == null) {
1239 _typeVariables = _decoder.getTypes( 1247 _typeVariables = _decoder.getTypes(
1240 Key.TYPE_VARIABLES, isOptional: true); 1248 Key.TYPE_VARIABLES, isOptional: true);
1241 _rawType = _createType(new List<DartType>.filled( 1249 _rawType = _createType(new List<DartType>.filled(
1242 _typeVariables.length, const DynamicType())); 1250 _typeVariables.length, const DynamicType()));
1243 _thisType = _createType(_typeVariables); 1251 _thisType = _createType(_typeVariables);
1244 } 1252 }
1245 } 1253 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 } 1319 }
1312 1320
1313 class TypeVariableElementZ extends DeserializedElementZ 1321 class TypeVariableElementZ extends DeserializedElementZ
1314 with AnalyzableElementMixin, 1322 with AnalyzableElementMixin,
1315 AstElementMixin, 1323 AstElementMixin,
1316 TypedElementMixin 1324 TypedElementMixin
1317 implements TypeVariableElement { 1325 implements TypeVariableElement {
1318 TypeDeclarationElement _typeDeclaration; 1326 TypeDeclarationElement _typeDeclaration;
1319 TypeVariableType _type; 1327 TypeVariableType _type;
1320 DartType _bound; 1328 DartType _bound;
1329 Name _memberName;
1321 1330
1322 TypeVariableElementZ(ObjectDecoder decoder) 1331 TypeVariableElementZ(ObjectDecoder decoder)
1323 : super(decoder); 1332 : super(decoder);
1324 1333
1334 Name get memberName {
1335 if (_memberName == null) {
1336 _memberName = new Name(name, library);
1337 }
1338 return _memberName;
1339 }
1340
1325 @override 1341 @override
1326 ElementKind get kind => ElementKind.TYPE_VARIABLE; 1342 ElementKind get kind => ElementKind.TYPE_VARIABLE;
1327 1343
1328 @override 1344 @override
1329 accept(ElementVisitor visitor, arg) { 1345 accept(ElementVisitor visitor, arg) {
1330 return visitor.visitTypeVariableElement(this, arg); 1346 return visitor.visitTypeVariableElement(this, arg);
1331 } 1347 }
1332 1348
1333 @override 1349 @override
1334 CompilationUnitElement get compilationUnit { 1350 CompilationUnitElement get compilationUnit {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 1466
1451 @override 1467 @override
1452 accept(ElementVisitor visitor, arg) { 1468 accept(ElementVisitor visitor, arg) {
1453 return visitor.visitFieldParameterElement(this, arg); 1469 return visitor.visitFieldParameterElement(this, arg);
1454 } 1470 }
1455 1471
1456 @override 1472 @override
1457 ElementKind get kind => ElementKind.INITIALIZING_FORMAL; 1473 ElementKind get kind => ElementKind.INITIALIZING_FORMAL;
1458 1474
1459 } 1475 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698