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

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: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/commandline_options.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index b2bdd0516ff4f64a94cb1bf1801e772906b18763..de80e0b910c52c655bf4c0ded86cc2b58ffc42ce 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.resolveOnly) {
+ serialization.supportSerialization = true;
+ }
_parsingContext =
new ParsingContext(reporter, options, parser, patchParser, backend);
@@ -858,6 +861,12 @@ abstract class Compiler implements LibraryLoaderListener {
}
}
+ if (options.resolveOnly) {
+ reporter.log('Serializing to ${options.resolutionOutput}');
+ serialization.serializeToSink(
+ userOutputProvider.createEventSink('', 'data'),
+ libraryLoader.libraries);
+ }
if (options.analyzeOnly) {
if (!analyzeAll && !compilationFailed) {
// No point in reporting unused code when [analyzeAll] is true: all
« no previous file with comments | « pkg/compiler/lib/src/commandline_options.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698