Add -Xsanitize-parentheses to workaround ASM 6.1 issue in frame computation

#KT-29475 Fixed
This commit is contained in:
Alexander Udalov
2019-01-30 14:27:56 +01:00
parent dfb379d999
commit db487a622a
17 changed files with 163 additions and 3 deletions
@@ -252,6 +252,14 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
)
var strictMetadataVersionSemantics: Boolean by FreezableVar(false)
@Argument(
value = "-Xsanitize-parentheses",
description = "Transform '(' and ')' in method names to some other character sequence.\n" +
"This mode can BREAK BINARY COMPATIBILITY and is only supposed to be used as a workaround\n" +
"of an issue in the ASM bytecode framework. See KT-29475 for more details"
)
var sanitizeParentheses: Boolean by FreezableVar(false)
@Argument(
value = "-Xfriend-paths",
valueDescription = "<path>",
@@ -274,6 +282,7 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
"supported modes: ${JvmDefaultMode.values().map { it.description }}"
)
result[JvmAnalysisFlags.inheritMultifileParts] = inheritMultifileParts
result[JvmAnalysisFlags.sanitizeParentheses] = sanitizeParentheses
return result
}