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

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

Issue 2722223006: Move all main methods to tool/. (Closed)
Patch Set: Update tools/patch_sdk.dart. 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
Index: pkg/front_end/lib/src/fasta/outline.dart
diff --git a/pkg/front_end/lib/src/fasta/outline.dart b/pkg/front_end/lib/src/fasta/outline.dart
index 3d328e761903c36cee438544b8770b2135533067..0604a26958585c8e60c3ebc5888dba450261e27a 100644
--- a/pkg/front_end/lib/src/fasta/outline.dart
+++ b/pkg/front_end/lib/src/fasta/outline.dart
@@ -24,6 +24,26 @@ import 'ticker.dart' show Ticker;
import 'translate_uri.dart' show TranslateUri;
+const int iterations = const int.fromEnvironment("iterations", defaultValue: 1);
+
+compileEntryPoint(List<String> arguments) async {
+ for (int i = 0; i < iterations; i++) {
+ if (i > 0) {
+ print("\n");
+ }
+ await compile(arguments);
+ }
+}
+
+outlineEntryPoint(List<String> arguments) async {
+ for (int i = 0; i < iterations; i++) {
+ if (i > 0) {
+ print("\n");
+ }
+ await outline(arguments);
+ }
+}
+
Future<KernelTarget> outline(List<String> arguments) async {
try {
return await CompilerCommandLine.withGlobalOptions("outline", arguments,
« no previous file with comments | « pkg/front_end/lib/src/fasta/compile_platform.dart ('k') | pkg/front_end/lib/src/fasta/parser/bin/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698