@@ -25,6 +25,8 @@ import '../api_prototype/file_system.dart' show FileSystem;
25
25
26
26
import '../api_prototype/front_end.dart' show CompilerResult;
27
27
28
+ import '../base/nnbd_mode.dart' show NnbdMode;
29
+
28
30
import '../base/processed_options.dart' show ProcessedOptions;
29
31
30
32
import '../kernel_generator_impl.dart' show generateKernel;
@@ -50,6 +52,8 @@ export '../api_prototype/standard_file_system.dart' show StandardFileSystem;
50
52
export '../api_prototype/terminal_color_support.dart'
51
53
show printDiagnosticMessage;
52
54
55
+ export '../base/nnbd_mode.dart' show NnbdMode;
56
+
53
57
export '../fasta/kernel/utils.dart' show serializeComponent;
54
58
55
59
export 'compiler_state.dart' show InitializedCompilerState;
@@ -72,7 +76,8 @@ Future<InitializedCompilerState> initializeIncrementalCompiler(
72
76
bool outlineOnly,
73
77
Map <String , String > environmentDefines,
74
78
{bool trackNeededDillLibraries: false ,
75
- bool verbose: false }) async {
79
+ bool verbose: false ,
80
+ NnbdMode nnbdMode: NnbdMode .Weak }) async {
76
81
List <Component > outputLoadedAdditionalDills =
77
82
new List <Component >(additionalDills.length);
78
83
Map <ExperimentalFlag , bool > experimentalFlags = parseExperimentalFlags (
@@ -94,7 +99,8 @@ Future<InitializedCompilerState> initializeIncrementalCompiler(
94
99
omitPlatform: true ,
95
100
trackNeededDillLibraries: trackNeededDillLibraries,
96
101
environmentDefines: environmentDefines,
97
- verbose: verbose);
102
+ verbose: verbose,
103
+ nnbdMode: nnbdMode);
98
104
}
99
105
100
106
Future <InitializedCompilerState > initializeCompiler (
@@ -108,6 +114,7 @@ Future<InitializedCompilerState> initializeCompiler(
108
114
Iterable <String > experiments,
109
115
Map <String , String > environmentDefines, {
110
116
bool verbose: false ,
117
+ NnbdMode nnbdMode: NnbdMode .Weak ,
111
118
}) async {
112
119
// TODO(sigmund): use incremental compiler when it supports our use case.
113
120
// Note: it is common for the summary worker to invoke the compiler with the
@@ -125,7 +132,8 @@ Future<InitializedCompilerState> initializeCompiler(
125
132
..experimentalFlags = parseExperimentalFlags (
126
133
parseExperimentalArguments (experiments),
127
134
onError: (e) => throw e)
128
- ..verbose = verbose;
135
+ ..verbose = verbose
136
+ ..nnbdMode = nnbdMode;
129
137
130
138
ProcessedOptions processedOpts = new ProcessedOptions (options: options);
131
139
0 commit comments