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

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

Issue 2378063002: Remove Enqueuer argument from Backend.registerStaticUse (Closed)
Patch Set: Add more. Created 4 years, 3 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
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:

Powered by Google App Engine
This is Rietveld 408576698