[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
@@ -1,8 +1,8 @@
fun testSimple(x: Double): Int {
return { // BLOCK
val tmp0_subject: Double = x
val tmp_0: Double = x
when {
ieee754equals(arg0 = tmp0_subject, arg1 = 0.0) -> 0
ieee754equals(arg0 = tmp_0, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -13,9 +13,9 @@ fun testSmartCastInWhenSubject(x: Any): Int {
x !is Double -> return -1
}
return { // BLOCK
val tmp0_subject: Any = x
val tmp_1: Any = x
when {
ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0) -> 0
ieee754equals(arg0 = tmp_1 /*as Double */, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -26,9 +26,9 @@ fun testSmartCastInWhenCondition(x: Double, y: Any): Int {
y !is Double -> return -1
}
return { // BLOCK
val tmp0_subject: Double = x
val tmp_2: Double = x
when {
ieee754equals(arg0 = tmp0_subject, arg1 = y /*as Double */) -> 0
ieee754equals(arg0 = tmp_2, arg1 = y /*as Double */) -> 0
else -> 1
}
}
@@ -36,10 +36,10 @@ fun testSmartCastInWhenCondition(x: Double, y: Any): Int {
fun testSmartCastInWhenConditionInBranch(x: Any): Int {
return { // BLOCK
val tmp0_subject: Any = x
val tmp_3: Any = x
when {
tmp0_subject is Double.not() -> -1
ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0) -> 0
tmp_3 is Double.not() -> -1
ieee754equals(arg0 = tmp_3 /*as Double */, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -53,9 +53,9 @@ fun testSmartCastToDifferentTypes(x: Any, y: Any): Int {
y !is Float -> return -1
}
return { // BLOCK
val tmp0_subject: Any = x
val tmp_4: Any = x
when {
ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = y /*as Float */.toDouble()) -> 0
ieee754equals(arg0 = tmp_4 /*as Double */, arg1 = y /*as Float */.toDouble()) -> 0
else -> 1
}
}
@@ -67,9 +67,9 @@ fun foo(x: Double): Double {
fun testWithPrematureExitInConditionSubexpression(x: Any): Int {
return { // BLOCK
val tmp0_subject: Any = x
val tmp_5: Any = x
when {
EQEQ(arg0 = tmp0_subject, arg1 = foo(x = when {
EQEQ(arg0 = tmp_5, arg1 = foo(x = when {
x !is Double -> return 42
else -> x /*as Double */
})) -> 0