[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
@@ -45,37 +45,37 @@ fun withVararg(vararg xs: Int): Int {
fun test1() {
{ // BLOCK
val <array>: A = A
val <index_0>: Function1<Int, Unit> = { // BLOCK
val tmp_0: A = A
val tmp_1: Function1<Int, Unit> = { // BLOCK
local fun withVararg(p0: Int) {
withVararg(xs = [p0])
}
::withVararg
}
<array>.set(i = <index_0> /*-> IFoo */, newValue = <array>.get(i = <index_0> /*-> IFoo */).plus(other = 1))
tmp_0.set(i = tmp_1 /*-> IFoo */, newValue = tmp_0.get(i = tmp_1 /*-> IFoo */).plus(other = 1))
}
}
fun test2() {
{ // BLOCK
val <array>: B = B
val <index_0>: Function1<Int, Unit> = { // BLOCK
val tmp_2: B = B
val tmp_3: Function1<Int, Unit> = { // BLOCK
local fun withVararg(p0: Int) {
withVararg(xs = [p0])
}
::withVararg
}
<array>.set(i = <index_0> /*-> IFoo2 */, newValue = <array>.get(i = <index_0> /*-> IFoo */).plus(other = 1))
tmp_2.set(i = tmp_3 /*-> IFoo2 */, newValue = tmp_2.get(i = tmp_3 /*-> IFoo */).plus(other = 1))
}
}
fun test3(fn: Function1<Int, Unit>) {
{ // BLOCK
val <array>: A = A
val <index_0>: Function1<Int, Unit> = fn
<array>.set(i = <index_0> /*-> IFoo */, newValue = <array>.get(i = <index_0> /*-> IFoo */).plus(other = 1))
val tmp_4: A = A
val tmp_5: Function1<Int, Unit> = fn
tmp_4.set(i = tmp_5 /*-> IFoo */, newValue = tmp_4.get(i = tmp_5 /*-> IFoo */).plus(other = 1))
}
}
@@ -83,9 +83,9 @@ fun test4(fn: Function1<Int, Unit>) {
when {
fn is IFoo -> { // BLOCK
{ // BLOCK
val <array>: A = A
val <index_0>: IFoo = fn /*as IFoo */
<array>.set(i = <index_0>, newValue = <array>.get(i = <index_0>).plus(other = 1))
val tmp_6: A = A
val tmp_7: IFoo = fn /*as IFoo */
tmp_6.set(i = tmp_7, newValue = tmp_6.get(i = tmp_7).plus(other = 1))
}
}
}
@@ -94,9 +94,9 @@ fun test4(fn: Function1<Int, Unit>) {
fun test5(a: Any) {
a as Function1<Int, Unit> /*~> Unit */
{ // BLOCK
val <array>: A = A
val <index_0>: Function1<Int, Unit> = a /*as Function1<Int, Unit> */
<array>.set(i = <index_0> /*-> IFoo */, newValue = <array>.get(i = <index_0> /*-> IFoo */).plus(other = 1))
val tmp_8: A = A
val tmp_9: Function1<Int, Unit> = a /*as Function1<Int, Unit> */
tmp_8.set(i = tmp_9 /*-> IFoo */, newValue = tmp_8.get(i = tmp_9 /*-> IFoo */).plus(other = 1))
}
}
@@ -104,9 +104,9 @@ fun test6(a: Any) {
a as Function1<Int, Unit> /*~> Unit */
a /*as Function1<Int, Unit> */ as IFoo /*~> Unit */
{ // BLOCK
val <array>: A = A
val <index_0>: Function1<Int, Unit> = a /*as Function1<Int, Unit> */
<array>.set(i = <index_0>, newValue = <array>.get(i = <index_0>).plus(other = 1))
val tmp_10: A = A
val tmp_11: Function1<Int, Unit> = a /*as Function1<Int, Unit> */
tmp_10.set(i = tmp_11, newValue = tmp_10.get(i = tmp_11).plus(other = 1))
}
}
@@ -45,37 +45,37 @@ fun withVararg(vararg xs: Int): Int {
fun test1() {
{ // BLOCK
val tmp0_array: A = A
val tmp2_sam: IFoo = { // BLOCK
val tmp_0: A = A
val tmp_1: IFoo = { // BLOCK
local fun withVararg(p0: Int) {
withVararg(xs = [p0]) /*~> Unit */
}
::withVararg
} /*-> IFoo */
tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1))
tmp_0.set(i = tmp_1, newValue = tmp_0.get(i = tmp_1).plus(other = 1))
}
}
fun test2() {
{ // BLOCK
val tmp0_array: B = B
val tmp2_sam: IFoo2 = { // BLOCK
val tmp_2: B = B
val tmp_3: IFoo2 = { // BLOCK
local fun withVararg(p0: Int) {
withVararg(xs = [p0]) /*~> Unit */
}
::withVararg
} /*-> IFoo2 */
tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1))
tmp_2.set(i = tmp_3, newValue = tmp_2.get(i = tmp_3).plus(other = 1))
}
}
fun test3(fn: Function1<Int, Unit>) {
{ // BLOCK
val tmp0_array: A = A
val tmp2_sam: IFoo = fn /*-> IFoo */
tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1))
val tmp_4: A = A
val tmp_5: IFoo = fn /*-> IFoo */
tmp_4.set(i = tmp_5, newValue = tmp_4.get(i = tmp_5).plus(other = 1))
}
}
@@ -83,9 +83,9 @@ fun test4(fn: Function1<Int, Unit>) {
when {
fn is IFoo -> { // BLOCK
{ // BLOCK
val tmp0_array: A = A
val tmp1_index0: Function1<Int, Unit> = fn
tmp0_array.set(i = tmp1_index0 /*as IFoo */, newValue = tmp0_array.get(i = tmp1_index0 /*as IFoo */).plus(other = 1))
val tmp_6: A = A
val tmp_7: Function1<Int, Unit> = fn
tmp_6.set(i = tmp_7 /*as IFoo */, newValue = tmp_6.get(i = tmp_7 /*as IFoo */).plus(other = 1))
}
}
}
@@ -94,9 +94,9 @@ fun test4(fn: Function1<Int, Unit>) {
fun test5(a: Any) {
a as Function1<Int, Unit> /*~> Unit */
{ // BLOCK
val tmp0_array: A = A
val tmp2_sam: IFoo = a /*as Function1<Int, Unit> */ /*-> IFoo */
tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1))
val tmp_8: A = A
val tmp_9: IFoo = a /*as Function1<Int, Unit> */ /*-> IFoo */
tmp_8.set(i = tmp_9, newValue = tmp_8.get(i = tmp_9).plus(other = 1))
}
}
@@ -104,8 +104,8 @@ fun test6(a: Any) {
a as Function1<Int, Unit> /*~> Unit */
a as IFoo /*~> Unit */
{ // BLOCK
val tmp0_array: A = A
val tmp1_index0: Any = a
tmp0_array.set(i = tmp1_index0 /*as IFoo */, newValue = tmp0_array.get(i = tmp1_index0 /*as IFoo */).plus(other = 1))
val tmp_10: A = A
val tmp_11: Any = a
tmp_10.set(i = tmp_11 /*as IFoo */, newValue = tmp_10.get(i = tmp_11 /*as IFoo */).plus(other = 1))
}
}
@@ -1,9 +1,9 @@
fun sum(vararg args: Int): Int {
var result: Int = 0
{ // BLOCK
val <iterator>: IntIterator = args.iterator()
while (<iterator>.hasNext()) { // BLOCK
val arg: Int = <iterator>.next()
val tmp_0: IntIterator = args.iterator()
while (tmp_0.hasNext()) { // BLOCK
val arg: Int = tmp_0.next()
{ // BLOCK
result = result.plus(other = arg)
}
@@ -1,9 +1,9 @@
fun sum(vararg args: Int): Int {
var result: Int = 0
{ // BLOCK
val tmp0_iterator: IntIterator = args.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val arg: Int = tmp0_iterator.next()
val tmp_0: IntIterator = args.iterator()
while (tmp_0.hasNext()) { // BLOCK
val arg: Int = tmp_0.next()
result = result.plus(other = arg)
}
}