OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library dart2js.profile_many; | 5 library dart2js.profile_many; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'dart2js.dart' as cmdline; | 9 import 'package:compiler/src/dart2js.dart' as cmdline |
10 | 10 |
11 const String USAGE = """ | 11 const String USAGE = """ |
12 Usage: dart2js_profile_many.dart [OPTIONS] [FILES] | 12 Usage: dart2js_profile_many.dart [OPTIONS] [FILES] |
13 | 13 |
14 Invokes dart2js separately for each file using the given options. | 14 Invokes dart2js separately for each file using the given options. |
15 This is for profiling multiple compilations in the Dart Observatory. | 15 This is for profiling multiple compilations in the Dart Observatory. |
16 """; | 16 """; |
17 | 17 |
18 printUsage() { | 18 printUsage() { |
19 print(USAGE); | 19 print(USAGE); |
(...skipping 22 matching lines...) Expand all Loading... |
42 | 42 |
43 Future.forEach(files, (String file) { | 43 Future.forEach(files, (String file) { |
44 List subargs = []; | 44 List subargs = []; |
45 subargs.addAll(options); | 45 subargs.addAll(options); |
46 subargs.add(file); | 46 subargs.add(file); |
47 return cmdline.compilerMain(subargs).catchError((e) {}); | 47 return cmdline.compilerMain(subargs).catchError((e) {}); |
48 }).then((_) { | 48 }).then((_) { |
49 print("Done"); | 49 print("Done"); |
50 }); | 50 }); |
51 } | 51 } |
OLD | NEW |