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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js_incremental; 5 part of dart2js_incremental;
6 6
7 /// Do not call this method directly. It will be made private. 7 /// Do not call this method directly. It will be made private.
8 // TODO(ahe): Make this method private. 8 // TODO(ahe): Make this method private.
9 Future<Compiler> reuseCompiler( 9 Future<Compiler> reuseCompiler(
10 {DiagnosticHandler diagnosticHandler, 10 {DiagnosticHandler diagnosticHandler,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ..enqueuer.resolution.queueIsClosed = false 78 ..enqueuer.resolution.queueIsClosed = false
79 ..enqueuer.resolution.hasEnqueuedReflectiveElements = false 79 ..enqueuer.resolution.hasEnqueuedReflectiveElements = false
80 ..enqueuer.resolution.hasEnqueuedReflectiveStaticFields = false 80 ..enqueuer.resolution.hasEnqueuedReflectiveStaticFields = false
81 ..enqueuer.codegen.queueIsClosed = false 81 ..enqueuer.codegen.queueIsClosed = false
82 ..enqueuer.codegen.hasEnqueuedReflectiveElements = false 82 ..enqueuer.codegen.hasEnqueuedReflectiveElements = false
83 ..enqueuer.codegen.hasEnqueuedReflectiveStaticFields = false 83 ..enqueuer.codegen.hasEnqueuedReflectiveStaticFields = false
84 ..assembledCode = null 84 ..assembledCode = null
85 ..compilationFailed = false; 85 ..compilationFailed = false;
86 JavaScriptBackend backend = compiler.backend; 86 JavaScriptBackend backend = compiler.backend;
87 87
88 backend.emitter.oldEmitter.cachedElements.addAll( 88 // TODO(ahe): Seems this cache only serves to tell
89 backend.generatedCode.keys); 89 // [OldEmitter.invalidateCaches] if it was invoked on a full compile (in
90 // which case nothing should be invalidated), or if it is an incremental
91 // compilation (in which case, holders/owners of newly compiled methods
92 // must be invalidated).
93 backend.emitter.oldEmitter.cachedElements.add(null);
90 94
91 compiler.enqueuer.codegen.newlyEnqueuedElements.clear(); 95 compiler.enqueuer.codegen.newlyEnqueuedElements.clear();
92 96
93 backend.emitter.oldEmitter.containerBuilder 97 backend.emitter.oldEmitter.containerBuilder
94 ..staticGetters.clear(); 98 ..staticGetters.clear();
95 99
96 backend.emitter.oldEmitter.nsmEmitter 100 backend.emitter.oldEmitter.nsmEmitter
97 ..trivialNsmHandlers.clear(); 101 ..trivialNsmHandlers.clear();
98 102
99 backend.emitter.typeTestEmitter 103 backend.emitter.typeTestEmitter
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 library.isPlatformLibrary || 147 library.isPlatformLibrary ||
144 (packagesAreImmutable && library.isPackageLibrary)); 148 (packagesAreImmutable && library.isPackageLibrary));
145 }; 149 };
146 } 150 }
147 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { 151 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) {
148 oldTag.makeCurrent(); 152 oldTag.makeCurrent();
149 return compiler; 153 return compiler;
150 }); 154 });
151 } 155 }
152 } 156 }
OLDNEW
« 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