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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart2js_profile_many.dart

Issue 694353007: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library dart2js.profile_many;
6
7 import 'dart2js.dart' as cmdline;
8 import 'dart:async';
9
10 const String USAGE =
11 """
12 Usage: dart2js_profile_many.dart [OPTIONS] [FILES]
13
14 Invokes dart2js separately for each file using the given options.
15 This is for profiling multiple compilations in the Dart Observatory.
16 """;
17
18 printUsage() {
19 print(USAGE);
20 }
21
22 void main(List<String> args) {
23
24 List options = [];
25 List files = [];
26
27 for (String arg in args) {
28 if (arg.startsWith('-')) {
29 options.add(arg);
30 } else {
31 files.add(arg);
32 }
33 }
34
35 if (files.length == 0) {
36 printUsage();
37 return;
38 }
39
40 cmdline.exitFunc = (code) {
41 throw "Exit with code $code";
42 };
43
44 Future.forEach(files, (String file) {
45 List subargs = [];
46 subargs.addAll(options);
47 subargs.add(file);
48 return cmdline.compilerMain(subargs).catchError((e) { });
49 }).then((_) {
50 print("Done");
51 });
52
53
54 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart2js.dart ('k') | sdk/lib/_internal/compiler/implementation/dart2js_stress.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698