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

Unified Diff: pkg/compiler/lib/src/options.dart

Issue 2521073003: Remove the ability in dart2js to turn off syntax-only generic methods. (Closed)
Patch Set: eernst 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/parser/class_element_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/options.dart
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index f490329e7afc9997f9053e0fb59fd02d6bfb6d75..2d33ec0547b6e03cc3f6c93a7edf44149b994fdf 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -7,18 +7,6 @@ library dart2js.src.options;
import '../compiler.dart' show PackagesDiscoveryProvider;
import 'commandline_options.dart' show Flags;
-/// Options used for parsing.
-///
-/// Use this to conditionally support certain constructs, e.g.,
-/// experimental ones.
-abstract class ParserOptions {
- const ParserOptions();
-
- /// Support parsing of generic method declarations, and invocations of
- /// methods where type arguments are passed.
- bool get enableGenericMethodSyntax;
-}
-
/// Options used for controlling diagnostic messages.
abstract class DiagnosticOptions {
const DiagnosticOptions();
@@ -48,7 +36,7 @@ abstract class DiagnosticOptions {
/// Object for passing options to the compiler. Superclasses are used to select
/// subsets of these options, enabling each part of the compiler to depend on
/// as few as possible.
-class CompilerOptions implements DiagnosticOptions, ParserOptions {
+class CompilerOptions implements DiagnosticOptions {
/// The entry point of the application that is being compiled.
final Uri entryPoint;
@@ -145,10 +133,6 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
/// reason for why an assertion fails. (experimental)
final bool enableAssertMessage;
- /// Support parsing of generic method declarations, and invocations of
- /// methods where type arguments are passed.
- final bool enableGenericMethodSyntax;
-
/// Support access to initializing formal constructor arguments, e.g., the
/// use of `x` to initialize `y` in `C(this.x) : y = x`.
final bool enableInitializingFormalAccess;
@@ -288,8 +272,6 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
disableTypeInference: _hasOption(options, Flags.disableTypeInference),
dumpInfo: _hasOption(options, Flags.dumpInfo),
enableAssertMessage: _hasOption(options, Flags.enableAssertMessage),
- enableGenericMethodSyntax:
- true, // No check for `Flags.genericMethodSyntax`: always enabled.
enableInitializingFormalAccess:
_hasOption(options, Flags.initializingFormalAccess),
enableExperimentalMirrors:
@@ -358,7 +340,6 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
bool disableTypeInference: false,
bool dumpInfo: false,
bool enableAssertMessage: false,
- bool enableGenericMethodSyntax: false,
bool enableInitializingFormalAccess: false,
bool enableExperimentalMirrors: false,
bool enableMinification: false,
@@ -430,7 +411,6 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
disableTypeInference: disableTypeInference,
dumpInfo: dumpInfo,
enableAssertMessage: enableAssertMessage,
- enableGenericMethodSyntax: enableGenericMethodSyntax,
enableInitializingFormalAccess: enableInitializingFormalAccess,
enableExperimentalMirrors: enableExperimentalMirrors,
enableMinification: enableMinification,
@@ -481,7 +461,6 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
this.disableTypeInference: false,
this.dumpInfo: false,
this.enableAssertMessage: false,
- this.enableGenericMethodSyntax: false,
this.enableInitializingFormalAccess: false,
this.enableExperimentalMirrors: false,
this.enableMinification: false,
@@ -539,7 +518,6 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
disableTypeInference,
dumpInfo,
enableAssertMessage,
- enableGenericMethodSyntax,
enableInitializingFormalAccess,
enableExperimentalMirrors,
enableMinification,
@@ -598,8 +576,6 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
disableTypeInference ?? options.disableTypeInference,
dumpInfo: dumpInfo ?? options.dumpInfo,
enableAssertMessage: enableAssertMessage ?? options.enableAssertMessage,
- enableGenericMethodSyntax:
- enableGenericMethodSyntax ?? options.enableGenericMethodSyntax,
enableInitializingFormalAccess: enableInitializingFormalAccess ??
options.enableInitializingFormalAccess,
enableExperimentalMirrors:
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/parser/class_element_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698