CLI: remove obsolete language feature arguments

These arguments switch language features which cannot be disabled
anymore because they're enabled from some LV not later than 1.4, and the
minimal supported LV is currently 1.4.
This commit is contained in:
Alexander Udalov
2023-10-24 22:48:55 +02:00
committed by Space Team
parent c2e67619ba
commit 2d308e7c27
9 changed files with 0 additions and 89 deletions
@@ -26,7 +26,6 @@ fun copyCommonCompilerArguments(from: CommonCompilerArguments, to: CommonCompile
to.dumpDirectory = from.dumpDirectory to.dumpDirectory = from.dumpDirectory
to.dumpOnlyFqName = from.dumpOnlyFqName to.dumpOnlyFqName = from.dumpOnlyFqName
to.dumpPerf = from.dumpPerf to.dumpPerf = from.dumpPerf
to.effectSystem = from.effectSystem
to.enableBuilderInference = from.enableBuilderInference to.enableBuilderInference = from.enableBuilderInference
to.enableSignatureClashChecks = from.enableSignatureClashChecks to.enableSignatureClashChecks = from.enableSignatureClashChecks
to.expectActualClasses = from.expectActualClasses to.expectActualClasses = from.expectActualClasses
@@ -64,8 +63,6 @@ fun copyCommonCompilerArguments(from: CommonCompilerArguments, to: CommonCompile
to.pluginOptions = from.pluginOptions?.copyOf() to.pluginOptions = from.pluginOptions?.copyOf()
to.profilePhases = from.profilePhases to.profilePhases = from.profilePhases
to.progressiveMode = from.progressiveMode to.progressiveMode = from.progressiveMode
to.properIeee754Comparisons = from.properIeee754Comparisons
to.readDeserializedContracts = from.readDeserializedContracts
to.relativePathBases = from.relativePathBases?.copyOf() to.relativePathBases = from.relativePathBases?.copyOf()
to.renderInternalDiagnosticNames = from.renderInternalDiagnosticNames to.renderInternalDiagnosticNames = from.renderInternalDiagnosticNames
to.reportOutputFiles = from.reportOutputFiles to.reportOutputFiles = from.reportOutputFiles
@@ -82,7 +79,6 @@ fun copyCommonCompilerArguments(from: CommonCompilerArguments, to: CommonCompile
to.useFirLT = from.useFirLT to.useFirLT = from.useFirLT
to.useIrFakeOverrideBuilder = from.useIrFakeOverrideBuilder to.useIrFakeOverrideBuilder = from.useIrFakeOverrideBuilder
to.useK2 = from.useK2 to.useK2 = from.useK2
to.useMixedNamedArguments = from.useMixedNamedArguments
to.verbosePhases = from.verbosePhases?.copyOf() to.verbosePhases = from.verbosePhases?.copyOf()
return to return to
@@ -251,26 +251,6 @@ progressive mode enabled may cause compilation errors in progressive mode."""
field = value field = value
} }
@Argument(
value = "-Xeffect-system",
description = "Enable experimental language feature: effect system."
)
var effectSystem = false
set(value) {
checkFrozen()
field = value
}
@Argument(
value = "-Xread-deserialized-contracts",
description = "Enable reading contracts from metadata."
)
var readDeserializedContracts = false
set(value) {
checkFrozen()
field = value
}
@IDEAPluginsCompatibilityAPI( @IDEAPluginsCompatibilityAPI(
IDEAPlatforms._212, // maybe 211 AS used it too IDEAPlatforms._212, // maybe 211 AS used it too
IDEAPlatforms._213, IDEAPlatforms._213,
@@ -291,16 +271,6 @@ progressive mode enabled may cause compilation errors in progressive mode."""
field = value field = value
} }
@Argument(
value = "-Xproper-ieee754-comparisons",
description = "Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types."
)
var properIeee754Comparisons = false
set(value) {
checkFrozen()
field = value
}
@Argument(value = "-Xreport-perf", description = "Report detailed performance statistics.") @Argument(value = "-Xreport-perf", description = "Report detailed performance statistics.")
var reportPerf = false var reportPerf = false
set(value) { set(value) {
@@ -542,16 +512,6 @@ They should be a subset of sources passed as free arguments."""
field = value field = value
} }
@Argument(
value = "-Xuse-mixed-named-arguments",
description = "Allow mixing named and unnamed arguments when the arguments appear in their default order."
)
var useMixedNamedArguments = false
set(value) {
checkFrozen()
field = value
}
@Argument( @Argument(
value = "-Xmetadata-klib", value = "-Xmetadata-klib",
description = "Produce a klib that only contains the metadata of declarations.", description = "Produce a klib that only contains the metadata of declarations.",
@@ -840,23 +800,6 @@ The corresponding calls' declarations may not be marked with @BuilderInference."
put(LanguageFeature.SoundSmartCastsAfterTry, LanguageFeature.State.DISABLED) put(LanguageFeature.SoundSmartCastsAfterTry, LanguageFeature.State.DISABLED)
} }
if (effectSystem) {
put(LanguageFeature.UseCallsInPlaceEffect, LanguageFeature.State.ENABLED)
put(LanguageFeature.UseReturnsEffect, LanguageFeature.State.ENABLED)
}
if (readDeserializedContracts) {
put(LanguageFeature.ReadDeserializedContracts, LanguageFeature.State.ENABLED)
}
if (properIeee754Comparisons) {
put(LanguageFeature.ProperIeee754Comparisons, LanguageFeature.State.ENABLED)
}
if (useMixedNamedArguments) {
put(LanguageFeature.MixedNamedArgumentsInTheirOwnPosition, LanguageFeature.State.ENABLED)
}
if (inferenceCompatibility) { if (inferenceCompatibility) {
put(LanguageFeature.InferenceCompatibility, LanguageFeature.State.ENABLED) put(LanguageFeature.InferenceCompatibility, LanguageFeature.State.ENABLED)
} }
-4
View File
@@ -83,7 +83,6 @@ where advanced options include:
-Xdump-directory Dump the backend state into this directory. -Xdump-directory Dump the backend state into this directory.
-Xdump-fqname Dump the declaration with the given FqName. -Xdump-fqname Dump the declaration with the given FqName.
-Xdump-perf=<path> Dump detailed performance statistics to the specified file. -Xdump-perf=<path> Dump detailed performance statistics to the specified file.
-Xeffect-system Enable experimental language feature: effect system.
-Xenable-builder-inference Use builder inference by default for all calls with lambdas that can't be resolved without it. -Xenable-builder-inference Use builder inference by default for all calls with lambdas that can't be resolved without it.
The corresponding calls' declarations may not be marked with @BuilderInference. The corresponding calls' declarations may not be marked with @BuilderInference.
-Xklib-enable-signature-clash-checks -Xklib-enable-signature-clash-checks
@@ -126,8 +125,6 @@ where advanced options include:
-Xcompiler-plugin=<path1>,<path2>:<optionName>=<value>,<optionName>=<value> -Xcompiler-plugin=<path1>,<path2>:<optionName>=<value>,<optionName>=<value>
Register a compiler plugin. Register a compiler plugin.
-Xprofile-phases Profile backend phases. -Xprofile-phases Profile backend phases.
-Xproper-ieee754-comparisons Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types.
-Xread-deserialized-contracts Enable reading contracts from metadata.
-Xklib-relative-path-base Provide a base path to compute the source's relative paths in klib (default is empty). -Xklib-relative-path-base Provide a base path to compute the source's relative paths in klib (default is empty).
-Xrender-internal-diagnostic-names -Xrender-internal-diagnostic-names
Render the internal names of warnings and errors. Render the internal names of warnings and errors.
@@ -146,7 +143,6 @@ where advanced options include:
-Xuse-fir-lt Compile using the LightTree parser with the frontend IR. -Xuse-fir-lt Compile using the LightTree parser with the frontend IR.
-Xuse-ir-fake-override-builder Generate fake overrides via IR. See KT-61514 -Xuse-ir-fake-override-builder Generate fake overrides via IR. See KT-61514
-Xuse-k2 Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet. -Xuse-k2 Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet.
-Xuse-mixed-named-arguments Allow mixing named and unnamed arguments when the arguments appear in their default order.
-Xverbose-phases Be verbose while performing the given backend phases. -Xverbose-phases Be verbose while performing the given backend phases.
Advanced options are non-standard and may be changed or removed without any notice. Advanced options are non-standard and may be changed or removed without any notice.
-4
View File
@@ -170,7 +170,6 @@ where advanced options include:
-Xdump-directory Dump the backend state into this directory. -Xdump-directory Dump the backend state into this directory.
-Xdump-fqname Dump the declaration with the given FqName. -Xdump-fqname Dump the declaration with the given FqName.
-Xdump-perf=<path> Dump detailed performance statistics to the specified file. -Xdump-perf=<path> Dump detailed performance statistics to the specified file.
-Xeffect-system Enable experimental language feature: effect system.
-Xenable-builder-inference Use builder inference by default for all calls with lambdas that can't be resolved without it. -Xenable-builder-inference Use builder inference by default for all calls with lambdas that can't be resolved without it.
The corresponding calls' declarations may not be marked with @BuilderInference. The corresponding calls' declarations may not be marked with @BuilderInference.
-Xklib-enable-signature-clash-checks -Xklib-enable-signature-clash-checks
@@ -213,8 +212,6 @@ where advanced options include:
-Xcompiler-plugin=<path1>,<path2>:<optionName>=<value>,<optionName>=<value> -Xcompiler-plugin=<path1>,<path2>:<optionName>=<value>,<optionName>=<value>
Register a compiler plugin. Register a compiler plugin.
-Xprofile-phases Profile backend phases. -Xprofile-phases Profile backend phases.
-Xproper-ieee754-comparisons Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types.
-Xread-deserialized-contracts Enable reading contracts from metadata.
-Xklib-relative-path-base Provide a base path to compute the source's relative paths in klib (default is empty). -Xklib-relative-path-base Provide a base path to compute the source's relative paths in klib (default is empty).
-Xrender-internal-diagnostic-names -Xrender-internal-diagnostic-names
Render the internal names of warnings and errors. Render the internal names of warnings and errors.
@@ -233,7 +230,6 @@ where advanced options include:
-Xuse-fir-lt Compile using the LightTree parser with the frontend IR. -Xuse-fir-lt Compile using the LightTree parser with the frontend IR.
-Xuse-ir-fake-override-builder Generate fake overrides via IR. See KT-61514 -Xuse-ir-fake-override-builder Generate fake overrides via IR. See KT-61514
-Xuse-k2 Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet. -Xuse-k2 Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet.
-Xuse-mixed-named-arguments Allow mixing named and unnamed arguments when the arguments appear in their default order.
-Xverbose-phases Be verbose while performing the given backend phases. -Xverbose-phases Be verbose while performing the given backend phases.
Advanced options are non-standard and may be changed or removed without any notice. Advanced options are non-standard and may be changed or removed without any notice.
@@ -1,5 +0,0 @@
$TESTDATA_DIR$/useMixedNamedArgumentsFlag.kt
-Xuse-mixed-named-arguments
-Xnew-inference
-d
$TEMP_DIR$
@@ -1,5 +0,0 @@
fun foo(x: Int, y: Int, z: Int): Int = x + y + z
fun test() {
foo(1, y = 2, 3)
}
@@ -1 +0,0 @@
OK
@@ -1195,11 +1195,6 @@ public class CliTestGenerated extends AbstractCliTest {
runTest("compiler/testData/cli/jvm/useDeclarationThatWasExperimentalWithoutMarker.args"); runTest("compiler/testData/cli/jvm/useDeclarationThatWasExperimentalWithoutMarker.args");
} }
@TestMetadata("useMixedNamedArgumentsFlag.args")
public void testUseMixedNamedArgumentsFlag() throws Exception {
runTest("compiler/testData/cli/jvm/useMixedNamedArgumentsFlag.args");
}
@TestMetadata("warningJdkWithNoJdk.args") @TestMetadata("warningJdkWithNoJdk.args")
public void testWarningJdkWithNoJdk() throws Exception { public void testWarningJdkWithNoJdk() throws Exception {
runTest("compiler/testData/cli/jvm/warningJdkWithNoJdk.args"); runTest("compiler/testData/cli/jvm/warningJdkWithNoJdk.args");
@@ -89,9 +89,6 @@ class CompilerArgumentsContentProspectorTest {
CommonCompilerArguments::newInference, CommonCompilerArguments::newInference,
CommonCompilerArguments::inlineClasses, CommonCompilerArguments::inlineClasses,
CommonCompilerArguments::legacySmartCastAfterTry, CommonCompilerArguments::legacySmartCastAfterTry,
CommonCompilerArguments::effectSystem,
CommonCompilerArguments::readDeserializedContracts,
CommonCompilerArguments::properIeee754Comparisons,
CommonCompilerArguments::reportPerf, CommonCompilerArguments::reportPerf,
CommonCompilerArguments::listPhases, CommonCompilerArguments::listPhases,
CommonCompilerArguments::profilePhases, CommonCompilerArguments::profilePhases,
@@ -99,7 +96,6 @@ class CompilerArgumentsContentProspectorTest {
CommonCompilerArguments::checkStickyPhaseConditions, CommonCompilerArguments::checkStickyPhaseConditions,
CommonCompilerArguments::useK2, CommonCompilerArguments::useK2,
CommonCompilerArguments::useFirExtendedCheckers, CommonCompilerArguments::useFirExtendedCheckers,
CommonCompilerArguments::useMixedNamedArguments,
CommonCompilerArguments::metadataKlib, CommonCompilerArguments::metadataKlib,
CommonCompilerArguments::extendedCompilerChecks, CommonCompilerArguments::extendedCompilerChecks,
CommonCompilerArguments::disableDefaultScriptingPlugin, CommonCompilerArguments::disableDefaultScriptingPlugin,