[JVM] Reduce number of param slots for string concatenation

With paramSlot = 200 those tests fails on JDKs which are newer than JDK 9
- testConcatDynamic200Long
- testConcatDynamicIndy200Long()
This commit is contained in:
Dmitriy Novozhilov
2021-07-30 18:55:08 +03:00
committed by teamcityserver
parent 5206b45ce3
commit 199ec60742
10 changed files with 119 additions and 4 deletions
@@ -0,0 +1,21 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
fun box() {
val z = "0"
val result = z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
"some constant" + "some constant" + "some constant" + "some constant" + // constant in this mode are inlined in recipe
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z //199
}
// 1 INVOKEDYNAMIC makeConcatWithConstants
// 0 append
// 0 stringPlus
@@ -16,6 +16,6 @@ fun box() {
z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z //200
}
// 1 INVOKEDYNAMIC makeConcatWithConstants
// 2 INVOKEDYNAMIC makeConcatWithConstants
// 0 append
// 0 stringPlus
// 0 stringPlus