[IR] Normalize temp var names in Kotlin-like dump

^KT-61983 Fixed
This commit is contained in:
Vladimir Sukharev
2023-09-19 21:29:17 +02:00
committed by Space Team
parent 6c519488a6
commit bae8b283c7
199 changed files with 1599 additions and 2273 deletions
+12 -12
View File
@@ -1,9 +1,9 @@
fun test_1(value: Any?): String? {
return { // BLOCK
val tmp0_safe_receiver: Any? = value
val tmp_0: Any? = value
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.let<Any, Nothing>(block = local fun <anonymous>(it: Any): Nothing {
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.let<Any, Nothing>(block = local fun <anonymous>(it: Any): Nothing {
return "O"
}
)
@@ -14,10 +14,10 @@ fun test_1(value: Any?): String? {
fun test_2(value: Any?): String? {
return run<Nothing?>(block = local fun <anonymous>(): Nothing? {
return { // BLOCK
val tmp0_safe_receiver: Any? = value
val tmp_1: Any? = value
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.let<Any, Nothing>(block = local fun <anonymous>(it: Any): Nothing {
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.let<Any, Nothing>(block = local fun <anonymous>(it: Any): Nothing {
return "K"
}
)
@@ -30,17 +30,17 @@ fun test_2(value: Any?): String? {
fun box(): String {
var result: String = ""
result = result.plus(other = { // BLOCK
val tmp0_elvis_lhs: String? = test_1(value = 1)
val tmp_2: String? = test_1(value = 1)
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> return "fail 1"
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_2, arg1 = null) -> return "fail 1"
else -> tmp_2
}
})
result = result.plus(other = { // BLOCK
val tmp1_elvis_lhs: String? = test_2(value = 1)
val tmp_3: String? = test_2(value = 1)
when {
EQEQ(arg0 = tmp1_elvis_lhs, arg1 = null) -> return "fail 2"
else -> tmp1_elvis_lhs
EQEQ(arg0 = tmp_3, arg1 = null) -> return "fail 2"
else -> tmp_3
}
})
return result