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

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

Issue 1975153002: Support (de)serialization from command-line (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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: 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

Powered by Google App Engine
This is Rietveld 408576698