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

Unified Diff: pkg/front_end/lib/src/fasta/compile_platform.dart

Issue 2881603003: Generate outline without transformations in patched_sdk, use it for unit tests (Closed)
Patch Set: really use the outline, really 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
Index: pkg/front_end/lib/src/fasta/compile_platform.dart
diff --git a/pkg/front_end/lib/src/fasta/compile_platform.dart b/pkg/front_end/lib/src/fasta/compile_platform.dart
index 878970adaf0e48c5d7195b0e55b7a2ff45c1cebd..24e8cf2fa8e2cc5f3b2531c28e278ca9fcf3b904 100644
--- a/pkg/front_end/lib/src/fasta/compile_platform.dart
+++ b/pkg/front_end/lib/src/fasta/compile_platform.dart
@@ -44,21 +44,25 @@ Future compilePlatform(List<String> arguments) async {
await CompilerCommandLine.withGlobalOptions("compile_platform", arguments,
(CompilerContext c) {
Uri patchedSdk = Uri.base.resolveUri(new Uri.file(c.options.arguments[0]));
- Uri output = Uri.base.resolveUri(new Uri.file(c.options.arguments[1]));
- return compilePlatformInternal(c, ticker, patchedSdk, output);
+ Uri fullOutput = Uri.base.resolveUri(new Uri.file(c.options.arguments[1]));
+ Uri outlineOutput =
+ Uri.base.resolveUri(new Uri.file(c.options.arguments[2]));
+ return compilePlatformInternal(
+ c, ticker, patchedSdk, fullOutput, outlineOutput);
});
}
-Future compilePlatformInternal(
- CompilerContext c, Ticker ticker, Uri patchedSdk, Uri output) async {
+Future compilePlatformInternal(CompilerContext c, Ticker ticker, Uri patchedSdk,
+ Uri fullOutput, Uri outlineOutput) async {
if (c.options.strongMode) {
print("Note: strong mode support is preliminary and may not work.");
}
ticker.isVerbose = c.options.verbose;
- Uri deps = Uri.base.resolveUri(new Uri.file("${output.toFilePath()}.d"));
+ Uri deps = Uri.base.resolveUri(new Uri.file("${fullOutput.toFilePath()}.d"));
ticker.logMs("Parsed arguments");
if (ticker.isVerbose) {
- print("Compiling $patchedSdk to $output");
+ print("Generating outline of $patchedSdk into $outlineOutput");
+ print("Compiling $patchedSdk to $fullOutput");
}
TranslateUri uriTranslator =
@@ -71,10 +75,10 @@ Future compilePlatformInternal(
kernelTarget.read(Uri.parse("dart:core"));
await dillTarget.writeOutline(null);
- await kernelTarget.writeOutline(output);
+ await kernelTarget.writeOutline(outlineOutput);
if (exitCode != 0) return null;
- await kernelTarget.writeProgram(output,
+ await kernelTarget.writeProgram(fullOutput,
dumpIr: c.options.dumpIr, verify: c.options.verify);
- await kernelTarget.writeDepsFile(output, deps);
+ await kernelTarget.writeDepsFile(fullOutput, deps);
}

Powered by Google App Engine
This is Rietveld 408576698