| 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 2be6abeb486337fa71450992c874c55211d9d12b..f4ee00c4b978e1839a4aab63d3a1126659b6bac5 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
|
| @@ -85,7 +85,7 @@ abstract class Enqueuer {
|
| EnqueueTask task;
|
| native.NativeEnqueuer nativeEnqueuer; // Set by EnqueueTask
|
|
|
| - bool hasEnqueuedEverything = false;
|
| + bool hasEnqueuedReflectiveElements = false;
|
|
|
| Enqueuer(this.name, this.compiler, this.itemCompilationContextCreator);
|
|
|
| @@ -359,7 +359,7 @@ abstract class Enqueuer {
|
| }
|
|
|
| void enqueueEverything() {
|
| - if (hasEnqueuedEverything) return;
|
| + if (hasEnqueuedReflectiveElements) return;
|
| compiler.log('Enqueuing everything');
|
| task.ensureAllElementsByName();
|
| for (Link link in task.allElementsByName.values) {
|
| @@ -367,7 +367,17 @@ abstract class Enqueuer {
|
| pretendElementWasUsed(element, compiler.globalDependencies);
|
| }
|
| }
|
| - hasEnqueuedEverything = true;
|
| + hasEnqueuedReflectiveElements = 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;
|
| + for (Element element in elements) {
|
| + pretendElementWasUsed(element, compiler.globalDependencies);
|
| + }
|
| }
|
|
|
| processLink(Map<String, Link<Element>> map,
|
|
|