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

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

Issue 10964016: Change the type inference for fields in dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final round of changes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/enqueue.dart
diff --git a/lib/compiler/implementation/enqueue.dart b/lib/compiler/implementation/enqueue.dart
index 80702e7a6ed6cd5dad203d5a4716ceb1401fa17f..2980c2538d50a86bed996afd095ec439d2d14ab0 100644
--- a/lib/compiler/implementation/enqueue.dart
+++ b/lib/compiler/implementation/enqueue.dart
@@ -19,35 +19,6 @@ class EnqueueTask extends CompilerTask {
}
}
-class RecompilationQueue {
- final Function itemCompilationContextCreator;
- final Queue<WorkItem> queue;
- final Set<Element> queueElements;
- int processed = 0;
-
- RecompilationQueue(ItemCompilationContext itemCompilationContextCreator())
- : this.itemCompilationContextCreator = itemCompilationContextCreator,
- queue = new Queue<WorkItem>(),
- queueElements = new Set<Element>();
-
- void add(Element element, TreeElements elements) {
- if (queueElements.contains(element)) return;
- queueElements.add(element);
- queue.add(new WorkItem(element, elements, itemCompilationContextCreator()));
- }
-
- int get length => queue.length;
-
- bool isEmpty() => queue.isEmpty();
-
- WorkItem next() {
- WorkItem item = queue.removeLast();
- queueElements.remove(item.element);
- processed++;
- return item;
- }
-}
-
class Enqueuer {
final String name;
final Compiler compiler; // TODO(ahe): Remove this dependency.
@@ -64,7 +35,6 @@ class Enqueuer {
* Invariant: Key elements are declaration elements.
*/
final Map<Element, TreeElements> resolvedElements;
- final RecompilationQueue recompilationCandidates;
bool queueIsClosed = false;
EnqueueTask task;
@@ -76,9 +46,7 @@ class Enqueuer {
seenClasses = new Set<ClassElement>(),
universe = new Universe(),
queue = new Queue<WorkItem>(),
- resolvedElements = new Map<Element, TreeElements>(),
- recompilationCandidates =
- new RecompilationQueue(itemCompilationContextCreator);
+ resolvedElements = new Map<Element, TreeElements>();
bool get isResolutionQueue => compiler.enqueuer.resolution === this;
@@ -110,7 +78,6 @@ class Enqueuer {
void addToWorkList(Element element, [TreeElements elements]) {
assert(invariant(element, element.isDeclaration));
if (element.isForeign()) return;
- if (compiler.phase == Compiler.PHASE_RECOMPILING) return;
if (queueIsClosed) {
if (isResolutionQueue && getCachedElements(element) !== null) return;
compiler.internalErrorOnElement(element, "Work list is closed.");
@@ -156,14 +123,6 @@ class Enqueuer {
addToWorkList(element);
}
- void registerRecompilationCandidate(Element element,
- [TreeElements elements]) {
- if (queueIsClosed) {
- compiler.internalErrorOnElement(element, "$name work list is closed.");
- }
- recompilationCandidates.add(element, elements);
- }
-
void registerInstantiatedClass(ClassElement cls) {
if (cls.isInterface()) {
compiler.internalErrorOnElement(
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698