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

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

Issue 2886233002: Remove 'dumpIr' from writeProgram() and KernelTarget. (Closed)
Patch Set: 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/fasta.dart
diff --git a/pkg/front_end/lib/src/fasta/fasta.dart b/pkg/front_end/lib/src/fasta/fasta.dart
index 01b4e27cc3e2739421e4ddb4cc4c622059d6a5bb..bf5d6ee57d43ad1040b1405983f1e4e24183a02e 100644
--- a/pkg/front_end/lib/src/fasta/fasta.dart
+++ b/pkg/front_end/lib/src/fasta/fasta.dart
@@ -12,6 +12,7 @@ import 'dart:io' show BytesBuilder, Directory, File, exitCode;
import 'package:front_end/file_system.dart';
import 'package:front_end/physical_file_system.dart';
+import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:kernel/binary/ast_to_binary.dart'
show LibraryFilteringBinaryPrinter;
@@ -145,11 +146,11 @@ class CompileTask {
inputError(uri, -1, "Unexpected input: $uri");
}
await dillTarget.buildOutlines();
- await kernelTarget.buildOutlines();
- await kernelTarget.writeOutline(output);
+ var outline = await kernelTarget.buildOutlines();
if (c.options.dumpIr && output != null) {
- kernelTarget.dumpIr();
+ printProgramText(outline);
}
+ await kernelTarget.writeOutline(output);
return kernelTarget;
}
@@ -157,9 +158,9 @@ class CompileTask {
KernelTarget kernelTarget = await buildOutline();
if (exitCode != 0) return null;
Uri uri = c.options.output;
- await kernelTarget.buildProgram();
- await kernelTarget.writeProgram(uri,
- dumpIr: c.options.dumpIr, verify: c.options.verify);
+ var program = await kernelTarget.buildProgram();
+ if (c.options.dumpIr) printProgramText(program);
+ await kernelTarget.writeProgram(uri, verify: c.options.verify);
return uri;
}
}

Powered by Google App Engine
This is Rietveld 408576698