| 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 show Future, EventSink; | 8 show Future, EventSink; |
| 9 import 'dart:convert' show UTF8, LineSplitter; | 9 import 'dart:convert' show UTF8, LineSplitter; |
| 10 import 'dart:io' | 10 import 'dart:io' |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 new OptionHandler('--trust-type-annotations', | 321 new OptionHandler('--trust-type-annotations', |
| 322 (_) => setTrustTypeAnnotations( | 322 (_) => setTrustTypeAnnotations( |
| 323 '--trust-type-annotations')), | 323 '--trust-type-annotations')), |
| 324 new OptionHandler('--trust-primitives', | 324 new OptionHandler('--trust-primitives', |
| 325 (_) => setTrustPrimitives( | 325 (_) => setTrustPrimitives( |
| 326 '--trust-primitives')), | 326 '--trust-primitives')), |
| 327 new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true), | 327 new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true), |
| 328 new OptionHandler('--package-root=.+|-p.+', setPackageRoot), | 328 new OptionHandler('--package-root=.+|-p.+', setPackageRoot), |
| 329 new OptionHandler('--analyze-all', setAnalyzeAll), | 329 new OptionHandler('--analyze-all', setAnalyzeAll), |
| 330 new OptionHandler('--analyze-only', setAnalyzeOnly), | 330 new OptionHandler('--analyze-only', setAnalyzeOnly), |
| 331 new OptionHandler('--no-source-maps', passThrough), |
| 331 new OptionHandler('--analyze-signatures-only', setAnalyzeOnly), | 332 new OptionHandler('--analyze-signatures-only', setAnalyzeOnly), |
| 332 new OptionHandler('--disable-native-live-type-analysis', passThrough), | 333 new OptionHandler('--disable-native-live-type-analysis', passThrough), |
| 333 new OptionHandler('--categories=.*', setCategories), | 334 new OptionHandler('--categories=.*', setCategories), |
| 334 new OptionHandler('--disable-type-inference', implyCompilation), | 335 new OptionHandler('--disable-type-inference', implyCompilation), |
| 335 new OptionHandler('--terse', passThrough), | 336 new OptionHandler('--terse', passThrough), |
| 336 new OptionHandler('--deferred-map=.+', implyCompilation), | 337 new OptionHandler('--deferred-map=.+', implyCompilation), |
| 337 new OptionHandler('--dump-info', setDumpInfo), | 338 new OptionHandler('--dump-info', setDumpInfo), |
| 338 new OptionHandler('--disallow-unsafe-eval', | 339 new OptionHandler('--disallow-unsafe-eval', |
| 339 (_) => hasDisallowUnsafeEval = true), | 340 (_) => hasDisallowUnsafeEval = true), |
| 340 new OptionHandler('--show-package-warnings', passThrough), | 341 new OptionHandler('--show-package-warnings', passThrough), |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 Show warnings and hints generated from packages. | 576 Show warnings and hints generated from packages. |
| 576 | 577 |
| 577 --preserve-uris | 578 --preserve-uris |
| 578 Preserve the source URIs in the reflection data. Without this flag the | 579 Preserve the source URIs in the reflection data. Without this flag the |
| 579 `uri` getter for `LibraryMirror`s is mangled in minified mode. | 580 `uri` getter for `LibraryMirror`s is mangled in minified mode. |
| 580 | 581 |
| 581 --csp | 582 --csp |
| 582 Disables dynamic generation of code in the generated output. This is | 583 Disables dynamic generation of code in the generated output. This is |
| 583 necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/). | 584 necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/). |
| 584 | 585 |
| 586 --no-source-maps |
| 587 Do not generate a source map file. |
| 588 |
| 585 The following options are only used for compiler development and may | 589 The following options are only used for compiler development and may |
| 586 be removed in a future version: | 590 be removed in a future version: |
| 587 | 591 |
| 588 --output-type=dart | 592 --output-type=dart |
| 589 Output Dart code instead of JavaScript. | 593 Output Dart code instead of JavaScript. |
| 590 | 594 |
| 591 --throw-on-error | 595 --throw-on-error |
| 592 Throw an exception if a compile-time error is detected. | 596 Throw an exception if a compile-time error is detected. |
| 593 | 597 |
| 594 --library-root=<directory> | 598 --library-root=<directory> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 } else if (exitCode == 253) { | 733 } else if (exitCode == 253) { |
| 730 print(">>> TEST CRASH"); | 734 print(">>> TEST CRASH"); |
| 731 } else { | 735 } else { |
| 732 print(">>> TEST FAIL"); | 736 print(">>> TEST FAIL"); |
| 733 } | 737 } |
| 734 stderr.writeln(">>> EOF STDERR"); | 738 stderr.writeln(">>> EOF STDERR"); |
| 735 subscription.resume(); | 739 subscription.resume(); |
| 736 }); | 740 }); |
| 737 }); | 741 }); |
| 738 } | 742 } |
| OLD | NEW |