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

Unified Diff: pkg/front_end/tool/example.dart

Issue 2614063007: Use URIs rather than paths in front end API. (Closed)
Patch Set: Run dartfmt Created 3 years, 11 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/front_end/tool/example.dart
diff --git a/pkg/front_end/tool/example.dart b/pkg/front_end/tool/example.dart
index 1d49b228759959446c8f8ffb560b6f9a4747ed5a..d81f43746e36388e4f684f8e12e055bff0a584cb 100644
--- a/pkg/front_end/tool/example.dart
+++ b/pkg/front_end/tool/example.dart
@@ -11,17 +11,19 @@ Future dumpToSink(Program program, StreamSink<List<int>> sink) {
}
Future kernelToSink(Uri entry, StreamSink<List<int>> sink) async {
- var program = await kernelForProgram(entry,
+ var program = await kernelForProgram(
+ entry,
new CompilerOptions()
- ..sdkPath = 'sdk'
- ..packagesFilePath = '.packages'
+ ..sdkRoot = new Uri.file('sdk')
+ ..packagesFileUri = new Uri.file('.packages')
..onError = (e) => print(e.message));
await dumpToSink(program, sink);
}
main(args) async {
- kernelToSink(Uri.base.resolve(args[0]),
+ kernelToSink(
+ Uri.base.resolve(args[0]),
// TODO(sigmund,hausner): define memory type where to dump binary data.
new StreamController<List<int>>.broadcast().sink);
}

Powered by Google App Engine
This is Rietveld 408576698