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

Unified Diff: dart/pkg/dart2js_incremental/lib/caching_compiler.dart

Issue 600603003: Prevent leaks from caching compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/dart2js_incremental/lib/caching_compiler.dart
diff --git a/dart/pkg/dart2js_incremental/lib/caching_compiler.dart b/dart/pkg/dart2js_incremental/lib/caching_compiler.dart
index ab82e818bac05c428c163a16778093304c5ea974..38edf9791ba06f2df83f987087a3e403ffe06fae 100644
--- a/dart/pkg/dart2js_incremental/lib/caching_compiler.dart
+++ b/dart/pkg/dart2js_incremental/lib/caching_compiler.dart
@@ -85,8 +85,12 @@ Future<Compiler> reuseCompiler(
..compilationFailed = false;
JavaScriptBackend backend = compiler.backend;
- backend.emitter.oldEmitter.cachedElements.addAll(
- backend.generatedCode.keys);
+ // TODO(ahe): Seems this cache only serves to tell
+ // [OldEmitter.invalidateCaches] if it was invoked on a full compile (in
+ // which case nothing should be invalidated), or if it is an incremental
+ // compilation (in which case, holders/owners of newly compiled methods
+ // must be invalidated).
+ backend.emitter.oldEmitter.cachedElements.add(null);
compiler.enqueuer.codegen.newlyEnqueuedElements.clear();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698