Add runtime string concat options. Some renaming

This commit is contained in:
Mikhael Bogdanov
2020-09-29 08:47:06 +02:00
parent 04012951c1
commit c329c22630
20 changed files with 97 additions and 24 deletions
@@ -157,6 +157,7 @@ abstract class KotlinBaseTest<F : KotlinBaseTest.TestFile> : KtUsefulTestCase()
"CONSTRUCTOR_CALL_NORMALIZATION_MODE=([a-zA-Z_\\-0-9]*)"
)
private val ASSERTIONS_MODE_FLAG_PATTERN = Pattern.compile("ASSERTIONS_MODE=([a-zA-Z_0-9-]*)")
private val RUNTIME_STRING_CONCAT = Pattern.compile("RUNTIME_STRING_CONCAT=([a-zA-Z_0-9-]*)")
private fun tryApplyBooleanFlag(
configuration: CompilerConfiguration,
@@ -294,6 +295,14 @@ abstract class KotlinBaseTest<F : KotlinBaseTest.TestFile> : KtUsefulTestCase()
?: error("Wrong ASSERTIONS_MODE value: $flagValueString")
configuration.put(JVMConfigurationKeys.ASSERTIONS_MODE, mode)
}
m = RUNTIME_STRING_CONCAT.matcher(flag)
if (m.matches()) {
val flagValueString = m.group(1)
val mode = JvmRuntimeStringConcat.fromString(flagValueString)
?: error("Wrong RUNTIME_STRING_CONCAT value: $flagValueString")
configuration.put(JVMConfigurationKeys.RUNTIME_STRING_CONCAT, mode)
}
}
}