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

Unified Diff: pkg/compiler/lib/src/resolution/resolution.dart

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/signatures.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/resolution.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index 3210976f26fdeb20a402e163f5725683ea2d797a..b844779104f284bc83e800cca59af1db8162669c 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -184,20 +184,22 @@ class ResolverTask extends CompilerTask {
{'modifier': element.asyncMarker});
}
}
+ ClassElement cls;
switch (element.asyncMarker) {
case AsyncMarker.ASYNC:
registry.registerFeature(Feature.ASYNC);
- commonElements.futureClass.ensureResolved(resolution);
+ cls = commonElements.futureClass;
break;
case AsyncMarker.ASYNC_STAR:
registry.registerFeature(Feature.ASYNC_STAR);
- commonElements.streamClass.ensureResolved(resolution);
+ cls = commonElements.streamClass;
break;
case AsyncMarker.SYNC_STAR:
registry.registerFeature(Feature.SYNC_STAR);
- commonElements.iterableClass.ensureResolved(resolution);
+ cls = commonElements.iterableClass;
break;
}
+ cls?.ensureResolved(resolution);
}
}
}
@@ -541,8 +543,8 @@ class ResolverTask extends CompilerTask {
from, MessageKind.CYCLIC_CLASS_HIERARCHY, {'className': cls.name});
cls.supertypeLoadState = STATE_DONE;
cls.hasIncompleteHierarchy = true;
- cls.allSupertypesAndSelf = commonElements
- .objectClass.allSupertypesAndSelf
+ ClassElement objectClass = commonElements.objectClass;
+ cls.allSupertypesAndSelf = objectClass.allSupertypesAndSelf
.extendClass(cls.computeType(resolution));
cls.supertype = cls.allSupertypes.head;
assert(invariant(from, cls.supertype != null,
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/signatures.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698