OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.options; | 5 library dart2js.cmdline.options; |
6 | 6 |
7 /// Commandline flags used in `dart2js.dart` and/or `apiimpl.dart`. | 7 /// Commandline flags used in `dart2js.dart` and/or `apiimpl.dart`. |
8 class Flags { | 8 class Flags { |
9 static const String allowMockCompilation = '--allow-mock-compilation'; | 9 static const String allowMockCompilation = '--allow-mock-compilation'; |
10 static const String allowNativeExtensions = '--allow-native-extensions'; | 10 static const String allowNativeExtensions = '--allow-native-extensions'; |
(...skipping 17 matching lines...) Expand all Loading... |
28 '--experimental-track-allocations'; | 28 '--experimental-track-allocations'; |
29 static const String experimentalAllocationsPath = | 29 static const String experimentalAllocationsPath = |
30 '--experimental-allocations-path'; | 30 '--experimental-allocations-path'; |
31 static const String fastStartup = '--fast-startup'; | 31 static const String fastStartup = '--fast-startup'; |
32 static const String fatalWarnings = '--fatal-warnings'; | 32 static const String fatalWarnings = '--fatal-warnings'; |
33 static const String generateCodeWithCompileTimeErrors = | 33 static const String generateCodeWithCompileTimeErrors = |
34 '--generate-code-with-compile-time-errors'; | 34 '--generate-code-with-compile-time-errors'; |
35 // Temporary flag to also integrate Kernel into global type inference. | 35 // Temporary flag to also integrate Kernel into global type inference. |
36 // TODO(efortuna): Remove when fully implemented and simply use "useKernel". | 36 // TODO(efortuna): Remove when fully implemented and simply use "useKernel". |
37 static const String kernelGlobalInference = '--kernel-global-inference'; | 37 static const String kernelGlobalInference = '--kernel-global-inference'; |
38 // Read input from a .dill file rather than a .dart input (use only in | 38 |
39 // conjunction with --use-kernel=true). | 39 /// Enable the unified front end, loading from .dill files, and compilation |
40 static const String loadFromDill = '--read-dill'; | 40 /// using the kernel representation. |
| 41 /// See [CompilerOptions.useKernel] for details. |
| 42 static const String useKernel = '--use-kernel'; |
| 43 |
| 44 /// Only enable the kernel ssa builder, but continue using the old compiler |
| 45 /// pipeline. Only used for testing the ssa builder. |
| 46 // TODO(sigmund): delete. |
| 47 static const String useKernelInSsa = '--use-kernel-in-ssa'; |
| 48 |
41 static const String minify = '--minify'; | 49 static const String minify = '--minify'; |
42 static const String noFrequencyBasedMinification = | 50 static const String noFrequencyBasedMinification = |
43 '--no-frequency-based-minification'; | 51 '--no-frequency-based-minification'; |
44 static const String noSourceMaps = '--no-source-maps'; | 52 static const String noSourceMaps = '--no-source-maps'; |
45 static const String preserveComments = '--preserve-comments'; | 53 static const String preserveComments = '--preserve-comments'; |
46 static const String preserveUris = '--preserve-uris'; | 54 static const String preserveUris = '--preserve-uris'; |
47 static const String showPackageWarnings = '--show-package-warnings'; | 55 static const String showPackageWarnings = '--show-package-warnings'; |
48 static const String suppressHints = '--suppress-hints'; | 56 static const String suppressHints = '--suppress-hints'; |
49 static const String suppressWarnings = '--suppress-warnings'; | 57 static const String suppressWarnings = '--suppress-warnings'; |
50 static const String terse = '--terse'; | 58 static const String terse = '--terse'; |
51 static const String testMode = '--test-mode'; | 59 static const String testMode = '--test-mode'; |
52 static const String trustPrimitives = '--trust-primitives'; | 60 static const String trustPrimitives = '--trust-primitives'; |
53 static const String trustTypeAnnotations = '--trust-type-annotations'; | 61 static const String trustTypeAnnotations = '--trust-type-annotations'; |
54 static const String trustJSInteropTypeAnnotations = | 62 static const String trustJSInteropTypeAnnotations = |
55 '--experimental-trust-js-interop-type-annotations'; | 63 '--experimental-trust-js-interop-type-annotations'; |
56 static const String useContentSecurityPolicy = '--csp'; | 64 static const String useContentSecurityPolicy = '--csp'; |
57 static const String useKernel = '--use-kernel'; | |
58 static const String useMultiSourceInfo = '--use-multi-source-info'; | 65 static const String useMultiSourceInfo = '--use-multi-source-info'; |
59 static const String useNewSourceInfo = '--use-new-source-info'; | 66 static const String useNewSourceInfo = '--use-new-source-info'; |
60 static const String verbose = '--verbose'; | 67 static const String verbose = '--verbose'; |
61 static const String version = '--version'; | 68 static const String version = '--version'; |
62 | 69 |
63 static const String conditionalDirectives = '--conditional-directives'; | 70 static const String conditionalDirectives = '--conditional-directives'; |
64 | 71 |
65 // The syntax-only level of support for generic methods is included in the | 72 // The syntax-only level of support for generic methods is included in the |
66 // 1.50 milestone for Dart. It is not experimental, but also not permanent: | 73 // 1.50 milestone for Dart. It is not experimental, but also not permanent: |
67 // a full implementation is expected in the future. Hence, the | 74 // a full implementation is expected in the future. Hence, the |
(...skipping 26 matching lines...) Expand all Loading... |
94 } | 101 } |
95 | 102 |
96 class Option { | 103 class Option { |
97 static const String showPackageWarnings = | 104 static const String showPackageWarnings = |
98 '${Flags.showPackageWarnings}|${Flags.showPackageWarnings}=.*'; | 105 '${Flags.showPackageWarnings}|${Flags.showPackageWarnings}=.*'; |
99 | 106 |
100 // Experimental options. | 107 // Experimental options. |
101 static const String resolutionInput = '--resolution-input=.+'; | 108 static const String resolutionInput = '--resolution-input=.+'; |
102 static const String bazelPaths = '--bazel-paths=.+'; | 109 static const String bazelPaths = '--bazel-paths=.+'; |
103 } | 110 } |
OLD | NEW |