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

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: 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 a10840fbfe7b32c7d8379f409fd3d052260b4d52..2430c0bbc6da9c2f7e554b8a09ef0bbae025727c 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1769,7 +1769,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);
@@ -1792,12 +1792,6 @@ class _UnitResynthesizer {
return classElement;
}
- void buildCodeRange(ElementImpl element, CodeRange codeRange) {
- if (codeRange != null) {
- element.setCodeRange(codeRange.offset, codeRange.length);
- }
- }
-
/**
* Resynthesize a [NamespaceCombinator].
*/
@@ -1923,15 +1917,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);

Powered by Google App Engine
This is Rietveld 408576698