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

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

Issue 2531303002: Decouple WorkItem from Compiler (Closed)
Patch Set: Created 4 years, 1 month 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
Index: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index a68e3da8a999f763255025577e824a015564e2eb..9277ee41052496707f857e3dfe7c8690946d2b17 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -545,7 +545,11 @@ class ResolutionEnqueuer extends EnqueuerImpl {
do {
while (queue.isNotEmpty) {
// TODO(johnniwinther): Find an optimal process order.
- strategy.processWorkItem(f, queue.removeLast());
+ WorkItem work = queue.removeLast();
+ if (!isProcessed(work.element)) {
+ strategy.processWorkItem(f, work);
+ registerProcessedElement(work.element);
+ }
}
List recents = recentClasses.toList(growable: false);
recentClasses.clear();

Powered by Google App Engine
This is Rietveld 408576698