Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: pkg/compiler/lib/src/commandline_options.dart

Issue 2520293002: Enable syntax-only support for generic functions by default, take 2. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 static const String trustJSInteropTypeAnnotations = 44 static const String trustJSInteropTypeAnnotations =
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 useKernel = '--use-kernel'; 47 static const String useKernel = '--use-kernel';
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 // The syntax-only level of support for generic methods is included in the
55 55 // 1.50 milestone for Dart. It is not experimental, but also not permanent:
56 // Considerations about this feature (esp. locations where generalizations 56 // a full implementation is expected in the future. Hence, the
57 // or changes are required for full support of generic methods) are marked 57 // 'GENERIC_METHODS' comments which were added when this feature was
58 // with 'GENERIC_METHODS'. The approach taken is to parse generic methods, 58 // experimental have been preserved, such that it will be easy to find the
59 // relevant locations to update when generic methods are implemented fully.
60 //
61 // The option is still accepted, but it has no effect: The feature is enabled
62 // by default and it cannot be disabled.
63 //
64 // The approach taken in the implementation is to parse generic methods,
59 // introduce AST nodes for them, generate corresponding types (such that 65 // introduce AST nodes for them, generate corresponding types (such that
60 // front end treatment is consistent with the code that programmers wrote), 66 // front end treatment is consistent with the code that programmers wrote),
61 // but considering all method type variables to have bound `dynamic` no 67 // but considering all method type variables to have bound `dynamic` no
62 // matter which bound they have syntactically (such that their value as types 68 // matter which bound they have syntactically (such that their value as types
63 // is unchecked), and then replacing method type variables by a `DynamicType` 69 // 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 70 // (such that the backend does not need to take method type arguments into
65 // account). 71 // account).
72 //
73 // The feature has an informal specification which is available at
74 // https://gist.github.com/eernstg/4353d7b4f669745bed3a5423e04a453c.
66 static const String genericMethodSyntax = '--generic-method-syntax'; 75 static const String genericMethodSyntax = '--generic-method-syntax';
76
77 // Experimental flags.
67 static const String resolveOnly = '--resolve-only'; 78 static const String resolveOnly = '--resolve-only';
68 static const String initializingFormalAccess = '--initializing-formal-access'; 79 static const String initializingFormalAccess = '--initializing-formal-access';
69 } 80 }
70 81
71 class Option { 82 class Option {
72 static const String showPackageWarnings = 83 static const String showPackageWarnings =
73 '${Flags.showPackageWarnings}|${Flags.showPackageWarnings}=.*'; 84 '${Flags.showPackageWarnings}|${Flags.showPackageWarnings}=.*';
74 85
75 // Experimental options. 86 // Experimental options.
76 static const String resolutionInput = '--resolution-input=.+'; 87 static const String resolutionInput = '--resolution-input=.+';
77 static const String bazelPaths = '--bazel-paths=.+'; 88 static const String bazelPaths = '--bazel-paths=.+';
78 } 89 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698