| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.cmdline; | 5 library dart2js.cmdline; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:math' as math; | 9 import 'dart:math' as math; |
| 10 | 10 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 new OptionHandler('--enable-diagnostic-colors', | 245 new OptionHandler('--enable-diagnostic-colors', |
| 246 (_) => diagnosticHandler.enableColors = true), | 246 (_) => diagnosticHandler.enableColors = true), |
| 247 new OptionHandler('--enable[_-]checked[_-]mode|--checked', | 247 new OptionHandler('--enable[_-]checked[_-]mode|--checked', |
| 248 (_) => passThrough('--enable-checked-mode')), | 248 (_) => passThrough('--enable-checked-mode')), |
| 249 new OptionHandler('--enable-concrete-type-inference', | 249 new OptionHandler('--enable-concrete-type-inference', |
| 250 (_) => passThrough('--enable-concrete-type-inference')), | 250 (_) => passThrough('--enable-concrete-type-inference')), |
| 251 new OptionHandler('--trust-type-annotations', | 251 new OptionHandler('--trust-type-annotations', |
| 252 (_) => passThrough('--trust-type-annotations')), | 252 (_) => passThrough('--trust-type-annotations')), |
| 253 new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true), | 253 new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true), |
| 254 new OptionHandler('--package-root=.+|-p.+', setPackageRoot), | 254 new OptionHandler('--package-root=.+|-p.+', setPackageRoot), |
| 255 new OptionHandler('--disallow-unsafe-eval', passThrough), | |
| 256 new OptionHandler('--analyze-all', passThrough), | 255 new OptionHandler('--analyze-all', passThrough), |
| 257 new OptionHandler('--analyze-only', setAnalyzeOnly), | 256 new OptionHandler('--analyze-only', setAnalyzeOnly), |
| 258 new OptionHandler('--analyze-signatures-only', passThrough), | 257 new OptionHandler('--analyze-signatures-only', passThrough), |
| 259 new OptionHandler('--disable-native-live-type-analysis', passThrough), | 258 new OptionHandler('--disable-native-live-type-analysis', passThrough), |
| 260 new OptionHandler('--categories=.*', setCategories), | 259 new OptionHandler('--categories=.*', setCategories), |
| 261 new OptionHandler('--global-js-name=.*', checkGlobalName), | 260 new OptionHandler('--global-js-name=.*', checkGlobalName), |
| 262 new OptionHandler('--disable-type-inference', passThrough), | 261 new OptionHandler('--disable-type-inference', passThrough), |
| 263 new OptionHandler('--terse', passThrough), | 262 new OptionHandler('--terse', passThrough), |
| 264 | 263 |
| 265 // The following two options must come last. | 264 // The following two options must come last. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 --analyze-only | 476 --analyze-only |
| 478 Analyze but do not generate code. | 477 Analyze but do not generate code. |
| 479 | 478 |
| 480 --analyze-signatures-only | 479 --analyze-signatures-only |
| 481 Skip analysis of method bodies and field initializers. This option implies | 480 Skip analysis of method bodies and field initializers. This option implies |
| 482 --analyze-only. | 481 --analyze-only. |
| 483 | 482 |
| 484 --minify | 483 --minify |
| 485 Generate minified output. | 484 Generate minified output. |
| 486 | 485 |
| 487 --disallow-unsafe-eval | |
| 488 Disable dynamic generation of code in the generated output. This is | |
| 489 necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/). | |
| 490 | |
| 491 --suppress-warnings | 486 --suppress-warnings |
| 492 Do not display any warnings. | 487 Do not display any warnings. |
| 493 | 488 |
| 494 --suppress-hints | 489 --suppress-hints |
| 495 Do not display any hints. | 490 Do not display any hints. |
| 496 | 491 |
| 497 --enable-diagnostic-colors | 492 --enable-diagnostic-colors |
| 498 Add colors to diagnostic messages. | 493 Add colors to diagnostic messages. |
| 499 | 494 |
| 500 --terse | 495 --terse |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 } | 571 } |
| 577 } finally { | 572 } finally { |
| 578 exit(253); // 253 is recognized as a crash by our test scripts. | 573 exit(253); // 253 is recognized as a crash by our test scripts. |
| 579 } | 574 } |
| 580 }); | 575 }); |
| 581 } | 576 } |
| 582 | 577 |
| 583 void main() { | 578 void main() { |
| 584 mainWithErrorHandler(new Options()); | 579 mainWithErrorHandler(new Options()); |
| 585 } | 580 } |
| OLD | NEW |