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

Unified Diff: pkg/front_end/lib/src/fasta/compile_platform.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
« no previous file with comments | « pkg/front_end/lib/src/fasta/bin/run.dart ('k') | pkg/front_end/lib/src/fasta/outline.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/bin/run.dart ('k') | pkg/front_end/lib/src/fasta/outline.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698