Introduce -Xpolymorphic-signature compiler flag as more priority than -XXLanguage:+PolymorphicSignature
This commit is contained in:
+10
@@ -134,6 +134,12 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
|||||||
)
|
)
|
||||||
var inlineClasses: Boolean by FreezableVar(false)
|
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(
|
@Argument(
|
||||||
value = "-Xlegacy-smart-cast-after-try",
|
value = "-Xlegacy-smart-cast-after-try",
|
||||||
description = "Allow var smart casts despite assignment in try block"
|
description = "Allow var smart casts despite assignment in try block"
|
||||||
@@ -336,6 +342,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
|||||||
put(LanguageFeature.InlineClasses, LanguageFeature.State.ENABLED)
|
put(LanguageFeature.InlineClasses, LanguageFeature.State.ENABLED)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (polymorphicSignature) {
|
||||||
|
put(LanguageFeature.PolymorphicSignature, LanguageFeature.State.ENABLED)
|
||||||
|
}
|
||||||
|
|
||||||
if (legacySmartCastAfterTry) {
|
if (legacySmartCastAfterTry) {
|
||||||
put(LanguageFeature.SoundSmartCastsAfterTry, LanguageFeature.State.DISABLED)
|
put(LanguageFeature.SoundSmartCastsAfterTry, LanguageFeature.State.DISABLED)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -39,6 +39,7 @@ where advanced options include:
|
|||||||
-Xphases-to-validate-after Validate backend state after these phases
|
-Xphases-to-validate-after Validate backend state after these phases
|
||||||
-Xphases-to-validate-before Validate backend state before these phases
|
-Xphases-to-validate-before Validate backend state before these phases
|
||||||
-Xplugin=<path> Load plugins from the given classpath
|
-Xplugin=<path> Load plugins from the given classpath
|
||||||
|
-Xpolymorphic-signature Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)
|
||||||
-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
|
-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
|
-Xread-deserialized-contracts Enable reading of contracts from metadata
|
||||||
|
|||||||
+1
@@ -101,6 +101,7 @@ where advanced options include:
|
|||||||
-Xphases-to-validate-after Validate backend state after these phases
|
-Xphases-to-validate-after Validate backend state after these phases
|
||||||
-Xphases-to-validate-before Validate backend state before these phases
|
-Xphases-to-validate-before Validate backend state before these phases
|
||||||
-Xplugin=<path> Load plugins from the given classpath
|
-Xplugin=<path> Load plugins from the given classpath
|
||||||
|
-Xpolymorphic-signature Enable experimental support for @PolymorphicSignature (MethodHandle/VarHandle)
|
||||||
-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
|
-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
|
-Xread-deserialized-contracts Enable reading of contracts from metadata
|
||||||
|
|||||||
Reference in New Issue
Block a user