[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
@@ -5,10 +5,10 @@ fun testDD(x: Double?, y: Double?): Boolean {
fun testDF(x: Double?, y: Any?): Boolean {
return when {
y is Float? -> ieee754equals(arg0 = x, arg1 = { // BLOCK
val tmp0_safe_receiver: Float? = y /*as Float? */
val tmp_0: Float? = y /*as Float? */
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.toDouble()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.toDouble()
}
})
else -> false
@@ -18,10 +18,10 @@ fun testDF(x: Double?, y: Any?): Boolean {
fun testDI(x: Double?, y: Any?): Boolean {
return when {
y is Int? -> ieee754equals(arg0 = x, arg1 = { // BLOCK
val tmp1_safe_receiver: Int? = y /*as Int? */
val tmp_1: Int? = y /*as Int? */
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.toDouble()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.toDouble()
}
})
else -> false
@@ -34,10 +34,10 @@ fun testDI2(x: Any?, y: Any?): Boolean {
x is Int? -> y is Double
else -> false
} -> ieee754equals(arg0 = { // BLOCK
val tmp2_safe_receiver: Int? = x /*as Int? */
val tmp_2: Int? = x /*as Int? */
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
else -> tmp2_safe_receiver.toDouble()
EQEQ(arg0 = tmp_2, arg1 = null) -> null
else -> tmp_2.toDouble()
}
}, arg1 = y /*as Double? */)
else -> false
@@ -5,10 +5,10 @@ fun testDD(x: Double?, y: Double?): Boolean {
fun testDF(x: Double?, y: Any?): Boolean {
return when {
y is Float? -> ieee754equals(arg0 = x, arg1 = { // BLOCK
val tmp0_safe_receiver: Any? = y
val tmp_0: Any? = y
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver /*as Float */.toDouble()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0 /*as Float */.toDouble()
}
})
else -> false
@@ -18,10 +18,10 @@ fun testDF(x: Double?, y: Any?): Boolean {
fun testDI(x: Double?, y: Any?): Boolean {
return when {
y is Int? -> ieee754equals(arg0 = x, arg1 = { // BLOCK
val tmp0_safe_receiver: Any? = y
val tmp_1: Any? = y
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver /*as Int */.toDouble()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1 /*as Int */.toDouble()
}
})
else -> false
@@ -34,10 +34,10 @@ fun testDI2(x: Any?, y: Any?): Boolean {
x is Int? -> y is Double
else -> false
} -> ieee754equals(arg0 = { // BLOCK
val tmp0_safe_receiver: Any? = x
val tmp_2: Any? = x
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver /*as Int */.toDouble()
EQEQ(arg0 = tmp_2, arg1 = null) -> null
else -> tmp_2 /*as Int */.toDouble()
}
}, arg1 = y /*as Double? */)
else -> false
@@ -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 tmp1_subject: Double = x /*as Double */
val tmp_1: Double = x /*as Double */
when {
ieee754equals(arg0 = tmp1_subject, arg1 = 0.0) -> 0
ieee754equals(arg0 = tmp_1, 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 tmp2_subject: Double = x
val tmp_2: Double = x
when {
ieee754equals(arg0 = tmp2_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 tmp3_subject: Any = x
val tmp_3: Any = x
when {
tmp3_subject !is Double -> -1
ieee754equals(arg0 = tmp3_subject /*as Double */, arg1 = 0.0) -> 0
tmp_3 !is Double -> -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 tmp4_subject: Double = x /*as Double */
val tmp_4: Double = x /*as Double */
when {
ieee754equals(arg0 = tmp4_subject, arg1 = y /*as Float */.toDouble()) -> 0
ieee754equals(arg0 = tmp_4, 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 tmp5_subject: Any = x
val tmp_5: Any = x
when {
EQEQ(arg0 = tmp5_subject, arg1 = foo(x = when {
EQEQ(arg0 = tmp_5, arg1 = foo(x = when {
x !is Double -> return 42
else -> x /*as Double */
})) -> 0
@@ -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