@@ -39,8 +39,7 @@ import 'package:kernel/binary/ast_from_binary.dart'
3939import 'package:kernel/binary/ast_to_binary.dart' ;
4040import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
4141import 'package:kernel/core_types.dart' show CoreTypes;
42- import 'package:kernel/kernel.dart'
43- show Component, Library, Procedure, NonNullableByDefaultCompiledMode;
42+ import 'package:kernel/kernel.dart' show Component, Library, Procedure;
4443import 'package:kernel/target/targets.dart' show Target, TargetFlags;
4544import 'package:vm/http_filesystem.dart' ;
4645import 'package:vm/incremental_compiler.dart' ;
@@ -84,7 +83,6 @@ CompilerOptions setupCompilerOptions(
8483 Uri ? platformKernelPath,
8584 bool enableAsserts,
8685 bool embedSources,
87- bool soundNullSafety,
8886 List <String >? experimentalFlags,
8987 Uri ? packagesUri,
9088 List <String > errorsPlain,
@@ -100,8 +98,7 @@ CompilerOptions setupCompilerOptions(
10098 }
10199
102100 Verbosity verbosity = Verbosity .parseArgument (verbosityLevel);
103- Target target = new VmTarget (new TargetFlags (
104- soundNullSafety: soundNullSafety, supportMirrors: enableMirrors));
101+ Target target = new VmTarget (new TargetFlags (supportMirrors: enableMirrors));
105102 return new CompilerOptions ()
106103 ..fileSystem = fileSystem
107104 ..target = target
@@ -118,7 +115,6 @@ CompilerOptions setupCompilerOptions(
118115 errorsColorized.add (msg);
119116 })
120117 ..environmentDefines = new EnvironmentMap ()
121- ..nnbdMode = soundNullSafety ? NnbdMode .Strong : NnbdMode .Weak
122118 ..onDiagnostic = (DiagnosticMessage message) {
123119 bool printToStdErr = false ;
124120 bool printToStdOut = false ;
@@ -161,7 +157,6 @@ abstract class Compiler {
161157 final Uri ? platformKernelPath;
162158 final bool enableAsserts;
163159 final bool embedSources;
164- final bool soundNullSafety;
165160 final List <String >? experimentalFlags;
166161 final String ? packageConfig;
167162 final String invocationModes;
@@ -181,7 +176,6 @@ abstract class Compiler {
181176 Compiler (this .isolateGroupId, this .fileSystem, this .platformKernelPath,
182177 {this .enableAsserts = false ,
183178 this .embedSources = true ,
184- this .soundNullSafety = true ,
185179 this .experimentalFlags = null ,
186180 this .supportCodeCoverage = false ,
187181 this .supportHotReload = false ,
@@ -207,7 +201,6 @@ abstract class Compiler {
207201 platformKernelPath,
208202 enableAsserts,
209203 embedSources,
210- soundNullSafety,
211204 experimentalFlags,
212205 packagesUri,
213206 errorsPlain,
@@ -297,15 +290,13 @@ class IncrementalCompilerWrapper extends Compiler {
297290 IncrementalCompilerWrapper (
298291 int isolateGroupId, FileSystem fileSystem, Uri ? platformKernelPath,
299292 {bool enableAsserts = false ,
300- bool soundNullSafety = true ,
301293 List <String >? experimentalFlags,
302294 String ? packageConfig,
303295 String invocationModes = '' ,
304296 String verbosityLevel = Verbosity .defaultValue,
305297 required bool enableMirrors})
306298 : super (isolateGroupId, fileSystem, platformKernelPath,
307299 enableAsserts: enableAsserts,
308- soundNullSafety: soundNullSafety,
309300 experimentalFlags: experimentalFlags,
310301 supportHotReload: true ,
311302 supportCodeCoverage: true ,
@@ -357,7 +348,6 @@ class IncrementalCompilerWrapper extends Compiler {
357348 IncrementalCompilerWrapper clone = IncrementalCompilerWrapper (
358349 isolateGroupId, fileSystem, platformKernelPath,
359350 enableAsserts: enableAsserts,
360- soundNullSafety: soundNullSafety,
361351 experimentalFlags: experimentalFlags,
362352 packageConfig: packageConfig,
363353 invocationModes: invocationModes,
@@ -393,7 +383,6 @@ class SingleShotCompilerWrapper extends Compiler {
393383 {this .requireMain = false ,
394384 bool enableAsserts = false ,
395385 bool embedSources = true ,
396- bool soundNullSafety = true ,
397386 List <String >? experimentalFlags,
398387 String ? packageConfig,
399388 String invocationModes = '' ,
@@ -402,7 +391,6 @@ class SingleShotCompilerWrapper extends Compiler {
402391 : super (isolateGroupId, fileSystem, platformKernelPath,
403392 enableAsserts: enableAsserts,
404393 embedSources: embedSources,
405- soundNullSafety: soundNullSafety,
406394 experimentalFlags: experimentalFlags,
407395 packageConfig: packageConfig,
408396 invocationModes: invocationModes,
@@ -438,7 +426,6 @@ IncrementalCompilerWrapper? lookupIncrementalCompiler(int isolateGroupId) {
438426Future <Compiler > lookupOrBuildNewIncrementalCompiler (int isolateGroupId,
439427 List sourceFiles, Uri platformKernelPath, List <int >? platformKernel,
440428 {bool enableAsserts = false ,
441- bool soundNullSafety = true ,
442429 List <String >? experimentalFlags,
443430 String ? packageConfig,
444431 String ? multirootFilepaths,
@@ -470,7 +457,6 @@ Future<Compiler> lookupOrBuildNewIncrementalCompiler(int isolateGroupId,
470457 compiler = new IncrementalCompilerWrapper (
471458 isolateGroupId, fileSystem, platformKernelPath,
472459 enableAsserts: enableAsserts,
473- soundNullSafety: soundNullSafety,
474460 experimentalFlags: experimentalFlags,
475461 packageConfig: packageConfig,
476462 invocationModes: invocationModes,
@@ -778,7 +764,7 @@ Future _processLoadRequest(request) async {
778764 }
779765
780766 final SendPort port = request[1 ];
781- final int isolateGroupId = request[8 ];
767+ final int isolateGroupId = request[7 ];
782768 if (tag == kListDependenciesTag) {
783769 await _processListDependenciesRequest (port, isolateGroupId);
784770 return ;
@@ -790,16 +776,15 @@ Future _processLoadRequest(request) async {
790776 final bool incremental = request[4 ];
791777 final bool forSnapshot = request[5 ];
792778 final bool embedSources = request[6 ];
793- final bool soundNullSafety = request[7 ];
794- final List sourceFiles = request[9 ];
795- final bool enableAsserts = request[10 ];
779+ final List sourceFiles = request[8 ];
780+ final bool enableAsserts = request[9 ];
796781 final List <String >? experimentalFlags =
797- request[11 ] != null ? request[11 ].cast <String >() : null ;
798- final String ? packageConfig = request[12 ];
799- final String ? multirootFilepaths = request[13 ];
800- final String ? multirootScheme = request[14 ];
801- final String verbosityLevel = request[16 ];
802- final bool enableMirrors = request[17 ];
782+ request[10 ] != null ? request[10 ].cast <String >() : null ;
783+ final String ? packageConfig = request[11 ];
784+ final String ? multirootFilepaths = request[12 ];
785+ final String ? multirootScheme = request[13 ];
786+ final String verbosityLevel = request[14 ];
787+ final bool enableMirrors = request[15 ];
803788 Uri platformKernelPath;
804789 List <int >? platformKernel = null ;
805790 if (request[3 ] is String ) {
@@ -869,7 +854,6 @@ Future _processLoadRequest(request) async {
869854 compiler = await lookupOrBuildNewIncrementalCompiler (
870855 isolateGroupId, sourceFiles, platformKernelPath, platformKernel,
871856 enableAsserts: enableAsserts,
872- soundNullSafety: soundNullSafety,
873857 experimentalFlags: experimentalFlags,
874858 packageConfig: packageConfig,
875859 multirootFilepaths: multirootFilepaths,
@@ -886,7 +870,6 @@ Future _processLoadRequest(request) async {
886870 requireMain: false ,
887871 embedSources: embedSources,
888872 enableAsserts: enableAsserts,
889- soundNullSafety: soundNullSafety,
890873 experimentalFlags: experimentalFlags,
891874 packageConfig: packageConfig,
892875 invocationModes: invocationModes,
@@ -919,9 +902,6 @@ Future _processLoadRequest(request) async {
919902 await NativeAssetsSynthesizer .synthesizeLibraryFromYamlString (
920903 nativeAssets,
921904 errorDetector,
922- nonNullableByDefaultCompiledMode: soundNullSafety
923- ? NonNullableByDefaultCompiledMode .Strong
924- : NonNullableByDefaultCompiledMode .Weak ,
925905 pragmaClass: compilerResult.coreTypes? .pragmaClass,
926906 );
927907 if (nativeAssetsLibrary != null ) {
@@ -1138,15 +1118,13 @@ Future trainInternal(String scriptUri, String? platformKernelPath) async {
11381118 false /* incremental */ ,
11391119 false /* for_snapshot */ ,
11401120 true /* embed_sources */ ,
1141- true /* null safety */ ,
11421121 1 /* isolateGroupId chosen randomly */ ,
11431122 [] /* source files */ ,
11441123 false /* enable asserts */ ,
11451124 null /* experimental_flags */ ,
11461125 null /* package_config */ ,
11471126 null /* multirootFilepaths */ ,
11481127 null /* multirootScheme */ ,
1149- null /* original working directory */ ,
11501128 'all' /* CFE logging mode */ ,
11511129 true /* enableMirrors */ ,
11521130 null /* native assets yaml */ ,
0 commit comments