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

Unified Diff: dart/lib/compiler/implementation/enqueue.dart

Issue 10836235: Check overrides. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 4 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 | « dart/lib/compiler/implementation/elements/elements.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/enqueue.dart
diff --git a/dart/lib/compiler/implementation/enqueue.dart b/dart/lib/compiler/implementation/enqueue.dart
index e21ebce5fff3fa9346132d6977ae7320d96ef2ec..0dc6bf8d2a94702db757d6a86d8da619861289b1 100644
--- a/dart/lib/compiler/implementation/enqueue.dart
+++ b/dart/lib/compiler/implementation/enqueue.dart
@@ -219,12 +219,22 @@ class Enqueuer {
void onRegisterInstantiatedClass(ClassElement cls) {
task.measure(() {
- while (cls !== null) {
- if (seenClasses.contains(cls)) return;
+ // The class must be resolved to compute the set of all
+ // supertypes.
+ cls.ensureResolved(compiler);
+
+ for (Link<Type> supertypes = cls.allSupertypesAndSelf;
+ !supertypes.isEmpty(); supertypes = supertypes.tail) {
+ cls = supertypes.head.element;
+ if (seenClasses.contains(cls)) continue;
seenClasses.add(cls);
cls.ensureResolved(compiler);
- cls.localMembers.forEach(processInstantiatedClassMember);
- cls = cls.superclass;
+ if (!cls.isInterface()) {
+ cls.localMembers.forEach(processInstantiatedClassMember);
+ }
+ if (isResolutionQueue) {
+ compiler.resolver.checkMembers(cls);
+ }
}
});
}
« no previous file with comments | « dart/lib/compiler/implementation/elements/elements.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698