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 c8f2a193ef532efe02dd827d51d3a87b5088c7af..a8a7d9687b1d3859c537f78aff4935f6746dc484 100644 |
--- a/pkg/front_end/lib/src/fasta/compile_platform.dart |
+++ b/pkg/front_end/lib/src/fasta/compile_platform.dart |
@@ -24,15 +24,22 @@ import 'dill/dill_target.dart' show DillTarget; |
import 'translate_uri.dart' show TranslateUri; |
-Future main(List<String> arguments) async { |
- Ticker ticker = new Ticker(); |
- try { |
- await CompilerCommandLine.withGlobalOptions("compile_platform", arguments, |
- (CompilerContext c) => compilePlatform(c, ticker)); |
- } on InputError catch (e) { |
- exitCode = 1; |
- print(e.format()); |
- return null; |
+const int iterations = const int.fromEnvironment("iterations", defaultValue: 1); |
+ |
+Future mainEntryPoint(List<String> arguments) async { |
+ for (int i = 0; i < iterations; i++) { |
+ if (i > 0) { |
+ print("\n"); |
+ } |
+ Ticker ticker = new Ticker(); |
+ try { |
+ await CompilerCommandLine.withGlobalOptions("compile_platform", arguments, |
+ (CompilerContext c) => compilePlatform(c, ticker)); |
+ } on InputError catch (e) { |
+ exitCode = 1; |
+ print(e.format()); |
+ return null; |
+ } |
} |
} |