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

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

Issue 2690063002: Refactor CompilerOutput (Closed)
Patch Set: Cleanup. Created 3 years, 10 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 dd3249e13d6f3e0cccd5fe5e1234255f3bb97dec..feb82940319b9d6416fef0373b9946a3844e90a9 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -658,9 +658,10 @@ abstract class Compiler implements LibraryLoaderListener {
if (options.resolveOnly && !compilationFailed) {
reporter.log('Serializing to ${options.resolutionOutput}');
- serialization
- .serializeToSink(userOutputProvider.createEventSink('', 'data'),
- libraryLoader.libraries.where((LibraryElement library) {
+ serialization.serializeToSink(
+ userOutputProvider.createOutputSink(
+ '', 'data', api.OutputType.serialization_data),
+ libraryLoader.libraries.where((LibraryElement library) {
return !serialization.isDeserialized(library);
}));
}
@@ -1081,16 +1082,17 @@ abstract class Compiler implements LibraryLoaderListener {
}
}
- EventSink<String> outputProvider(String name, String extension) {
+ api.OutputSink outputProvider(
+ String name, String extension, api.OutputType type) {
if (compilationFailed) {
if (!options.generateCodeWithCompileTimeErrors || options.testMode) {
// Disable output in test mode: The build bot currently uses the time
// stamp of the generated file to determine whether the output is
// up-to-date.
- return new NullSink('$name.$extension');
+ return NullSink.outputProvider(name, extension, type);
}
}
- return userOutputProvider.createEventSink(name, extension);
+ return userOutputProvider.createOutputSink(name, extension, type);
}
}

Powered by Google App Engine
This is Rietveld 408576698