[IR] Normalize temp var names in Kotlin-like dump
^KT-61983 Fixed
This commit is contained in:
committed by
Space Team
parent
6c519488a6
commit
bae8b283c7
Vendored
+5
-5
@@ -33,9 +33,9 @@ data class MyContainer {
|
||||
when {
|
||||
other !is MyContainer -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: MyContainer = other as MyContainer
|
||||
val tmp_0: MyContainer = other as MyContainer
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -69,9 +69,9 @@ fun box(): String {
|
||||
var myContainer: MyContainer = MyContainer(i = 0)
|
||||
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
|
||||
myContainer.plusAssign($context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK
|
||||
val <unary>: MyContainer = myContainer
|
||||
myContainer = <unary>.inc($context_receiver_0 = $this$with)
|
||||
<unary>
|
||||
val tmp_1: MyContainer = myContainer
|
||||
myContainer = tmp_1.inc($context_receiver_0 = $this$with)
|
||||
tmp_1
|
||||
}.get($context_receiver_0 = $this$with, index = 0)))
|
||||
}
|
||||
)
|
||||
|
||||
Vendored
+7
-7
@@ -33,9 +33,9 @@ data class MyContainer {
|
||||
when {
|
||||
other !is MyContainer -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: MyContainer = other as MyContainer
|
||||
val tmp_0: MyContainer = other as MyContainer
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -62,8 +62,8 @@ operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: MyContainer = <this>
|
||||
tmp0_this.<set-i>(<set-?> = tmp0_this.<get-i>().plus(other = other.<get-i>()))
|
||||
val tmp_1: MyContainer = <this>
|
||||
tmp_1.<set-i>(<set-?> = tmp_1.<get-i>().plus(other = other.<get-i>()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,9 +78,9 @@ fun box(): String {
|
||||
var myContainer: MyContainer = MyContainer(i = 0)
|
||||
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
|
||||
myContainer.plusAssign($context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK
|
||||
val tmp0: MyContainer = myContainer
|
||||
myContainer = tmp0.inc($context_receiver_0 = $this$with)
|
||||
tmp0
|
||||
val tmp_2: MyContainer = myContainer
|
||||
myContainer = tmp_2.inc($context_receiver_0 = $this$with)
|
||||
tmp_2
|
||||
}.get($context_receiver_0 = $this$with, index = 0)))
|
||||
}
|
||||
)
|
||||
|
||||
+5
-5
@@ -33,9 +33,9 @@ data class MyContainer {
|
||||
when {
|
||||
other !is MyContainer -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: MyContainer = other as MyContainer
|
||||
val tmp_0: MyContainer = other as MyContainer
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#s, arg1 = tmp0_other_with_cast.#s).not() -> return false
|
||||
EQEQ(arg0 = <this>.#s, arg1 = tmp_0.#s).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -67,10 +67,10 @@ fun box(): String {
|
||||
val myContainer: MyContainer = MyContainer(s = "fail")
|
||||
myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK")
|
||||
return { // BLOCK
|
||||
val <elvis>: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
|
||||
val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
|
||||
when {
|
||||
EQEQ(arg0 = <elvis>, arg1 = null) -> "fail"
|
||||
else -> <elvis>
|
||||
EQEQ(arg0 = tmp_1, arg1 = null) -> "fail"
|
||||
else -> tmp_1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -33,9 +33,9 @@ data class MyContainer {
|
||||
when {
|
||||
other !is MyContainer -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: MyContainer = other as MyContainer
|
||||
val tmp_0: MyContainer = other as MyContainer
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#s, arg1 = tmp0_other_with_cast.#s).not() -> return false
|
||||
EQEQ(arg0 = <this>.#s, arg1 = tmp_0.#s).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -67,10 +67,10 @@ fun box(): String {
|
||||
val myContainer: MyContainer = MyContainer(s = "fail")
|
||||
myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK")
|
||||
return { // BLOCK
|
||||
val tmp0_elvis_lhs: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
|
||||
val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0)
|
||||
when {
|
||||
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> "fail"
|
||||
else -> tmp0_elvis_lhs
|
||||
EQEQ(arg0 = tmp_1, arg1 = null) -> "fail"
|
||||
else -> tmp_1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -33,9 +33,9 @@ data class Result {
|
||||
when {
|
||||
other !is Result -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Result = other as Result
|
||||
val tmp_0: Result = other as Result
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
Vendored
+10
-10
@@ -33,9 +33,9 @@ data class Result {
|
||||
when {
|
||||
other !is Result -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Result = other as Result
|
||||
val tmp_0: Result = other as Result
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -59,8 +59,8 @@ operator fun Result.plusAssign($context_receiver_0: Int, other: Result) {
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
tmp0_this.<set-i>(<set-?> = tmp0_this.<get-i>().plus(other = other.<get-i>()))
|
||||
val tmp_1: Result = <this>
|
||||
tmp_1.<set-i>(<set-?> = tmp_1.<get-i>().plus(other = other.<get-i>()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ operator fun Result.minusAssign($context_receiver_0: Int, other: Result) {
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
tmp0_this.<set-i>(<set-?> = tmp0_this.<get-i>().minus(other = other.<get-i>()))
|
||||
val tmp_2: Result = <this>
|
||||
tmp_2.<set-i>(<set-?> = tmp_2.<get-i>().minus(other = other.<get-i>()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ operator fun Result.timesAssign($context_receiver_0: Int, other: Result) {
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
tmp0_this.<set-i>(<set-?> = tmp0_this.<get-i>().times(other = other.<get-i>()))
|
||||
val tmp_3: Result = <this>
|
||||
tmp_3.<set-i>(<set-?> = tmp_3.<get-i>().times(other = other.<get-i>()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,8 +110,8 @@ operator fun Result.divAssign($context_receiver_0: Int, other: Result) {
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
tmp0_this.<set-i>(<set-?> = tmp0_this.<get-i>().div(other = other.<get-i>()))
|
||||
val tmp_4: Result = <this>
|
||||
tmp_4.<set-i>(<set-?> = tmp_4.<get-i>().div(other = other.<get-i>()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -48,12 +48,12 @@ data class Pair<A : Any?, B : Any?> {
|
||||
when {
|
||||
other !is Pair<A, B> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Pair<A, B> = other as Pair<A, B>
|
||||
val tmp_0: Pair<A, B> = other as Pair<A, B>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#first, arg1 = tmp0_other_with_cast.#first).not() -> return false
|
||||
EQEQ(arg0 = <this>.#first, arg1 = tmp_0.#first).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#second, arg1 = tmp0_other_with_cast.#second).not() -> return false
|
||||
EQEQ(arg0 = <this>.#second, arg1 = tmp_0.#second).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
+3
-3
@@ -48,12 +48,12 @@ data class Pair<A : Any?, B : Any?> {
|
||||
when {
|
||||
other !is Pair<A, B> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Pair<A, B> = other as Pair<A, B>
|
||||
val tmp_0: Pair<A, B> = other as Pair<A, B>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#first, arg1 = tmp0_other_with_cast.#first).not() -> return false
|
||||
EQEQ(arg0 = <this>.#first, arg1 = tmp_0.#first).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#second, arg1 = tmp0_other_with_cast.#second).not() -> return false
|
||||
EQEQ(arg0 = <this>.#second, arg1 = tmp_0.#second).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
+11
-11
@@ -33,9 +33,9 @@ data class Counter {
|
||||
when {
|
||||
other !is Counter -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Counter = other as Counter
|
||||
val tmp_0: Counter = other as Counter
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -76,9 +76,9 @@ data class CounterConfig {
|
||||
when {
|
||||
other !is CounterConfig -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: CounterConfig = other as CounterConfig
|
||||
val tmp_1: CounterConfig = other as CounterConfig
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#max, arg1 = tmp0_other_with_cast.#max).not() -> return false
|
||||
EQEQ(arg0 = <this>.#max, arg1 = tmp_1.#max).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -104,10 +104,10 @@ class CounterIterator : Iterator<Int> {
|
||||
|
||||
override operator fun next(): Int {
|
||||
return { // BLOCK
|
||||
val <receiver>: Counter = <this>.<get-counter>()
|
||||
val <unary>: Int = <receiver>.<get-i>()
|
||||
<receiver>.<set-i>(<set-?> = <unary>.inc())
|
||||
<unary>
|
||||
val tmp_2: Counter = <this>.<get-counter>()
|
||||
val tmp_3: Int = tmp_2.<get-i>()
|
||||
tmp_2.<set-i>(<set-?> = tmp_3.inc())
|
||||
tmp_3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,9 +124,9 @@ fun box(): String {
|
||||
var result: Int = 0
|
||||
with<CounterConfig, Unit>(receiver = CounterConfig(), block = local fun CounterConfig.<anonymous>() {
|
||||
{ // BLOCK
|
||||
val <iterator>: CounterIterator = Counter().iterator($context_receiver_0 = $this$with)
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val i: Int = <iterator>.next()
|
||||
val tmp_4: CounterIterator = Counter().iterator($context_receiver_0 = $this$with)
|
||||
while (tmp_4.hasNext()) { // BLOCK
|
||||
val i: Int = tmp_4.next()
|
||||
{ // BLOCK
|
||||
result = result.plus(other = i)
|
||||
}
|
||||
|
||||
+11
-11
@@ -33,9 +33,9 @@ data class Counter {
|
||||
when {
|
||||
other !is Counter -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Counter = other as Counter
|
||||
val tmp_0: Counter = other as Counter
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -76,9 +76,9 @@ data class CounterConfig {
|
||||
when {
|
||||
other !is CounterConfig -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: CounterConfig = other as CounterConfig
|
||||
val tmp_1: CounterConfig = other as CounterConfig
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#max, arg1 = tmp0_other_with_cast.#max).not() -> return false
|
||||
EQEQ(arg0 = <this>.#max, arg1 = tmp_1.#max).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -104,11 +104,11 @@ class CounterIterator : Iterator<Int> {
|
||||
|
||||
override operator fun next(): Int {
|
||||
return { // BLOCK
|
||||
val tmp0_this: Counter = <this>.<get-counter>()
|
||||
val tmp_2: Counter = <this>.<get-counter>()
|
||||
{ // BLOCK
|
||||
val tmp1: Int = tmp0_this.<get-i>()
|
||||
tmp0_this.<set-i>(<set-?> = tmp1.inc())
|
||||
tmp1
|
||||
val tmp_3: Int = tmp_2.<get-i>()
|
||||
tmp_2.<set-i>(<set-?> = tmp_3.inc())
|
||||
tmp_3
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,9 +126,9 @@ fun box(): String {
|
||||
var result: Int = 0
|
||||
with<CounterConfig, Unit>(receiver = CounterConfig(), block = local fun CounterConfig.<anonymous>() {
|
||||
{ // BLOCK
|
||||
val tmp0_iterator: CounterIterator = Counter().iterator($context_receiver_0 = $this$with)
|
||||
while (tmp0_iterator.hasNext()) { // BLOCK
|
||||
val i: Int = tmp0_iterator.next()
|
||||
val tmp_4: CounterIterator = Counter().iterator($context_receiver_0 = $this$with)
|
||||
while (tmp_4.hasNext()) { // BLOCK
|
||||
val i: Int = tmp_4.next()
|
||||
{ // BLOCK
|
||||
result = result.plus(other = i)
|
||||
}
|
||||
|
||||
+11
-11
@@ -32,9 +32,9 @@ data class Result {
|
||||
when {
|
||||
other !is Result -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Result = other as Result
|
||||
val tmp_0: Result = other as Result
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -73,21 +73,21 @@ fun box(): String {
|
||||
var result: Result = Result(i = 0)
|
||||
with<Int, Result>(receiver = 1, block = local fun Int.<anonymous>(): Result {
|
||||
{ // BLOCK
|
||||
val <unary>: Result = result
|
||||
result = <unary>.inc($context_receiver_0 = $this$with)
|
||||
<unary>
|
||||
val tmp_1: Result = result
|
||||
result = tmp_1.inc($context_receiver_0 = $this$with)
|
||||
tmp_1
|
||||
} /*~> Unit */
|
||||
{ // BLOCK
|
||||
val <unary>: Result = result
|
||||
result = <unary>.inc($context_receiver_0 = $this$with)
|
||||
<unary>
|
||||
val tmp_2: Result = result
|
||||
result = tmp_2.inc($context_receiver_0 = $this$with)
|
||||
tmp_2
|
||||
} /*~> Unit */
|
||||
result.unaryMinus($context_receiver_0 = $this$with) /*~> Unit */
|
||||
result.unaryPlus($context_receiver_0 = $this$with) /*~> Unit */
|
||||
return { // BLOCK
|
||||
val <unary>: Result = result
|
||||
result = <unary>.dec($context_receiver_0 = $this$with)
|
||||
<unary>
|
||||
val tmp_3: Result = result
|
||||
result = tmp_3.dec($context_receiver_0 = $this$with)
|
||||
tmp_3
|
||||
}
|
||||
}
|
||||
) /*~> Unit */
|
||||
|
||||
+11
-11
@@ -32,9 +32,9 @@ data class Result {
|
||||
when {
|
||||
other !is Result -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Result = other as Result
|
||||
val tmp_0: Result = other as Result
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp0_other_with_cast.#i).not() -> return false
|
||||
EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -81,21 +81,21 @@ fun box(): String {
|
||||
var result: Result = Result(i = 0)
|
||||
with<Int, Result>(receiver = 1, block = local fun Int.<anonymous>(): Result {
|
||||
{ // BLOCK
|
||||
val tmp0: Result = result
|
||||
result = tmp0.inc($context_receiver_0 = $this$with)
|
||||
tmp0
|
||||
val tmp_1: Result = result
|
||||
result = tmp_1.inc($context_receiver_0 = $this$with)
|
||||
tmp_1
|
||||
} /*~> Unit */
|
||||
{ // BLOCK
|
||||
val tmp1: Result = result
|
||||
result = tmp1.inc($context_receiver_0 = $this$with)
|
||||
tmp1
|
||||
val tmp_2: Result = result
|
||||
result = tmp_2.inc($context_receiver_0 = $this$with)
|
||||
tmp_2
|
||||
} /*~> Unit */
|
||||
result.unaryMinus($context_receiver_0 = $this$with) /*~> Unit */
|
||||
result.unaryPlus($context_receiver_0 = $this$with) /*~> Unit */
|
||||
return { // BLOCK
|
||||
val tmp2: Result = result
|
||||
result = tmp2.dec($context_receiver_0 = $this$with)
|
||||
tmp2
|
||||
val tmp_3: Result = result
|
||||
result = tmp_3.dec($context_receiver_0 = $this$with)
|
||||
tmp_3
|
||||
}
|
||||
}
|
||||
) /*~> Unit */
|
||||
|
||||
Reference in New Issue
Block a user