Chromium Code Reviews| Index: pkg/compiler/lib/src/enqueue.dart |
| diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart |
| index c29912a3c3b02713883c71a3f2d81023fd9a939f..18258022954c0c79ec7e871f384bf2a5e2803a24 100644 |
| --- a/pkg/compiler/lib/src/enqueue.dart |
| +++ b/pkg/compiler/lib/src/enqueue.dart |
| @@ -110,7 +110,11 @@ abstract class Enqueuer { |
| void registerInstantiatedType(InterfaceType type, {bool mirrorUsage: false}); |
| void forEach(void f(WorkItem work)); |
| - void applyImpact(Element element, WorldImpact worldImpact); |
| + |
| + /// Apply the [worldImpact] to this enqueuer. If the [forElement] is provided |
| + /// the impact strategy will remove it from the element impact cache, if it is |
|
Siggi Cherem (dart-lang)
2016/09/29 18:04:43
a few questions here...
1. other than reducing me
Johnni Winther
2016/09/30 08:27:03
1. For memory-use.
2. It was (or is) planned to sk
|
| + /// no longer needed. |
| + void applyImpact(WorldImpact worldImpact, {Element forElement}); |
|
Siggi Cherem (dart-lang)
2016/09/29 18:04:43
nit: rename "forElement" to "impactSource"?
Johnni Winther
2016/09/30 08:27:03
Done.
|
| bool checkNoEnqueuedInvokedInstanceMethods(); |
| void logSummary(log(message)); |
| @@ -183,10 +187,9 @@ class ResolutionEnqueuer extends Enqueuer { |
| } |
| } |
| - /// Apply the [worldImpact] of processing [element] to this enqueuer. |
| - void applyImpact(Element element, WorldImpact worldImpact) { |
| + void applyImpact(WorldImpact worldImpact, {Element forElement}) { |
| compiler.impactStrategy |
| - .visitImpact(element, worldImpact, impactVisitor, impactUse); |
| + .visitImpact(forElement, worldImpact, impactVisitor, impactUse); |
| } |
| void registerInstantiatedType(InterfaceType type, {bool mirrorUsage: false}) { |
| @@ -574,7 +577,7 @@ class ResolutionEnqueuer extends Enqueuer { |
| assert(invariant(element, element.isDeclaration, |
| message: "Element ${element} is not the declaration.")); |
| _universe.registerStaticUse(staticUse); |
| - compiler.backend.registerStaticUse(element, this); |
| + compiler.backend.registerStaticUse(element, forResolution: true); |
| bool addElement = true; |
| switch (staticUse.kind) { |
| case StaticUseKind.STATIC_TEAR_OFF: |