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

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

Issue 10915063: Fix type annotation, spotted by checked mode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 seenClasses = new Set<ClassElement>(), 68 seenClasses = new Set<ClassElement>(),
69 universe = new Universe(), 69 universe = new Universe(),
70 queue = new Queue<WorkItem>(), 70 queue = new Queue<WorkItem>(),
71 resolvedElements = new Map<Element, TreeElements>(), 71 resolvedElements = new Map<Element, TreeElements>(),
72 recompilationCandidates = 72 recompilationCandidates =
73 new RecompilationQueue(itemCompilationContextCreator); 73 new RecompilationQueue(itemCompilationContextCreator);
74 74
75 bool get isResolutionQueue => compiler.enqueuer.resolution === this; 75 bool get isResolutionQueue => compiler.enqueuer.resolution === this;
76 76
77 TreeElements getCachedElements(Element element) { 77 TreeElements getCachedElements(Element element) {
78 // TODO(ngeoffray): Get rid of this check.
78 if (element.enclosingElement.isClosure()) { 79 if (element.enclosingElement.isClosure()) {
79 ClosureClassElement cls = element.enclosingElement; 80 closureMapping.ClosureClassElement cls = element.enclosingElement;
80 element = cls.methodElement; 81 element = cls.methodElement;
81 } 82 }
82 Element owner = element.getOutermostEnclosingMemberOrTopLevel(); 83 Element owner = element.getOutermostEnclosingMemberOrTopLevel();
83 return compiler.enqueuer.resolution.resolvedElements[owner]; 84 return compiler.enqueuer.resolution.resolvedElements[owner];
84 } 85 }
85 86
86 String lookupCode(Element element) => 87 String lookupCode(Element element) =>
87 universe.generatedCode[element].toString(); 88 universe.generatedCode[element].toString();
88 89
89 void addToWorkList(Element element, [TreeElements elements]) { 90 void addToWorkList(Element element, [TreeElements elements]) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void registerIsCheck(Element element) { 352 void registerIsCheck(Element element) {
352 universe.isChecks.add(element); 353 universe.isChecks.add(element);
353 } 354 }
354 355
355 void forEach(f(WorkItem work)) { 356 void forEach(f(WorkItem work)) {
356 while (!queue.isEmpty()) { 357 while (!queue.isEmpty()) {
357 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? 358 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst?
358 } 359 }
359 } 360 }
360 } 361 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698