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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.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/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 0899d1b54fb23e3009924f3733250500ebaaffdb..09af361a5becce07fe3de88bc306eed32620899e 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1310,7 +1310,8 @@ class JavaScriptBackend extends Backend {
enqueue(enqueuer, helpers.isJsIndexable, registry);
}
- customElementsAnalysis.registerInstantiatedClass(cls, enqueuer);
+ customElementsAnalysis.registerInstantiatedClass(cls,
+ forResolution: enqueuer.isResolutionQueue);
if (!enqueuer.isResolutionQueue) {
lookupMapAnalysis.registerInstantiatedClass(cls);
}
@@ -1904,7 +1905,7 @@ class JavaScriptBackend extends Backend {
return compiler.closedWorld.hasOnlySubclasses(classElement);
}
- void registerStaticUse(Element element, Enqueuer enqueuer) {
+ void registerStaticUse(Element element, {bool forResolution}) {
if (element == helpers.disableTreeShakingMarker) {
isTreeShakingDisabled = true;
} else if (element == helpers.preserveNamesMarker) {
@@ -1927,7 +1928,8 @@ class JavaScriptBackend extends Backend {
} else if (element == helpers.requiresPreambleMarker) {
requiresPreamble = true;
}
- customElementsAnalysis.registerStaticUse(element, enqueuer);
+ customElementsAnalysis.registerStaticUse(element,
+ forResolution: forResolution);
}
/// Called when [:const Symbol(name):] is seen.
@@ -2351,9 +2353,12 @@ class JavaScriptBackend extends Backend {
//
// Return early if any elements are added to avoid counting the elements as
// due to mirrors.
- customElementsAnalysis.onQueueEmpty(enqueuer);
- lookupMapAnalysis.onQueueEmpty(enqueuer);
- typeVariableHandler.onQueueEmpty(enqueuer);
+ enqueuer.applyImpact(customElementsAnalysis.flush(
+ forResolution: enqueuer.isResolutionQueue));
+ enqueuer.applyImpact(
+ lookupMapAnalysis.flush(forResolution: enqueuer.isResolutionQueue));
+ enqueuer.applyImpact(
+ typeVariableHandler.flush(forResolution: enqueuer.isResolutionQueue));
if (!enqueuer.queueIsEmpty) return false;
@@ -2424,7 +2429,7 @@ class JavaScriptBackend extends Backend {
}
metadataConstants.clear();
}
- enqueuer.applyImpact(null, impactBuilder.flush());
+ enqueuer.applyImpact(impactBuilder.flush());
}
return true;
}
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698