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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2500373003: Compute WorldImpact for mirror analysis. (Closed)
Patch Set: Remove Enqueuer.registerTypeUse Created 4 years, 1 month 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/mirrors_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 56e8e89180a74eefc363f6a85d257a814843aa66..2ceba371fa644eb30f1208c3d04ea0890590a435 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2384,14 +2384,20 @@ class JavaScriptBackend extends Backend {
}
if (isTreeShakingDisabled) {
- mirrorsAnalysis.enqueueReflectiveElements(
- enqueuer, recentClasses, compiler.libraryLoader.libraries);
+ enqueuer.applyImpact(
+ compiler.impactStrategy,
+ mirrorsAnalysis.computeImpactForReflectiveElements(recentClasses,
+ enqueuer.processedClasses, compiler.libraryLoader.libraries,
+ forResolution: enqueuer.isResolutionQueue));
} else if (!targetsUsed.isEmpty && enqueuer.isResolutionQueue) {
// Add all static elements (not classes) that have been requested for
// reflection. If there is no mirror-usage these are probably not
// necessary, but the backend relies on them being resolved.
- mirrorsAnalysis.enqueueReflectiveStaticFields(
- enqueuer, _findStaticFieldTargets());
+ enqueuer.applyImpact(
+ compiler.impactStrategy,
+ mirrorsAnalysis.computeImpactForReflectiveStaticFields(
+ _findStaticFieldTargets(),
+ forResolution: enqueuer.isResolutionQueue));
}
if (mustPreserveNames) reporter.log('Preserving names.');
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/mirrors_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698