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

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

Issue 2378063002: Remove Enqueuer argument from Backend.registerStaticUse (Closed)
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cacf4e1987ea5cf9170a0cacde2d69f266e102d8 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 [impactSource] is provided
+ /// the impact strategy will remove it from the element impact cache, if it is
+ /// no longer needed.
+ void applyImpact(WorldImpact worldImpact, {Element impactSource});
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 impactSource}) {
compiler.impactStrategy
- .visitImpact(element, worldImpact, impactVisitor, impactUse);
+ .visitImpact(impactSource, 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:
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698