Index: pkg/compiler/lib/src/compiler.dart |
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
index 7dbee2a872b7b85acd659fb9aa7eb053679a8f22..daec8b1cfacd7677c2dfa2cd28d3219132b623f4 100644 |
--- a/pkg/compiler/lib/src/compiler.dart |
+++ b/pkg/compiler/lib/src/compiler.dart |
@@ -364,6 +364,9 @@ abstract class Compiler implements LibraryLoaderListener { |
reuseLibraryTask = new GenericTask('Reuse library', this), |
selfTask = new GenericTask('self', this), |
]; |
+ if (options.serializationTarget != null) { |
+ serialization.supportSerialization = true; |
+ } |
_parsingContext = |
new ParsingContext(reporter, options, parser, patchParser, backend); |
@@ -858,6 +861,12 @@ abstract class Compiler implements LibraryLoaderListener { |
} |
} |
+ if (options.serializationTarget != null) { |
+ reporter.log('Serializing to ${options.serializationTarget}'); |
+ serialization.serializeToSink( |
+ userOutputProvider.createEventSink('', 'data'), |
+ libraryLoader.libraries); |
+ } |
if (options.analyzeOnly) { |
if (!analyzeAll && !compilationFailed) { |
// No point in reporting unused code when [analyzeAll] is true: all |