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

Side by Side Diff: dart/lib/compiler/implementation/enqueue.dart

Issue 10836235: Check overrides. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class EnqueueTask extends CompilerTask { 5 class EnqueueTask extends CompilerTask {
6 final Enqueuer codegen; 6 final Enqueuer codegen;
7 final Enqueuer resolution; 7 final Enqueuer resolution;
8 8
9 String get name() => 'Enqueue'; 9 String get name() => 'Enqueue';
10 10
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 } else if (member.kind === ElementKind.SETTER) { 208 } else if (member.kind === ElementKind.SETTER) {
209 if (universe.hasInvokedSetter(member, compiler)) { 209 if (universe.hasInvokedSetter(member, compiler)) {
210 return addToWorkList(member); 210 return addToWorkList(member);
211 } 211 }
212 } 212 }
213 } 213 }
214 214
215 void onRegisterInstantiatedClass(ClassElement cls) { 215 void onRegisterInstantiatedClass(ClassElement cls) {
216 task.measure(() { 216 task.measure(() {
217 while (cls !== null) { 217 cls.ensureResolved(compiler); // So allSupertypesAndSelf works.
karlklose 2012/08/14 11:06:51 How about something like 'Compute set of all super
ahe 2012/08/14 18:20:34 Done.
218 if (seenClasses.contains(cls)) return; 218 for (Link<Type> supertypes = cls.allSupertypesAndSelf;
219 !supertypes.isEmpty(); supertypes = supertypes.tail) {
220 cls = supertypes.head.element;
221 if (seenClasses.contains(cls)) continue;
219 seenClasses.add(cls); 222 seenClasses.add(cls);
220 cls.ensureResolved(compiler); 223 cls.ensureResolved(compiler);
221 cls.members.forEach(processInstantiatedClassMember); 224 if (!cls.isInterface()) {
222 cls = cls.superclass; 225 cls.members.forEach(processInstantiatedClassMember);
226 }
227 if (isResolutionQueue) {
228 compiler.resolver.checkMembers(cls);
229 }
223 } 230 }
224 }); 231 });
225 } 232 }
226 233
227 void registerNewSelector(SourceString name, 234 void registerNewSelector(SourceString name,
228 Selector selector, 235 Selector selector,
229 Map<SourceString, Set<Selector>> selectorsMap) { 236 Map<SourceString, Set<Selector>> selectorsMap) {
230 Set<Selector> selectors = 237 Set<Selector> selectors =
231 selectorsMap.putIfAbsent(name, () => new Set<Selector>()); 238 selectorsMap.putIfAbsent(name, () => new Set<Selector>());
232 if (!selectors.contains(selector)) { 239 if (!selectors.contains(selector)) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void forEach(f(WorkItem work)) { 332 void forEach(f(WorkItem work)) {
326 while (!queue.isEmpty()) { 333 while (!queue.isEmpty()) {
327 do { 334 do {
328 f(queue.removeLast()); 335 f(queue.removeLast());
329 } while (!queue.isEmpty()); 336 } while (!queue.isEmpty());
330 // TODO(ahe): we shouldn't register the field closure invocations here. 337 // TODO(ahe): we shouldn't register the field closure invocations here.
331 registerFieldClosureInvocations(); 338 registerFieldClosureInvocations();
332 } 339 }
333 } 340 }
334 } 341 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698