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

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

Issue 2027893002: Start separating ClassElementImpl for Class and Enum. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweaks Created 4 years, 7 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 034aa0b782803e9ccbae76c0b2598d76cdb5a9e7..84fbcdea443b62635fe6959bd0da22cf1704c849 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1757,7 +1757,7 @@ class _UnitResynthesizer {
ClassElementImpl buildClassImpl(
UnlinkedClass serializedClass, ClassElementHandle handle) {
ClassElementImpl classElement =
- new ClassElementImpl.forSerialized(serializedClass, unit);
+ new ClassElementImpl_Class.forSerialized(serializedClass, unit);
classElement.hasBeenInferred = summaryResynthesizer.strongMode;
InterfaceTypeImpl correspondingType =
new InterfaceTypeImpl(handle ?? classElement);
@@ -1780,12 +1780,6 @@ class _UnitResynthesizer {
return classElement;
}
- void buildCodeRange(ElementImpl element, CodeRange codeRange) {
- if (codeRange != null) {
- element.setCodeRange(codeRange.offset, codeRange.length);
- }
- }
-
/**
* Resynthesize a [ConstructorElement] and place it in the given [holder].
* [classElement] is the element of the class for which this element is a
@@ -1890,15 +1884,11 @@ class _UnitResynthesizer {
*/
void buildEnum(UnlinkedEnum serializedEnum) {
assert(!libraryResynthesizer.isCoreLibrary);
- ClassElementImpl classElement =
- new ClassElementImpl(serializedEnum.name, serializedEnum.nameOffset);
- classElement.enum2 = true;
+ ClassElementImpl_Enum classElement =
+ new ClassElementImpl_Enum.forSerialized(serializedEnum, unit);
InterfaceType enumType = new InterfaceTypeImpl(classElement);
classElement.type = enumType;
classElement.supertype = typeProvider.objectType;
- buildDocumentation(classElement, serializedEnum.documentationComment);
- buildAnnotations(classElement, serializedEnum.annotations);
- buildCodeRange(classElement, serializedEnum.codeRange);
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