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

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 2038153003: Create ClassElement.type lazily in ClassElementImpl and EnumElementImpl. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index f6e197fba4f77a738f880c3927c47dd3deba07dd..ccca984b305500d4243a0c1d7119b26294ae6fe0 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1527,10 +1527,6 @@ class _UnitResynthesizer {
ClassElementImpl classElement =
new ClassElementImpl.forSerialized(serializedClass, unit);
classElement.hasBeenInferred = summaryResynthesizer.strongMode;
- InterfaceTypeImpl correspondingType = new InterfaceTypeImpl(classElement);
- // TODO(scheglov) move to ClassElementImpl
- correspondingType.typeArguments = classElement.typeParameterTypes;
- classElement.type = correspondingType;
unitHolder.addType(classElement);
}
@@ -1555,8 +1551,7 @@ class _UnitResynthesizer {
assert(!libraryResynthesizer.isCoreLibrary);
EnumElementImpl classElement =
new EnumElementImpl.forSerialized(serializedEnum, unit);
- InterfaceType enumType = new InterfaceTypeImpl(classElement);
- classElement.type = enumType;
+ InterfaceType enumType = classElement.type;
ElementHolder memberHolder = new ElementHolder();
// Build the 'index' field.
FieldElementImpl indexField = new FieldElementImpl('index', -1);
« no previous file with comments | « pkg/analyzer/lib/src/generated/testing/element_factory.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698