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

Unified Diff: pkg/compiler/lib/src/common/codegen.dart

Issue 1464773002: Remove WorldImpact from caches when no longer needed. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Make deferred uncaching global. Created 5 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/common/backend_api.dart ('k') | pkg/compiler/lib/src/common/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/codegen.dart
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index 37c9855a3f4c3aed788848be2f579e5cdffba8e1..7e9b40fa95347261885d831d8ba543b3ab55f124 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -28,7 +28,8 @@ import '../universe/use.dart' show
TypeUse;
import '../universe/world_impact.dart' show
WorldImpact,
- WorldImpactBuilder;
+ WorldImpactBuilder,
+ WorldImpactVisitor;
import '../util/util.dart' show
Pair,
Setlet;
@@ -78,6 +79,12 @@ class _CodegenImpact extends WorldImpactBuilder implements CodegenImpact {
_CodegenImpact(this.registry);
+ void apply(WorldImpactVisitor visitor) {
+ staticUses.forEach(visitor.visitStaticUse);
+ dynamicUses.forEach(visitor.visitDynamicUse);
+ typeUses.forEach(visitor.visitTypeUse);
+ }
+
void registerCompileTimeConstant(ConstantValue constant) {
if (_compileTimeConstants == null) {
_compileTimeConstants = new Setlet<ConstantValue>();
@@ -262,8 +269,6 @@ class CodegenWorkItem extends WorkItem {
if (world.isProcessed(element)) return const WorldImpact();
registry = new CodegenRegistry(compiler, element);
- var impact = compiler.codegen(this, world);
- compiler.dumpInfoTask.registerImpact(element, impact);
- return impact;
+ return compiler.codegen(this, world);
}
}
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/common/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698