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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 '--experimental-trust-js-interop-type-annotations'; | 45 '--experimental-trust-js-interop-type-annotations'; |
46 static const String useContentSecurityPolicy = '--csp'; | 46 static const String useContentSecurityPolicy = '--csp'; |
47 static const String useCpsIr = '--use-cps-ir'; | 47 static const String useCpsIr = '--use-cps-ir'; |
48 static const String useNewSourceInfo = '--use-new-source-info'; | 48 static const String useNewSourceInfo = '--use-new-source-info'; |
49 static const String verbose = '--verbose'; | 49 static const String verbose = '--verbose'; |
50 static const String version = '--version'; | 50 static const String version = '--version'; |
51 | 51 |
52 static const String conditionalDirectives = '--conditional-directives'; | 52 static const String conditionalDirectives = '--conditional-directives'; |
53 | 53 |
54 // Experimental flags. | 54 // Experimental flags. |
| 55 |
| 56 // Considerations about this feature (esp. locations where generalizations |
| 57 // or changes are required for full support of generic methods) are marked |
| 58 // with 'GENERIC_METHODS'. The approach taken is to parse generic methods, |
| 59 // introduce AST nodes for them, generate corresponding types (such that |
| 60 // front end treatment is consistent with the code that programmers wrote), |
| 61 // but considering all method type variables to have bound `dynamic` no |
| 62 // matter which bound they have syntactically (such that their value as types |
| 63 // is unchecked), and then replacing method type variables by a `DynamicType` |
| 64 // (such that the backend does not need to take method type arguments into |
| 65 // account). |
55 static const String genericMethodSyntax = '--generic-method-syntax'; | 66 static const String genericMethodSyntax = '--generic-method-syntax'; |
56 } | 67 } |
57 | 68 |
58 class Option { | 69 class Option { |
59 static const String showPackageWarnings = | 70 static const String showPackageWarnings = |
60 '${Flags.showPackageWarnings}|${Flags.showPackageWarnings}=.*'; | 71 '${Flags.showPackageWarnings}|${Flags.showPackageWarnings}=.*'; |
61 } | 72 } |
OLD | NEW |