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

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

Issue 2360603002: Roll kernel to latest and add baseline test. (Closed)
Patch Set: dartfmt Created 4 years, 3 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
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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 accept(ElementVisitor visitor, arg) { 1235 accept(ElementVisitor visitor, arg) {
1236 return visitor.visitConstructorElement(this, arg); 1236 return visitor.visitConstructorElement(this, arg);
1237 } 1237 }
1238 1238
1239 @override 1239 @override
1240 bool get isConst => _decoder.getBool(Key.IS_CONST); 1240 bool get isConst => _decoder.getBool(Key.IS_CONST);
1241 1241
1242 @override 1242 @override
1243 bool get isExternal => _decoder.getBool(Key.IS_EXTERNAL); 1243 bool get isExternal => _decoder.getBool(Key.IS_EXTERNAL);
1244 1244
1245 @override
1246 bool get isDefaultConstructor => false;
1247
1245 ConstantConstructor get constantConstructor { 1248 ConstantConstructor get constantConstructor {
1246 if (isConst && _constantConstructor == null) { 1249 if (isConst && _constantConstructor == null) {
1247 ObjectDecoder data = 1250 ObjectDecoder data =
1248 _decoder.getObject(Key.CONSTRUCTOR, isOptional: true); 1251 _decoder.getObject(Key.CONSTRUCTOR, isOptional: true);
1249 if (data == null) { 1252 if (data == null) {
1250 assert(isFromEnvironmentConstructor || isExternal); 1253 assert(isFromEnvironmentConstructor || isExternal);
1251 return null; 1254 return null;
1252 } 1255 }
1253 _constantConstructor = ConstantConstructorDeserializer.deserialize(data); 1256 _constantConstructor = ConstantConstructorDeserializer.deserialize(data);
1254 } 1257 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 class DefaultConstructorElementZ extends ConstructorElementZ { 1316 class DefaultConstructorElementZ extends ConstructorElementZ {
1314 DefaultConstructorElementZ(ObjectDecoder decoder) : super(decoder); 1317 DefaultConstructorElementZ(ObjectDecoder decoder) : super(decoder);
1315 1318
1316 @override 1319 @override
1317 ElementKind get kind => ElementKind.GENERATIVE_CONSTRUCTOR; 1320 ElementKind get kind => ElementKind.GENERATIVE_CONSTRUCTOR;
1318 1321
1319 @override 1322 @override
1320 bool get isSynthesized => true; 1323 bool get isSynthesized => true;
1321 1324
1322 @override 1325 @override
1326 bool get isDefaultConstructor => true;
1327
1328 @override
1323 ConstructorElement get definingConstructor { 1329 ConstructorElement get definingConstructor {
1324 return enclosingClass.superclass.lookupConstructor(''); 1330 return enclosingClass.superclass.lookupConstructor('');
1325 } 1331 }
1326 } 1332 }
1327 1333
1328 class FactoryConstructorElementZ extends ConstructorElementZ { 1334 class FactoryConstructorElementZ extends ConstructorElementZ {
1329 FactoryConstructorElementZ(ObjectDecoder decoder) : super(decoder); 1335 FactoryConstructorElementZ(ObjectDecoder decoder) : super(decoder);
1330 1336
1331 @override 1337 @override
1332 ElementKind get kind => ElementKind.FACTORY_CONSTRUCTOR; 1338 ElementKind get kind => ElementKind.FACTORY_CONSTRUCTOR;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 @override 1439 @override
1434 DartType computeType(Resolution resolution) => type; 1440 DartType computeType(Resolution resolution) => type;
1435 1441
1436 @override 1442 @override
1437 bool get isConst => false; 1443 bool get isConst => false;
1438 1444
1439 @override 1445 @override
1440 bool get isClassMember => true; 1446 bool get isClassMember => true;
1441 1447
1442 @override 1448 @override
1449 bool get isDefaultConstructor => false;
1450
1451 @override
1443 ConstantConstructor get constantConstructor => null; 1452 ConstantConstructor get constantConstructor => null;
1444 1453
1445 @override 1454 @override
1446 bool get hasEffectiveTarget => true; 1455 bool get hasEffectiveTarget => true;
1447 1456
1448 @override 1457 @override
1449 ConstructorElement get effectiveTarget => this; 1458 ConstructorElement get effectiveTarget => this;
1450 1459
1451 @override 1460 @override
1452 Element get enclosingElement => enclosingClass; 1461 Element get enclosingElement => enclosingClass;
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 } 2398 }
2390 2399
2391 @override 2400 @override
2392 Node get node => throw new UnsupportedError('${this}.node'); 2401 Node get node => throw new UnsupportedError('${this}.node');
2393 2402
2394 @override 2403 @override
2395 bool get hasNode => false; 2404 bool get hasNode => false;
2396 2405
2397 String toString() => 'MetadataAnnotationZ(${constant.toDartText()})'; 2406 String toString() => 'MetadataAnnotationZ(${constant.toDartText()})';
2398 } 2407 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel_visitor.dart ('k') | tests/compiler/dart2js/kernel/visitor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698