Skip to content

Commit 0060b0f

Browse files
johnniwintherCommit Queue
authored andcommitted
[cfe] Remove nnbd mode
TEST=existing Change-Id: I30bbadb74e81c7f4aaa444d1e2f6f5ffc2005d4a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412881 Reviewed-by: Jens Johansen <[email protected]> Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Alexander Thomas <[email protected]> Reviewed-by: Alexander Markov <[email protected]>
1 parent b9348c7 commit 0060b0f

File tree

90 files changed

+123
-1137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+123
-1137
lines changed

pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,18 +1491,6 @@ Message _withArgumentsCombinedMemberSignatureFailed(String name, String name2) {
14911491
);
14921492
}
14931493

1494-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1495-
const Code<Null> codeCompilingWithoutSoundNullSafety =
1496-
messageCompilingWithoutSoundNullSafety;
1497-
1498-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1499-
const MessageCode messageCompilingWithoutSoundNullSafety = const MessageCode(
1500-
"CompilingWithoutSoundNullSafety",
1501-
severity: Severity.info,
1502-
problemMessage: r"""Compiling without sound null safety!
1503-
Dart 3 will only support sound null safety, see https://dart.dev/null-safety""",
1504-
);
1505-
15061494
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
15071495
const Template<Message Function(String string, String string2)>
15081496
templateConflictingModifiers =

pkg/compiler/lib/src/ir/constants.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class Dart2jsConstantEvaluator extends ir.TryConstantEvaluator {
1919
ir.ReportErrorFunction reportError, {
2020
Environment? environment,
2121
super.supportReevaluationForTesting,
22-
required super.evaluationMode,
2322
}) : super(
2423
const Dart2jsDartLibrarySupport(),
2524
const Dart2jsConstantsBackend(supportsUnevaluatedConstants: false),

pkg/compiler/lib/src/phase/load_kernel.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ void _simplifyConstConditionals(
164164
reportMessage,
165165
environmentDefines: options.environment,
166166
classHierarchy: classHierarchy,
167-
evaluationMode:
168-
options.useLegacySubtyping
169-
? fe.EvaluationMode.weak
170-
: fe.EvaluationMode.strong,
171167
shouldNotInline: shouldNotInline,
172168
removeAsserts: !options.enableUserAssertions,
173169
).run();
@@ -198,10 +194,6 @@ void _doTransformsOnKernelLoad(
198194
(fe.LocatedMessage message, List<fe.LocatedMessage>? context) =>
199195
reportLocatedMessage(reporter, message, context),
200196
environment: Environment(options.environment),
201-
evaluationMode:
202-
options.useLegacySubtyping
203-
? fe.EvaluationMode.weak
204-
: fe.EvaluationMode.strong,
205197
);
206198
StaticInteropClassEraser(coreTypes).visitComponent(component);
207199
global_transforms.transformLibraries(
@@ -347,8 +339,6 @@ Future<_LoadFromSourceResult> _loadFromSource(
347339
options.packageConfig,
348340
explicitExperimentalFlags: options.explicitExperimentalFlags,
349341
environmentDefines: environment,
350-
nnbdMode:
351-
options.useLegacySubtyping ? fe.NnbdMode.Weak : fe.NnbdMode.Strong,
352342
invocationModes: options.cfeInvocationModes,
353343
verbosity: verbosity,
354344
);

pkg/compiler/test/end_to_end/dill_loader_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ main() {
2929
var options =
3030
CompilerOptions()
3131
..target = Dart2jsTarget("dart2js", TargetFlags())
32-
..nnbdMode = NnbdMode.Strong
3332
..packagesFileUri = Uri.base.resolve('.dart_tool/package_config.json')
3433
..additionalDills = <Uri>[
3534
computePlatformBinariesLocation().resolve("dart2js_platform.dill"),

pkg/compiler/test/end_to_end/modular_loader_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ Future<Uint8List> compileUnit(
115115
CompilerOptions()
116116
..target = Dart2jsTarget("dart2js", TargetFlags())
117117
..fileSystem = TestFileSystem(fs)
118-
..nnbdMode = NnbdMode.Strong
119118
..additionalDills = additionalDills
120119
..packagesFileUri = toTestUri('.dart_tool/package_config.json')
121120
..explicitExperimentalFlags = {ExperimentalFlag.nonNullable: true};

pkg/compiler/test/model/cfe_constant_evaluation_common.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -904,10 +904,6 @@ Future<void> runEnvTest(
904904
},
905905
environment: Environment(env),
906906
supportReevaluationForTesting: true,
907-
evaluationMode:
908-
compiler.options.useLegacySubtyping
909-
? ir.EvaluationMode.weak
910-
: ir.EvaluationMode.strong,
911907
);
912908
ir.Constant evaluatedConstant = evaluator.evaluate(
913909
ir.StaticTypeContext(node, typeEnvironment),

pkg/dart2wasm/lib/compile.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import 'package:front_end/src/api_unstable/vm.dart'
1515
CompilerResult,
1616
DiagnosticMessage,
1717
kernelForProgram,
18-
NnbdMode,
1918
Severity;
2019
import 'package:kernel/ast.dart';
2120
import 'package:kernel/class_hierarchy.dart';
@@ -136,8 +135,7 @@ Future<CompilationResult> compileToModule(
136135
}
137136
..explicitExperimentalFlags = options.feExperimentalFlags
138137
..verbose = false
139-
..onDiagnostic = diagnosticMessageHandler
140-
..nnbdMode = NnbdMode.Strong;
138+
..onDiagnostic = diagnosticMessageHandler;
141139
if (options.multiRootScheme != null) {
142140
compilerOptions.fileSystem = MultiRootFileSystem(
143141
options.multiRootScheme!,

pkg/dart2wasm/lib/constant_evaluator.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class ConstantEvaluator extends kernel.ConstantEvaluator
5050
enableTripleShift: true,
5151
enableAsserts: options.translatorOptions.enableAsserts,
5252
errorOnUnevaluatedConstant: true,
53-
evaluationMode: kernel.EvaluationMode.strong,
5453
);
5554

5655
@override

pkg/dart2wasm/lib/target.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:_js_interop_checks/src/transformations/shared_interop_transforme
1010
import 'package:front_end/src/api_prototype/const_conditional_simplifier.dart'
1111
show ConstConditionalSimplifier;
1212
import 'package:front_end/src/api_prototype/constant_evaluator.dart'
13-
as constantEvaluator show ConstantEvaluator, EvaluationMode;
13+
as constantEvaluator show ConstantEvaluator;
1414
import 'package:kernel/ast.dart';
1515
import 'package:kernel/class_hierarchy.dart';
1616
import 'package:kernel/clone.dart';
@@ -320,7 +320,6 @@ class WasmTarget extends Target {
320320
component,
321321
reportError,
322322
environmentDefines: environmentDefines,
323-
evaluationMode: constantEvaluator.EvaluationMode.strong,
324323
coreTypes: coreTypes,
325324
classHierarchy: hierarchy,
326325
removeAsserts: removeAsserts,

pkg/dev_compiler/lib/src/command/command.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,7 @@ Future<CompilerResult> _compile(List<String> args,
292292
soundNullSafety: options.soundNullSafety)),
293293
fileSystem: fileSystem,
294294
explicitExperimentalFlags: explicitExperimentalFlags,
295-
environmentDefines: declaredVariables,
296-
nnbdMode:
297-
options.soundNullSafety ? fe.NnbdMode.Strong : fe.NnbdMode.Weak);
295+
environmentDefines: declaredVariables);
298296
result = await fe.compile(compilerState, inputs, diagnosticMessageHandler);
299297
} else {
300298
// If digests weren't given and if not in worker mode, create fake data and
@@ -334,9 +332,7 @@ Future<CompilerResult> _compile(List<String> args,
334332
fileSystem: fileSystem,
335333
explicitExperimentalFlags: explicitExperimentalFlags,
336334
environmentDefines: declaredVariables,
337-
trackNeededDillLibraries: recordUsedInputs,
338-
nnbdMode:
339-
options.soundNullSafety ? fe.NnbdMode.Strong : fe.NnbdMode.Weak);
335+
trackNeededDillLibraries: recordUsedInputs);
340336
var incrementalCompiler = compilerState.incrementalCompiler!;
341337
var cachedSdkInput = compileSdk
342338
? null

0 commit comments

Comments
 (0)