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

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

Issue 2696513003: Add output_type_test (Closed)
Patch Set: 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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/debug.dart ('k') | pkg/compiler/lib/src/tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/source_file_provider.dart
diff --git a/pkg/compiler/lib/src/source_file_provider.dart b/pkg/compiler/lib/src/source_file_provider.dart
index 94052cb6bc0f8448f4a12af6715bf4b610b448ac..b0c71a4c626c1503a9a1fb294ef37ed6811fd332 100644
--- a/pkg/compiler/lib/src/source_file_provider.dart
+++ b/pkg/compiler/lib/src/source_file_provider.dart
@@ -261,16 +261,12 @@ class RandomAccessFileOutputProvider implements CompilerOutput {
return createEventSink(name, extension);
}
- EventSink<String> createEventSink(String name, String extension) {
+ Uri createUri(String name, String extension) {
Uri uri;
- bool isPrimaryOutput = false;
- // TODO (johnniwinther, sigurdm): Make a better interface for
- // output-providers.
if (extension == "deferred_map") {
uri = out.resolve(name);
} else if (name == '') {
if (extension == 'js' || extension == 'dart') {
- isPrimaryOutput = true;
uri = out;
} else if (extension == 'precompiled.js') {
uri = computePrecompiledUri(out);
@@ -292,6 +288,14 @@ class RandomAccessFileOutputProvider implements CompilerOutput {
} else {
uri = out.resolve('$name.$extension');
}
+ return uri;
+ }
+
+ EventSink<String> createEventSink(String name, String extension) {
+ // TODO (johnniwinther, sigurdm): Make a better interface for
+ // output-providers.
+ Uri uri = createUri(name, extension);
+ bool isPrimaryOutput = uri == out;
if (uri.scheme != 'file') {
onFailure('Unhandled scheme ${uri.scheme} in $uri.');
« no previous file with comments | « pkg/compiler/lib/src/inferrer/debug.dart ('k') | pkg/compiler/lib/src/tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698