[ddc] Cleanup non-nullable experiment flag
Also remove dead code that was a workaround when there were two forks of the SDK libraries but one version the dart:_runtime. Change-Id: I1192fcc5238fb84ab1cda533bee8bef63d289a2e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231743 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
committed by
Commit Bot
parent
554e5660b7
commit
72d7e5b0ce
@@ -238,9 +238,6 @@ class SharedCompilerOptions {
|
||||
// that build systems do not depend on passing windows-style paths here.
|
||||
return p.toUri(moduleName).toString();
|
||||
}
|
||||
|
||||
// TODO(nshahan) Cleanup when NNBD graduates experimental status.
|
||||
bool get enableNullSafety => experiments['non-nullable'] ?? false;
|
||||
}
|
||||
|
||||
/// Finds explicit module names of the form `path=name` in [summaryPaths],
|
||||
|
||||
@@ -276,7 +276,7 @@ Future<CompilerResult> _compile(List<String> args,
|
||||
additionalDills,
|
||||
DevCompilerTarget(TargetFlags(
|
||||
trackWidgetCreation: trackWidgetCreation,
|
||||
enableNullSafety: options.enableNullSafety)),
|
||||
enableNullSafety: options.soundNullSafety)),
|
||||
fileSystem: fileSystem,
|
||||
explicitExperimentalFlags: explicitExperimentalFlags,
|
||||
environmentDefines: declaredVariables,
|
||||
@@ -315,7 +315,7 @@ Future<CompilerResult> _compile(List<String> args,
|
||||
inputDigests,
|
||||
DevCompilerTarget(TargetFlags(
|
||||
trackWidgetCreation: trackWidgetCreation,
|
||||
enableNullSafety: options.enableNullSafety)),
|
||||
enableNullSafety: options.soundNullSafety)),
|
||||
fileSystem: fileSystem,
|
||||
explicitExperimentalFlags: explicitExperimentalFlags,
|
||||
environmentDefines: declaredVariables,
|
||||
|
||||
@@ -3013,14 +3013,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
|
||||
// * `class A extends B {...}` where B is the InterfaceType.
|
||||
// * Emitting non-null constructor calls.
|
||||
// * The InterfaceType is the Null type.
|
||||
// * The types were written in JS context or as part of the dart:_runtime
|
||||
// library.
|
||||
if (!emitNullability ||
|
||||
type == _coreTypes.deprecatedNullType ||
|
||||
// TODO(38701) Remove these once the SDK has unforked and is running
|
||||
// "opted-in"
|
||||
!coreLibrary.isNonNullableByDefault &&
|
||||
(_isInForeignJS || isSdkInternalRuntime(currentLibrary))) {
|
||||
if (!emitNullability || type == _coreTypes.deprecatedNullType) {
|
||||
return typeRep;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user