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

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

Issue 2897903003: Support loading binary data in dart2js (Closed)
Patch Set: Updated cf. comments Created 3 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/compiler.dart ('k') | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index e248bddb42c7e1ae5f0655f146a9b295d103da40..72c7828269cc3a7bfc414712c1cbd354913c468b 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -201,7 +201,7 @@ Future<api.CompilationResult> compile(List<String> argv) {
passThrough(argument);
}
- String getDepsOutput(Map<Uri, SourceFile> sourceFiles) {
+ String getDepsOutput(Map<Uri, api.Input> sourceFiles) {
var filenames = sourceFiles.keys.map((uri) => '$uri').toList();
filenames.sort();
return filenames.join("\n");
@@ -1037,12 +1037,13 @@ class _CompilerInput implements api.CompilerInput {
_CompilerInput(this._input, this._data);
@override
- Future readFromUri(Uri uri) {
+ Future<api.Input> readFromUri(Uri uri,
+ {api.InputKind inputKind: api.InputKind.utf8}) {
String data = _data[uri];
if (data != null) {
- return new Future.value(data);
+ return new Future.value(new StringSourceFile.fromUri(uri, data));
}
- return _input.readFromUri(uri);
+ return _input.readFromUri(uri, inputKind: inputKind);
}
}
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698