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

Side by Side Diff: pkg/front_end/lib/src/fasta/bin/run.dart

Issue 2722223006: Move all main methods to tool/. (Closed)
Patch Set: Update tools/patch_sdk.dart. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:io' show exit, exitCode;
6
7 import '../compiler_command_line.dart' show CompilerCommandLine;
8
9 import '../compiler_context.dart' show CompilerContext;
10
11 import '../outline.dart' show CompileTask;
12
13 import '../errors.dart' show InputError;
14
15 import '../run.dart' show run;
16
17 import '../ticker.dart' show Ticker;
18
19 const int iterations = const int.fromEnvironment("iterations", defaultValue: 1);
20
21 main(List<String> arguments) async {
22 Uri uri;
23 for (int i = 0; i < iterations; i++) {
24 await CompilerCommandLine.withGlobalOptions("run", arguments,
25 (CompilerContext c) async {
26 if (i > 0) {
27 print("\n");
28 }
29 try {
30 CompileTask task =
31 new CompileTask(c, new Ticker(isVerbose: c.options.verbose));
32 uri = await task.compile();
33 } on InputError catch (e) {
34 print(e.format());
35 exit(1);
36 }
37 if (exitCode != 0) exit(exitCode);
38 if (i + 1 == iterations) {
39 exit(await run(uri, c));
40 }
41 });
42 }
43 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/bin/outline.dart ('k') | pkg/front_end/lib/src/fasta/compile_platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698