OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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; | 5 library dart2js; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection' show Queue, LinkedHashMap; | 8 import 'dart:collection' show Queue, LinkedHashMap; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 import 'dart:uri'; | 10 import 'dart:uri'; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 | 125 |
126 setAnalyzeOnly(String argument) { | 126 setAnalyzeOnly(String argument) { |
127 analyzeOnly = true; | 127 analyzeOnly = true; |
128 passThrough(argument); | 128 passThrough(argument); |
129 } | 129 } |
130 | 130 |
131 setCategories(String argument) { | 131 setCategories(String argument) { |
132 List<String> categories = extractParameter(argument).split(','); | 132 List<String> categories = extractParameter(argument).split(','); |
133 Set<String> allowedCategories = | 133 Set<String> allowedCategories = |
134 LIBRARIES.values.mappedBy((x) => x.category).toSet(); | 134 LIBRARIES.values.map((x) => x.category).toSet(); |
135 allowedCategories.remove('Shared'); | 135 allowedCategories.remove('Shared'); |
136 allowedCategories.remove('Internal'); | 136 allowedCategories.remove('Internal'); |
137 List<String> allowedCategoriesList = | 137 List<String> allowedCategoriesList = |
138 new List<String>.from(allowedCategories); | 138 new List<String>.from(allowedCategories); |
139 allowedCategoriesList.sort(); | 139 allowedCategoriesList.sort(); |
140 if (categories.contains('all')) { | 140 if (categories.contains('all')) { |
141 categories = allowedCategoriesList; | 141 categories = allowedCategoriesList; |
142 } else { | 142 } else { |
143 String allowedCategoriesString = | 143 String allowedCategoriesString = |
144 Strings.join(allowedCategoriesList, ', '); | 144 Strings.join(allowedCategoriesList, ', '); |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 } catch (ignored) { | 487 } catch (ignored) { |
488 print('Internal error: error while printing exception'); | 488 print('Internal error: error while printing exception'); |
489 } | 489 } |
490 try { | 490 try { |
491 print(trace); | 491 print(trace); |
492 } finally { | 492 } finally { |
493 exit(253); // 253 is recognized as a crash by our test scripts. | 493 exit(253); // 253 is recognized as a crash by our test scripts. |
494 } | 494 } |
495 } | 495 } |
496 } | 496 } |
OLD | NEW |