Index: dart/sdk/lib/_internal/compiler/implementation/enqueue.dart |
diff --git a/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart b/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart |
index cbfedd4e65844355ef385dfbc51ce1a56577be90..3de2cedd5b2e03404dbbe2fc53acba7335ef9a0d 100644 |
--- a/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart |
+++ b/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart |
@@ -857,9 +857,6 @@ class CodegenEnqueuer extends Enqueuer { |
} |
bool internalAddToWorkList(Element element) { |
- if (compiler.hasIncrementalSupport) { |
- newlyEnqueuedElements.add(element); |
- } |
// Don't generate code for foreign elements. |
if (element.isForeign(compiler.backend)) return false; |
@@ -872,6 +869,10 @@ class CodegenEnqueuer extends Enqueuer { |
} |
} |
+ if (compiler.hasIncrementalSupport && !isProcessed(element)) { |
+ newlyEnqueuedElements.add(element); |
+ } |
+ |
if (queueIsClosed) { |
throw new SpannableAssertionFailure(element, |
"Codegen work list is closed. Trying to add $element"); |