Introduce -Xpolymorphic-signature compiler flag as more priority than -XXLanguage:+PolymorphicSignature

This commit is contained in:
Victor Petukhov
2019-07-26 08:57:35 +03:00
parent 944ee8fcd5
commit e25b315319
3 changed files with 12 additions and 0 deletions

View File

@@ -134,6 +134,12 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
)
var inlineClasses: Boolean by FreezableVar(false)
@Argument(
value = "-Xpolymorphic-signature",
description = "Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)"
)
var polymorphicSignature: Boolean by FreezableVar(false)
@Argument(
value = "-Xlegacy-smart-cast-after-try",
description = "Allow var smart casts despite assignment in try block"
@@ -336,6 +342,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
put(LanguageFeature.InlineClasses, LanguageFeature.State.ENABLED)
}
if (polymorphicSignature) {
put(LanguageFeature.PolymorphicSignature, LanguageFeature.State.ENABLED)
}
if (legacySmartCastAfterTry) {
put(LanguageFeature.SoundSmartCastsAfterTry, LanguageFeature.State.DISABLED)
}

View File

@@ -39,6 +39,7 @@ where advanced options include:
-Xphases-to-validate-after Validate backend state after these phases
-Xphases-to-validate-before Validate backend state before these phases
-Xplugin=<path> Load plugins from the given classpath
-Xpolymorphic-signature Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)
-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 of contracts from metadata

View File

@@ -101,6 +101,7 @@ where advanced options include:
-Xphases-to-validate-after Validate backend state after these phases
-Xphases-to-validate-before Validate backend state before these phases
-Xplugin=<path> Load plugins from the given classpath
-Xpolymorphic-signature Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)
-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 of contracts from metadata