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

Unified Diff: dart/tests/compiler/dart2js/memory_compiler.dart

Issue 233233002: Copy types object when using a cached compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
Index: dart/tests/compiler/dart2js/memory_compiler.dart
diff --git a/dart/tests/compiler/dart2js/memory_compiler.dart b/dart/tests/compiler/dart2js/memory_compiler.dart
index 392f51b6bf3a36251bc7e48f634c42bc6fd82ef4..57e65bfa57677a87a17f8b8850bf48b6c9c34f29 100644
--- a/dart/tests/compiler/dart2js/memory_compiler.dart
+++ b/dart/tests/compiler/dart2js/memory_compiler.dart
@@ -165,7 +165,7 @@ Compiler compilerFor(Map<String,String> memorySourceFiles,
{});
if (cachedCompiler != null) {
compiler.coreLibrary = cachedCompiler.libraries['dart:core'];
- compiler.types = cachedCompiler.types;
+ compiler.types = cachedCompiler.types.copy(compiler);
cachedCompiler.libraries.forEach((String uri, library) {
if (library.isPlatformLibrary) {
compiler.libraries[uri] = library;
@@ -193,6 +193,24 @@ Compiler compilerFor(Map<String,String> memorySourceFiles,
treeElements;
}
});
+
+ cachedCompiler.scanner = null;
Johnni Winther 2014/04/10 13:51:55 Add a comment about why these resets are needed.
ahe 2014/04/10 14:02:48 I'll add a comment. The resets aren't needed, and
Johnni Winther 2014/04/10 14:08:47 Keep it in - with a comment.
+ cachedCompiler.dietParser = null;
+ cachedCompiler.parser = null;
+ cachedCompiler.patchParser = null;
+ cachedCompiler.libraryLoader = null;
+ cachedCompiler.validator = null;
+ cachedCompiler.resolver = null;
+ cachedCompiler.closureToClassMapper = null;
+ cachedCompiler.checker = null;
+ cachedCompiler.irBuilder = null;
+ cachedCompiler.typesTask = null;
+ cachedCompiler.backend = null;
+ cachedCompiler.enqueuer = null;
+ cachedCompiler.deferredLoadTask = null;
+ cachedCompiler.mirrorUsageAnalyzerTask = null;
+ cachedCompiler.dumpInfoTask = null;
+ cachedCompiler.buildId = null;
}
return compiler;
}
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/dart_types.dart ('k') | dart/tests/compiler/dart2js/message_kind_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698