| Index: pkg/compiler/lib/src/compiler.dart
|
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
|
| index e6b4f4c92b8bef96248f21eff940140ba9ab560c..f199a9c30babcf9b2367cca4a0b5c1f58f4655a0 100644
|
| --- a/pkg/compiler/lib/src/compiler.dart
|
| +++ b/pkg/compiler/lib/src/compiler.dart
|
| @@ -92,6 +92,7 @@ import 'null_compiler_output.dart' show
|
| import 'parser/diet_parser_task.dart' show
|
| DietParserTask;
|
| import 'parser/element_listener.dart' show
|
| + ParserOptions,
|
| ScannerOptions;
|
| import 'parser/parser_task.dart' show
|
| ParserTask;
|
| @@ -202,6 +203,8 @@ abstract class Compiler {
|
| final bool useContentSecurityPolicy;
|
| final bool enableExperimentalMirrors;
|
| final bool enableAssertMessage;
|
| + final bool enableConditionalDirectives;
|
| + final bool enableGenericMethods;
|
|
|
| /**
|
| * The maximum size of a concrete type before it widens to dynamic during
|
| @@ -454,7 +457,8 @@ abstract class Compiler {
|
| this.deferredMapUri: null,
|
| this.dumpInfo: false,
|
| bool useStartupEmitter: false,
|
| - bool enableConditionalDirectives: false,
|
| + this.enableConditionalDirectives: false,
|
| + this.enableGenericMethods: false,
|
| this.useContentSecurityPolicy: false,
|
| bool hasIncrementalSupport: false,
|
| this.enableExperimentalMirrors: false,
|
| @@ -517,11 +521,17 @@ abstract class Compiler {
|
| serialization = new SerializationTask(this),
|
| scanner = new ScannerTask(this),
|
| dietParser = new DietParserTask(
|
| - this, enableConditionalDirectives: enableConditionalDirectives),
|
| + this,
|
| + enableConditionalDirectives: enableConditionalDirectives,
|
| + enableGenericMethods: enableGenericMethods),
|
| parser = new ParserTask(
|
| - this, enableConditionalDirectives: enableConditionalDirectives),
|
| + this,
|
| + enableConditionalDirectives: enableConditionalDirectives,
|
| + enableGenericMethods: enableGenericMethods),
|
| patchParser = new PatchParserTask(
|
| - this, enableConditionalDirectives: enableConditionalDirectives),
|
| + this,
|
| + enableConditionalDirectives: enableConditionalDirectives,
|
| + enableGenericMethods: enableGenericMethods),
|
| resolver = new ResolverTask(this, backend.constantCompilerTask),
|
| closureToClassMapper = new closureMapping.ClosureTask(this),
|
| checker = new TypeCheckerTask(this),
|
| @@ -2184,6 +2194,13 @@ class _CompilerParsing implements Parsing {
|
| return new ScannerOptions(
|
| canUseNative: compiler.backend.canLibraryUseNative(element.library));
|
| }
|
| +
|
| + @override
|
| + ParserOptions get parserOptions {
|
| + return new ParserOptions(
|
| + enableConditionalDirectives: compiler.enableConditionalDirectives,
|
| + enableGenericMethods: compiler.enableGenericMethods);
|
| + }
|
| }
|
|
|
| class GlobalDependencyRegistry extends EagerRegistry {
|
|
|