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

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

Issue 206013004: Fix for queue closed crash (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « no previous file | tests/compiler/dart2js_extra/mirror_enqueuer_regression_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/enqueue.dart
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index c700d5924fe2a0ed6950bdf43548d8307920e0ba..47150a055febcbc1177a5ad64f11e637e76a83cf 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -85,7 +85,8 @@ abstract class Enqueuer {
EnqueueTask task;
native.NativeEnqueuer nativeEnqueuer; // Set by EnqueueTask
- bool hasEnqueuedReflectiveElements = false;
+ bool hasEnqueuedEverything = false;
+ bool hasEnqueuedReflectiveStaticFields = false;
Enqueuer(this.name, this.compiler, this.itemCompilationContextCreator);
@@ -359,7 +360,7 @@ abstract class Enqueuer {
}
void enqueueEverything() {
- if (hasEnqueuedReflectiveElements) return;
+ if (hasEnqueuedEverything) return;
compiler.log('Enqueuing everything');
task.ensureAllElementsByName();
for (Link link in task.allElementsByName.values) {
@@ -367,14 +368,15 @@ abstract class Enqueuer {
pretendElementWasUsed(element, compiler.globalDependencies);
}
}
- hasEnqueuedReflectiveElements = true;
+ hasEnqueuedEverything = true;
+ hasEnqueuedReflectiveStaticFields = true;
}
/// Enqueue the static fields that have been marked as used by reflective
/// usage through `MirrorsUsed`.
void enqueueReflectiveStaticFields(Iterable<Element> elements) {
- if (hasEnqueuedReflectiveElements) return;
- hasEnqueuedReflectiveElements = true;
+ if (hasEnqueuedReflectiveStaticFields) return;
+ hasEnqueuedReflectiveStaticFields = true;
for (Element element in elements) {
pretendElementWasUsed(element, compiler.globalDependencies);
}
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/mirror_enqueuer_regression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698