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

Unified Diff: pkg/compiler/lib/src/serialization/task.dart

Issue 2240823002: Deserialize ResolvedAsts and ResolutionImpacts only when needed for compilation. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « pkg/compiler/lib/src/serialization/system.dart ('k') | pkg/compiler/lib/src/universe/call_structure.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/serialization/task.dart
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index bfcd9501c57bd1dc4ac8586d20ed368ad800d415..9f319db39dd63efc7256a09f95a587b3ce71a652 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -41,6 +41,10 @@ class SerializationTask extends CompilerTask implements LibraryDeserializer {
// retained, for instance impacts, resolution data etc.
bool supportSerialization = false;
+ /// Set this flag to also deserialize [ResolvedAst]s and [ResolutionImpact]s
+ /// in `resolveOnly` mode. Use this for testing only.
+ bool deserializeCompilationDataForTesting = false;
+
/// If `true`, deserialized data is supported.
bool get supportsDeserialization => deserializer != null;
@@ -117,9 +121,11 @@ class SerializationTask extends CompilerTask implements LibraryDeserializer {
void deserializeFromText(Uri sourceUri, String serializedData) {
measure(() {
if (deserializer == null) {
- deserializer = new DeserializerSystemImpl(compiler);
+ deserializer = new ResolutionDeserializerSystem(compiler,
+ deserializeCompilationDataForTesting:
+ deserializeCompilationDataForTesting);
}
- DeserializerSystemImpl deserializerImpl = deserializer;
+ ResolutionDeserializerSystem deserializerImpl = deserializer;
DeserializationContext context = deserializerImpl.deserializationContext;
Deserializer dataDeserializer = new Deserializer.fromText(
context, sourceUri, serializedData, const JsonSerializationDecoder());
« no previous file with comments | « pkg/compiler/lib/src/serialization/system.dart ('k') | pkg/compiler/lib/src/universe/call_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698