[IR] Enable -Xvalue-classes flag

Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
This commit is contained in:
Evgeniy.Zhelenskiy
2022-12-21 22:32:43 +01:00
committed by Space Team
parent 26bcfcd375
commit 25db5bf6e1
3 changed files with 11 additions and 0 deletions
@@ -546,6 +546,12 @@ Also sets `-jvm-target` value equal to the selected JDK version"""
)
var oldInnerClassesLogic: Boolean by FreezableVar(false)
@Argument(
value = "-Xvalue-classes",
description = "Enable experimental value classes"
)
var valueClasses: Boolean by FreezableVar(false)
override fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
val result = super.configureAnalysisFlags(collector, languageVersion)
result[JvmAnalysisFlags.strictMetadataVersionSemantics] = strictMetadataVersionSemantics
@@ -581,6 +587,9 @@ Also sets `-jvm-target` value equal to the selected JDK version"""
result[LanguageFeature.ForbidSuperDelegationToAbstractFakeOverride] = LanguageFeature.State.ENABLED
result[LanguageFeature.AbstractClassMemberNotImplementedWithIntermediateAbstractClass] = LanguageFeature.State.ENABLED
}
if (valueClasses) {
result[LanguageFeature.ValueClasses] = LanguageFeature.State.ENABLED
}
return result
}
+1
View File
@@ -157,6 +157,7 @@ where advanced options include:
-Xuse-type-table Use type table in metadata serialization
-Xvalidate-bytecode Validate generated JVM bytecode before and after optimizations
-Xvalidate-ir Validate IR before and after lowering
-Xvalue-classes Enable experimental value classes
-Xallow-any-scripts-in-source-roots
Allow to compile any scripts along with regular Kotlin sources
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
@@ -165,6 +165,7 @@ class CompilerArgumentsContentProspectorTest {
K2JVMCompilerArguments::noUnifiedNullChecks,
K2JVMCompilerArguments::useOldInlineClassesManglingScheme,
K2JVMCompilerArguments::enableJvmPreview,
K2JVMCompilerArguments::valueClasses,
)
private val k2JVMCompilerArgumentsStringProperties = commonCompilerArgumentsStringProperties + listOf(