[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
@@ -22,24 +22,24 @@ class C {
fun testVariable() {
var x: IntArray = foo()
{ // BLOCK
val <array>: IntArray = x
val <index_0>: Int = 0
<array>.set(index = <index_0>, value = <array>.get(index = <index_0>).plus(other = 1))
val tmp_0: IntArray = x
val tmp_1: Int = 0
tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 1))
}
}
fun testCall() {
{ // BLOCK
val <array>: IntArray = foo()
val <index_0>: Int = bar()
<array>.set(index = <index_0>, value = <array>.get(index = <index_0>).times(other = 2))
val tmp_2: IntArray = foo()
val tmp_3: Int = bar()
tmp_2.set(index = tmp_3, value = tmp_2.get(index = tmp_3).times(other = 2))
}
}
fun testMember(c: C) {
val <array>: IntArray = c.<get-x>()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(index = <index_0>)
<array>.set(index = <index_0>, value = <unary>.inc())
<unary> /*~> Unit */
val tmp_4: IntArray = c.<get-x>()
val tmp_5: Int = 0
val tmp_6: Int = tmp_4.get(index = tmp_5)
tmp_4.set(index = tmp_5, value = tmp_6.inc())
tmp_6 /*~> Unit */
}
@@ -22,26 +22,26 @@ class C {
fun testVariable() {
var x: IntArray = foo()
{ // BLOCK
val tmp0_array: IntArray = x
val tmp1_index0: Int = 0
tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).plus(other = 1))
val tmp_0: IntArray = x
val tmp_1: Int = 0
tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 1))
}
}
fun testCall() {
{ // BLOCK
val tmp0_array: IntArray = foo()
val tmp1_index0: Int = bar()
tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).times(other = 2))
val tmp_2: IntArray = foo()
val tmp_3: Int = bar()
tmp_2.set(index = tmp_3, value = tmp_2.get(index = tmp_3).times(other = 2))
}
}
fun testMember(c: C) {
{ // BLOCK
val tmp0_array: IntArray = c.<get-x>()
val tmp1_index0: Int = 0
val tmp2: Int = tmp0_array.get(index = tmp1_index0)
tmp0_array.set(index = tmp1_index0, value = tmp2.inc())
tmp2
val tmp_4: IntArray = c.<get-x>()
val tmp_5: Int = 0
val tmp_6: Int = tmp_4.get(index = tmp_5)
tmp_4.set(index = tmp_5, value = tmp_6.inc())
tmp_6
} /*~> Unit */
}
@@ -10,8 +10,8 @@ interface IB {
fun IB.test(a: IA) {
{ // BLOCK
val <array>: IA = a
val <index_0>: String = ""
(<this>, <array>).set(index = <index_0>, value = <array>.get(index = <index_0>).plus(other = 42))
val tmp_0: IA = a
val tmp_1: String = ""
(<this>, tmp_0).set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42))
}
}
@@ -10,8 +10,8 @@ interface IB {
fun IB.test(a: IA) {
{ // BLOCK
val tmp0_array: IA = a
val tmp1_index0: String = ""
(<this>, tmp0_array).set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).plus(other = 42))
val tmp_0: IA = a
val tmp_1: String = ""
(<this>, tmp_0).set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42))
}
}
@@ -13,9 +13,9 @@ inline fun baz(crossinline block: Function0<Unit>) {
inline fun <T : Any?> Iterable<T>.myForEach(action: Function1<T, Unit>) {
{ // BLOCK
val tmp0_iterator: Iterator<T> = <this>.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val element: T = tmp0_iterator.next()
val tmp_0: Iterator<T> = <this>.iterator()
while (tmp_0.hasNext()) { // BLOCK
val element: T = tmp_0.next()
action.invoke(p1 = element)
}
}
@@ -4,10 +4,10 @@ fun test1(a: Any?): Any {
fun test2(a: Any?): Int {
return CHECK_NOT_NULL<Int>(arg0 = { // BLOCK
val tmp0_safe_receiver: Any? = a
val tmp_0: Any? = a
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.hashCode()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.hashCode()
}
})
}
+3 -3
View File
@@ -4,10 +4,10 @@ fun test1(a: Any?): Any {
fun test2(a: Any?): Int {
return CHECK_NOT_NULL<Int>(arg0 = { // BLOCK
val tmp0_safe_receiver: Any? = a
val tmp_0: Any? = a
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.hashCode()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.hashCode()
}
})
}
@@ -1,10 +1,10 @@
fun test1(c: Boolean?) {
L@ while (true) { // BLOCK
L2@ while ({ // BLOCK
val <elvis>: Boolean? = c
val tmp_0: Boolean? = c
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> break@L
else -> <elvis>
EQEQ(arg0 = tmp_0, arg1 = null) -> break@L
else -> tmp_0
}
})
}
@@ -13,10 +13,10 @@ fun test1(c: Boolean?) {
fun test2(c: Boolean?) {
L@ while (true) { // BLOCK
L2@ while ({ // BLOCK
val <elvis>: Boolean? = c
val tmp_1: Boolean? = c
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> continue@L
else -> <elvis>
EQEQ(arg0 = tmp_1, arg1 = null) -> continue@L
else -> tmp_1
}
})
}
@@ -25,15 +25,15 @@ fun test2(c: Boolean?) {
fun test3(ss: List<String>?) {
L@ while (true) { // BLOCK
{ // BLOCK
val <iterator>: Iterator<String> = { // BLOCK
val <elvis>: List<String>? = ss
val tmp_2: Iterator<String> = { // BLOCK
val tmp_3: List<String>? = ss
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> continue@L
else -> <elvis>
EQEQ(arg0 = tmp_3, arg1 = null) -> continue@L
else -> tmp_3
}
}.iterator()
L2@ while (<iterator>.hasNext()) { // BLOCK
val s: String = <iterator>.next()
L2@ while (tmp_2.hasNext()) { // BLOCK
val s: String = tmp_2.next()
}
}
}
@@ -42,15 +42,15 @@ fun test3(ss: List<String>?) {
fun test4(ss: List<String>?) {
L@ while (true) { // BLOCK
{ // BLOCK
val <iterator>: Iterator<String> = { // BLOCK
val <elvis>: List<String>? = ss
val tmp_4: Iterator<String> = { // BLOCK
val tmp_5: List<String>? = ss
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> break@L
else -> <elvis>
EQEQ(arg0 = tmp_5, arg1 = null) -> break@L
else -> tmp_5
}
}.iterator()
L2@ while (<iterator>.hasNext()) { // BLOCK
val s: String = <iterator>.next()
L2@ while (tmp_4.hasNext()) { // BLOCK
val s: String = tmp_4.next()
}
}
}
@@ -1,10 +1,10 @@
fun test1(c: Boolean?) {
L@ while (true) { // BLOCK
L2@ while ({ // BLOCK
val tmp0_elvis_lhs: Boolean? = c
val tmp_0: Boolean? = c
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> break
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_0, arg1 = null) -> break
else -> tmp_0
}
})
}
@@ -13,10 +13,10 @@ fun test1(c: Boolean?) {
fun test2(c: Boolean?) {
L@ while (true) { // BLOCK
L2@ while ({ // BLOCK
val tmp0_elvis_lhs: Boolean? = c
val tmp_1: Boolean? = c
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> continue
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_1, arg1 = null) -> continue
else -> tmp_1
}
})
}
@@ -25,15 +25,15 @@ fun test2(c: Boolean?) {
fun test3(ss: List<String>?) {
L@ while (true) { // BLOCK
{ // BLOCK
val tmp1_iterator: Iterator<String> = { // BLOCK
val tmp0_elvis_lhs: List<String>? = ss
val tmp_2: Iterator<String> = { // BLOCK
val tmp_3: List<String>? = ss
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> continue
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_3, arg1 = null) -> continue
else -> tmp_3
}
}.iterator()
L2@ while (tmp1_iterator.hasNext()) { // BLOCK
val s: String = tmp1_iterator.next()
L2@ while (tmp_2.hasNext()) { // BLOCK
val s: String = tmp_2.next()
}
}
}
@@ -42,15 +42,15 @@ fun test3(ss: List<String>?) {
fun test4(ss: List<String>?) {
L@ while (true) { // BLOCK
{ // BLOCK
val tmp1_iterator: Iterator<String> = { // BLOCK
val tmp0_elvis_lhs: List<String>? = ss
val tmp_4: Iterator<String> = { // BLOCK
val tmp_5: List<String>? = ss
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> break
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_5, arg1 = null) -> break
else -> tmp_5
}
}.iterator()
L2@ while (tmp1_iterator.hasNext()) { // BLOCK
val s: String = tmp1_iterator.next()
L2@ while (tmp_4.hasNext()) { // BLOCK
val s: String = tmp_4.next()
}
}
}
@@ -5,9 +5,9 @@ fun testBreakFor() {
)
var k: Int = 0
{ // BLOCK
val <iterator>: IntIterator = xs.iterator()
while (<iterator>.hasNext()) { // BLOCK
val x: Int = <iterator>.next()
val tmp_0: IntIterator = xs.iterator()
while (tmp_0.hasNext()) { // BLOCK
val x: Int = tmp_0.next()
{ // BLOCK
when {
greater(arg0 = k, arg1 = 2) -> break
@@ -44,9 +44,9 @@ fun testContinueFor() {
)
var k: Int = 0
{ // BLOCK
val <iterator>: IntIterator = xs.iterator()
while (<iterator>.hasNext()) { // BLOCK
val x: Int = <iterator>.next()
val tmp_1: IntIterator = xs.iterator()
while (tmp_1.hasNext()) { // BLOCK
val x: Int = tmp_1.next()
{ // BLOCK
when {
greater(arg0 = k, arg1 = 2) -> continue
@@ -5,9 +5,9 @@ fun testBreakFor() {
)
var k: Int = 0
{ // BLOCK
val tmp0_iterator: IntIterator = xs.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val x: Int = tmp0_iterator.next()
val tmp_0: IntIterator = xs.iterator()
while (tmp_0.hasNext()) { // BLOCK
val x: Int = tmp_0.next()
{ // BLOCK
when {
greater(arg0 = k, arg1 = 2) -> break
@@ -44,9 +44,9 @@ fun testContinueFor() {
)
var k: Int = 0
{ // BLOCK
val tmp0_iterator: IntIterator = xs.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val x: Int = tmp0_iterator.next()
val tmp_1: IntIterator = xs.iterator()
while (tmp_1.hasNext()) { // BLOCK
val x: Int = tmp_1.next()
{ // BLOCK
when {
greater(arg0 = k, arg1 = 2) -> continue
@@ -20,12 +20,12 @@ fun reordered2(): Int {
fun test() {
foo(a = noReorder1(), b = noReorder2())
{ // BLOCK
val tmp0_b: Int = reordered1()
val tmp1_a: Int = reordered2()
foo(a = tmp1_a, b = tmp0_b)
val tmp_0: Int = reordered1()
val tmp_1: Int = reordered2()
foo(a = tmp_1, b = tmp_0)
}
{ // BLOCK
val tmp2_a: Int = reordered2()
foo(a = tmp2_a, b = 1)
val tmp_2: Int = reordered2()
foo(a = tmp_2, b = 1)
}
}
@@ -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)
}
}
@@ -17,28 +17,28 @@ class C {
fun test(nc: C?): C? {
return { // BLOCK
val tmp3_safe_receiver: C? = { // BLOCK
val tmp2_safe_receiver: C? = { // BLOCK
val tmp1_safe_receiver: C? = { // BLOCK
val tmp0_safe_receiver: C? = nc
val tmp_0: C? = { // BLOCK
val tmp_1: C? = { // BLOCK
val tmp_2: C? = { // BLOCK
val tmp_3: C? = nc
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.foo()
EQEQ(arg0 = tmp_3, arg1 = null) -> null
else -> tmp_3.foo()
}
}
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.bar()
EQEQ(arg0 = tmp_2, arg1 = null) -> null
else -> tmp_2.bar()
}
}
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
else -> tmp2_safe_receiver.foo()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.foo()
}
}
when {
EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null
else -> tmp3_safe_receiver.foo()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.foo()
}
}
}
@@ -11,17 +11,17 @@ fun test2(mc: MutableCollection<String>) {
fun test3() {
{ // BLOCK
val tmp0_safe_receiver: @FlexibleNullability PrintStream? = #out
val tmp_0: @FlexibleNullability PrintStream? = #out
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.println(p0 = "Hello,")
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.println(p0 = "Hello,")
}
} /*~> Unit */
{ // BLOCK
val tmp1_safe_receiver: @FlexibleNullability PrintStream? = #out
val tmp_1: @FlexibleNullability PrintStream? = #out
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.println(p0 = "world!")
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.println(p0 = "world!")
}
} /*~> Unit */
}
@@ -11,17 +11,17 @@ fun test2(mc: MutableCollection<String>) {
fun test3() {
{ // BLOCK
val tmp0_safe_receiver: @FlexibleNullability PrintStream? = super<System>.#out
val tmp_0: @FlexibleNullability PrintStream? = super<System>.#out
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver /*!! PrintStream */.println(p0 = "Hello,")
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0 /*!! PrintStream */.println(p0 = "Hello,")
}
} /*~> Unit */
{ // BLOCK
val tmp1_safe_receiver: @FlexibleNullability PrintStream? = super<System>.#out
val tmp_1: @FlexibleNullability PrintStream? = super<System>.#out
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver /*!! PrintStream */.println(p0 = "world!")
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1 /*!! PrintStream */.println(p0 = "world!")
}
} /*~> Unit */
}
@@ -42,32 +42,32 @@ object X1 {
fun test1(a: IntArray) {
var i: Int = 0
val <array>: IntArray = a
val <index_0>: Int = { // BLOCK
val <unary>: Int = i
i = <unary>.inc()
<unary>
val tmp_0: IntArray = a
val tmp_1: Int = { // BLOCK
val tmp_2: Int = i
i = tmp_2.inc()
tmp_2
}
val <unary>: Int = <array>.get(index = <index_0>)
<array>.set(index = <index_0>, value = <unary>.inc())
<unary> /*~> Unit */
val tmp_3: Int = tmp_0.get(index = tmp_1)
tmp_0.set(index = tmp_1, value = tmp_3.inc())
tmp_3 /*~> Unit */
}
fun test2() {
{ // BLOCK
val <unary>: Int = X1.<get-x1>()
X1.<set-x1>(<set-?> = <unary>.inc())
<unary>
val tmp_4: Int = X1.<get-x1>()
X1.<set-x1>(<set-?> = tmp_4.inc())
tmp_4
} /*~> Unit */
{ // BLOCK
val <unary>: Int = X2.<get-x2>()
X2.<set-x2>(<set-?> = <unary>.inc())
<unary>
val tmp_5: Int = X2.<get-x2>()
X2.<set-x2>(<set-?> = tmp_5.inc())
tmp_5
} /*~> Unit */
{ // BLOCK
val <unary>: Int = X3.<get-x3>()
X3.<set-x3>(<set-?> = <unary>.inc())
<unary>
val tmp_6: Int = X3.<get-x3>()
X3.<set-x3>(<set-?> = tmp_6.inc())
tmp_6
} /*~> Unit */
}
@@ -43,41 +43,41 @@ object X1 {
fun test1(a: IntArray) {
var i: Int = 0
{ // BLOCK
val tmp1_array: IntArray = a
val tmp2_index0: Int = { // BLOCK
val tmp0: Int = i
i = tmp0.inc()
tmp0
val tmp_0: IntArray = a
val tmp_1: Int = { // BLOCK
val tmp_2: Int = i
i = tmp_2.inc()
tmp_2
}
val tmp3: Int = tmp1_array.get(index = tmp2_index0)
tmp1_array.set(index = tmp2_index0, value = tmp3.inc())
tmp3
val tmp_3: Int = tmp_0.get(index = tmp_1)
tmp_0.set(index = tmp_1, value = tmp_3.inc())
tmp_3
} /*~> Unit */
}
fun test2() {
{ // BLOCK
val tmp0_this: X1 = X1
val tmp_4: X1 = X1
{ // BLOCK
val tmp1: Int = tmp0_this.<get-x1>()
tmp0_this.<set-x1>(<set-?> = tmp1.inc())
tmp1
val tmp_5: Int = tmp_4.<get-x1>()
tmp_4.<set-x1>(<set-?> = tmp_5.inc())
tmp_5
}
} /*~> Unit */
{ // BLOCK
val tmp2_this: X2 = X2
val tmp_6: X2 = X2
{ // BLOCK
val tmp3: Int = tmp2_this.<get-x2>()
tmp2_this.<set-x2>(<set-?> = tmp3.inc())
tmp3
val tmp_7: Int = tmp_6.<get-x2>()
tmp_6.<set-x2>(<set-?> = tmp_7.inc())
tmp_7
}
} /*~> Unit */
{ // BLOCK
val tmp4_this: X3 = X3
val tmp_8: X3 = X3
{ // BLOCK
val tmp5: Int = tmp4_this.<get-x3>()
tmp4_this.<set-x3>(<set-?> = tmp5.inc())
tmp5
val tmp_9: Int = tmp_8.<get-x3>()
tmp_8.<set-x3>(<set-?> = tmp_9.inc())
tmp_9
}
} /*~> Unit */
}
@@ -105,8 +105,8 @@ object Host {
operator fun B.plusAssign(b: B) {
{ // BLOCK
val tmp0_this: B = <this>
tmp0_this.<set-s>(<set-?> = tmp0_this.<get-s>().plus(other = b.<get-s>()))
val tmp_10: B = <this>
tmp_10.<set-s>(<set-?> = tmp_10.<get-s>().plus(other = b.<get-s>()))
}
}
@@ -25,7 +25,7 @@ object B {
}
fun B.test() {
val <destruct>: A = A
val x: Int = (<this>, <destruct>).component1()
val y: Int = (<this>, <destruct>).component2()
val tmp_0: A = A
val x: Int = (<this>, tmp_0).component1()
val y: Int = (<this>, tmp_0).component2()
}
@@ -26,8 +26,8 @@ object B {
fun B.test() {
// COMPOSITE {
val tmp0_container: A = A
val x: Int = (<this>, tmp0_container).component1()
val y: Int = (<this>, tmp0_container).component2()
val tmp_0: A = A
val x: Int = (<this>, tmp_0).component1()
val y: Int = (<this>, tmp_0).component2()
// }
}
@@ -29,7 +29,7 @@ object B {
}
fun B.test() {
val <destruct>: A = A
val x: Int = (<this>, <destruct>).component1()
val z: Int = (<this>, <destruct>).component3()
val tmp_0: A = A
val x: Int = (<this>, tmp_0).component1()
val z: Int = (<this>, tmp_0).component3()
}
@@ -30,8 +30,8 @@ object B {
fun B.test() {
// COMPOSITE {
val tmp0_container: A = A
val x: Int = (<this>, tmp0_container).component1()
val z: Int = (<this>, tmp0_container).component3()
val tmp_0: A = A
val x: Int = (<this>, tmp_0).component1()
val z: Int = (<this>, tmp_0).component3()
// }
}
@@ -4,10 +4,10 @@ fun length(s: String): Int {
fun lengthN(s: String?): Int? {
return { // BLOCK
val tmp0_safe_receiver: String? = s
val tmp_0: String? = s
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.<get-length>()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.<get-length>()
}
}
}
-111
View File
@@ -1,111 +0,0 @@
FILE fqName:<root> fileName:/elvis.kt
PROPERTY name:p visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Any? visibility:private [final,static]
EXPRESSION_BODY
CONST Null type=kotlin.Nothing? value=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> () returnType:kotlin.Any?
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Any? declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Any? visibility:private [final,static]' type=kotlin.Any? origin=null
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Any? declared in <root>'
CONST Null type=kotlin.Nothing? value=null
FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any?, b:kotlin.Any) returnType:kotlin.Any
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
VALUE_PARAMETER name:b index:1 type:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?, b: kotlin.Any): kotlin.Any declared in <root>'
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val]
GET_VAR 'a: kotlin.Any? declared in <root>.test1' type=kotlin.Any? origin=null
WHEN type=kotlin.Any origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: kotlin.Any? declared in <root>.test1' type=kotlin.Any? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'b: kotlin.Any declared in <root>.test1' type=kotlin.Any origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_0: kotlin.Any? declared in <root>.test1' type=kotlin.Any? origin=null
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.String?, b:kotlin.Any) returnType:kotlin.Any
VALUE_PARAMETER name:a index:0 type:kotlin.String?
VALUE_PARAMETER name:b index:1 type:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.String?, b: kotlin.Any): kotlin.Any declared in <root>'
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val]
GET_VAR 'a: kotlin.String? declared in <root>.test2' type=kotlin.String? origin=null
WHEN type=kotlin.Any origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.test2' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'b: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.test2' type=kotlin.String? origin=null
FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any?, b:kotlin.Any?) returnType:kotlin.String
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
VALUE_PARAMETER name:b index:1 type:kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any? declared in <root>.test3' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in <root>'
CONST String type=kotlin.String value=""
WHEN type=kotlin.Unit origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String?
GET_VAR 'a: kotlin.Any? declared in <root>.test3' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in <root>'
CONST String type=kotlin.String value=""
RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in <root>'
BLOCK type=kotlin.String origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.String? [val]
TYPE_OP type=kotlin.String? origin=IMPLICIT_CAST typeOperand=kotlin.String?
GET_VAR 'a: kotlin.Any? declared in <root>.test3' type=kotlin.Any? origin=null
WHEN type=kotlin.String origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_2: kotlin.String? declared in <root>.test3' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any? declared in <root>.test3' type=kotlin.Any? origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_2: kotlin.String? declared in <root>.test3' type=kotlin.String? origin=null
FUN name:test4 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any
VALUE_PARAMETER name:x index:0 type:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 (x: kotlin.Any): kotlin.Any declared in <root>'
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Any? [val]
CALL 'public final fun <get-p> (): kotlin.Any? declared in <root>' type=kotlin.Any? origin=GET_PROPERTY
WHEN type=kotlin.Any origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_3: kotlin.Any? declared in <root>.test4' type=kotlin.Any? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'x: kotlin.Any declared in <root>.test4' type=kotlin.Any origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_3: kotlin.Any? declared in <root>.test4' type=kotlin.Any? origin=null
FUN name:test5 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any
VALUE_PARAMETER name:x index:0 type:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test5 (x: kotlin.Any): kotlin.Any declared in <root>'
BLOCK type=kotlin.Any origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Any? [val]
CALL 'public final fun foo (): kotlin.Any? declared in <root>' type=kotlin.Any? origin=null
WHEN type=kotlin.Any origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_4: kotlin.Any? declared in <root>.test5' type=kotlin.Any? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: GET_VAR 'x: kotlin.Any declared in <root>.test5' type=kotlin.Any origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_4: kotlin.Any? declared in <root>.test5' type=kotlin.Any? origin=null
@@ -1,63 +0,0 @@
val p: Any?
field = null
get
fun foo(): Any? {
return null
}
fun test1(a: Any?, b: Any): Any {
return { // BLOCK
val <elvis>: Any? = a
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> b
else -> <elvis>
}
}
}
fun test2(a: String?, b: Any): Any {
return { // BLOCK
val <elvis>: String? = a
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> b
else -> <elvis>
}
}
}
fun test3(a: Any?, b: Any?): String {
when {
b !is String -> return ""
}
when {
a !is String? -> return ""
}
return { // BLOCK
val <elvis>: String? = a /*as String? */
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> b /*as String */
else -> <elvis>
}
}
}
fun test4(x: Any): Any {
return { // BLOCK
val <elvis>: Any? = <get-p>()
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> x
else -> <elvis>
}
}
}
fun test5(x: Any): Any {
return { // BLOCK
val <elvis>: Any? = foo()
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> x
else -> <elvis>
}
}
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
val p: Any? = null
fun foo(): Any? = null
+15 -15
View File
@@ -8,20 +8,20 @@ fun foo(): Any? {
fun test1(a: Any?, b: Any): Any {
return { // BLOCK
val tmp0_elvis_lhs: Any? = a
val tmp_0: Any? = a
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> b
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_0, arg1 = null) -> b
else -> tmp_0
}
}
}
fun test2(a: String?, b: Any): Any {
return { // BLOCK
val tmp0_elvis_lhs: String? = a
val tmp_1: String? = a
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> b
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_1, arg1 = null) -> b
else -> tmp_1
}
}
}
@@ -34,30 +34,30 @@ fun test3(a: Any?, b: Any?): String {
a !is String? -> return ""
}
return { // BLOCK
val tmp0_elvis_lhs: String? = a /*as String? */
val tmp_2: String? = a /*as String? */
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> b /*as String */
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_2, arg1 = null) -> b /*as String */
else -> tmp_2
}
}
}
fun test4(x: Any): Any {
return { // BLOCK
val tmp0_elvis_lhs: Any? = <get-p>()
val tmp_3: Any? = <get-p>()
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> x
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_3, arg1 = null) -> x
else -> tmp_3
}
}
}
fun test5(x: Any): Any {
return { // BLOCK
val tmp0_elvis_lhs: Any? = foo()
val tmp_4: Any? = foo()
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> x
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_4, arg1 = null) -> x
else -> tmp_4
}
}
}
@@ -19,9 +19,9 @@ enum class A : Enum<A> {
fun testVariableAssignment_throws(a: A) {
val x: Int
{ // BLOCK
val tmp0_subject: A = a
val tmp_0: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> { // BLOCK
EQEQ(arg0 = tmp_0, arg1 = A.V1) -> { // BLOCK
x = 11
}
else -> noWhenBranchMatchedException()
@@ -31,9 +31,9 @@ fun testVariableAssignment_throws(a: A) {
fun testStatement_empty(a: A) {
{ // BLOCK
val tmp1_subject: A = a
val tmp_1: A = a
when {
EQEQ(arg0 = tmp1_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_1, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
} /*~> Unit */
@@ -41,9 +41,9 @@ fun testStatement_empty(a: A) {
fun testParenthesized_throwsJvm(a: A) {
{ // BLOCK
val tmp2_subject: A = a
val tmp_2: A = a
when {
EQEQ(arg0 = tmp2_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_2, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
} /*~> Unit */
@@ -51,9 +51,9 @@ fun testParenthesized_throwsJvm(a: A) {
fun testAnnotated_throwsJvm(a: A) {
{ // BLOCK
val tmp3_subject: A = a
val tmp_3: A = a
when {
EQEQ(arg0 = tmp3_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_3, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
} /*~> Unit */
@@ -61,9 +61,9 @@ fun testAnnotated_throwsJvm(a: A) {
fun testExpression_throws(a: A): Int {
return { // BLOCK
val tmp4_subject: A = a
val tmp_4: A = a
when {
EQEQ(arg0 = tmp4_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_4, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
}
@@ -74,9 +74,9 @@ fun testIfTheElseStatement_empty(a: A, flag: Boolean) {
flag -> 0
else -> { // BLOCK
{ // BLOCK
val tmp5_subject: A = a
val tmp_5: A = a
when {
EQEQ(arg0 = tmp5_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_5, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
}
@@ -89,9 +89,9 @@ fun testIfTheElseParenthesized_throwsJvm(a: A, flag: Boolean) {
flag -> 0
else -> { // BLOCK
{ // BLOCK
val tmp6_subject: A = a
val tmp_6: A = a
when {
EQEQ(arg0 = tmp6_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_6, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
}
@@ -104,9 +104,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) {
flag -> 0
else -> { // BLOCK
{ // BLOCK
val tmp7_subject: A = a
val tmp_7: A = a
when {
EQEQ(arg0 = tmp7_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_7, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
}
@@ -117,9 +117,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) {
fun testLambdaResultExpression_throws(a: A) {
local fun <anonymous>(): Int {
return { // BLOCK
val tmp8_subject: A = a
val tmp_8: A = a
when {
EQEQ(arg0 = tmp8_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_8, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
}
@@ -19,9 +19,9 @@ enum class A : Enum<A> {
fun testVariableAssignment_throws(a: A) {
val x: Int
{ // BLOCK
val tmp0_subject: A = a
val tmp_0: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> x = 11
EQEQ(arg0 = tmp_0, arg1 = A.V1) -> x = 11
else -> noWhenBranchMatchedException()
}
}
@@ -29,36 +29,36 @@ fun testVariableAssignment_throws(a: A) {
fun testStatement_empty(a: A) {
{ // BLOCK
val tmp0_subject: A = a
val tmp_1: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */
EQEQ(arg0 = tmp_1, arg1 = A.V1) -> 1 /*~> Unit */
}
}
}
fun testParenthesized_throwsJvm(a: A) {
{ // BLOCK
val tmp0_subject: A = a
val tmp_2: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */
EQEQ(arg0 = tmp_2, arg1 = A.V1) -> 1 /*~> Unit */
}
}
}
fun testAnnotated_throwsJvm(a: A) {
{ // BLOCK
val tmp0_subject: A = a
val tmp_3: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */
EQEQ(arg0 = tmp_3, arg1 = A.V1) -> 1 /*~> Unit */
}
}
}
fun testExpression_throws(a: A): Int {
return { // BLOCK
val tmp0_subject: A = a
val tmp_4: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_4, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
}
@@ -69,9 +69,9 @@ fun testIfTheElseStatement_empty(a: A, flag: Boolean) {
flag -> 0 /*~> Unit */
else -> { // BLOCK
{ // BLOCK
val tmp0_subject: A = a
val tmp_5: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */
EQEQ(arg0 = tmp_5, arg1 = A.V1) -> 1 /*~> Unit */
}
}
}
@@ -83,9 +83,9 @@ fun testIfTheElseParenthesized_throwsJvm(a: A, flag: Boolean) {
flag -> 0 /*~> Unit */
else -> { // BLOCK
{ // BLOCK
val tmp0_subject: A = a
val tmp_6: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */
EQEQ(arg0 = tmp_6, arg1 = A.V1) -> 1 /*~> Unit */
}
}
}
@@ -97,9 +97,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) {
flag -> 0 /*~> Unit */
else -> { // BLOCK
{ // BLOCK
val tmp0_subject: A = a
val tmp_7: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */
EQEQ(arg0 = tmp_7, arg1 = A.V1) -> 1 /*~> Unit */
}
}
}
@@ -109,9 +109,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) {
fun testLambdaResultExpression_throws(a: A) {
local fun <anonymous>(): Int {
return { // BLOCK
val tmp0_subject: A = a
val tmp_8: A = a
when {
EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1
EQEQ(arg0 = tmp_8, arg1 = A.V1) -> 1
else -> noWhenBranchMatchedException()
}
}
@@ -1,9 +1,9 @@
fun test(receiver: Any?, fn: @ExtensionFunctionType Function3<Any, Int, String, Unit>): Unit? {
return { // BLOCK
val tmp0_safe_receiver: Any? = receiver
val tmp_0: Any? = receiver
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> fn.invoke(p1 = tmp0_safe_receiver, p2 = 42, p3 = "Hello")
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> fn.invoke(p1 = tmp_0, p2 = 42, p3 = "Hello")
}
}
}
@@ -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
-72
View File
@@ -1,72 +0,0 @@
FILE fqName:<root> fileName:/for.kt
FUN name:testEmpty visibility:public modality:FINAL <> (ss:kotlin.collections.List<kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List<kotlin.String>
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.Iterator<kotlin.String> [val]
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
$this: GET_VAR 'ss: kotlin.collections.List<kotlin.String> declared in <root>.testEmpty' type=kotlin.collections.List<kotlin.String> origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_0: kotlin.collections.Iterator<kotlin.String> declared in <root>.testEmpty' type=kotlin.collections.Iterator<kotlin.String> origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val]
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
$this: GET_VAR 'val tmp_0: kotlin.collections.Iterator<kotlin.String> declared in <root>.testEmpty' type=kotlin.collections.Iterator<kotlin.String> origin=null
FUN name:testIterable visibility:public modality:FINAL <> (ss:kotlin.collections.List<kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List<kotlin.String>
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.Iterator<kotlin.String> [val]
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
$this: GET_VAR 'ss: kotlin.collections.List<kotlin.String> declared in <root>.testIterable' type=kotlin.collections.List<kotlin.String> origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_1: kotlin.collections.Iterator<kotlin.String> declared in <root>.testIterable' type=kotlin.collections.Iterator<kotlin.String> origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val]
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
$this: GET_VAR 'val tmp_1: kotlin.collections.Iterator<kotlin.String> declared in <root>.testIterable' type=kotlin.collections.Iterator<kotlin.String> origin=null
BLOCK type=kotlin.Unit origin=null
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null
message: GET_VAR 'val s: kotlin.String declared in <root>.testIterable' type=kotlin.String origin=null
FUN name:testDestructuring visibility:public modality:FINAL <> (pp:kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>>) returnType:kotlin.Unit
VALUE_PARAMETER name:pp index:0 type:kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>>
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> [val]
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> origin=FOR_LOOP_ITERATOR
$this: GET_VAR 'pp: kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>> declared in <root>.testDestructuring' type=kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>> origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> declared in <root>.testDestructuring' type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Pair<kotlin.Int, kotlin.String> [val]
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=FOR_LOOP_NEXT
$this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> declared in <root>.testDestructuring' type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> origin=null
VAR name:i type:kotlin.Int [val]
CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Int origin=COMPONENT_N(index=1)
$this: GET_VAR 'val tmp_3: kotlin.Pair<kotlin.Int, kotlin.String> declared in <root>.testDestructuring' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=null
VAR name:s type:kotlin.String [val]
CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.String origin=COMPONENT_N(index=2)
$this: GET_VAR 'val tmp_3: kotlin.Pair<kotlin.Int, kotlin.String> declared in <root>.testDestructuring' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=null
BLOCK type=kotlin.Unit origin=null
CALL 'public final fun println (message: kotlin.Int): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null
message: GET_VAR 'val i: kotlin.Int declared in <root>.testDestructuring' type=kotlin.Int origin=null
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null
message: GET_VAR 'val s: kotlin.String declared in <root>.testDestructuring' type=kotlin.String origin=null
FUN name:testRange visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_4 type:kotlin.collections.IntIterator [val]
CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
$this: CONST Int type=kotlin.Int value=1
other: CONST Int type=kotlin.Int value=10
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_4: kotlin.collections.IntIterator declared in <root>.testRange' type=kotlin.collections.IntIterator origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val]
CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
$this: GET_VAR 'val tmp_4: kotlin.collections.IntIterator declared in <root>.testRange' type=kotlin.collections.IntIterator origin=null
-45
View File
@@ -1,45 +0,0 @@
fun testEmpty(ss: List<String>) {
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
while (<iterator>.hasNext()) { // BLOCK
val s: String = <iterator>.next()
}
}
}
fun testIterable(ss: List<String>) {
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
while (<iterator>.hasNext()) { // BLOCK
val s: String = <iterator>.next()
{ // BLOCK
println(message = s)
}
}
}
}
fun testDestructuring(pp: List<Pair<Int, String>>) {
{ // BLOCK
val <iterator>: Iterator<Pair<Int, String>> = pp.iterator()
while (<iterator>.hasNext()) { // BLOCK
val <destruct>: Pair<Int, String> = <iterator>.next()
val i: Int = <destruct>.component1()
val s: String = <destruct>.component2()
{ // BLOCK
println(message = i)
println(message = s)
}
}
}
}
fun testRange() {
{ // BLOCK
val <iterator>: IntIterator = 1.rangeTo(other = 10).iterator()
while (<iterator>.hasNext()) { // BLOCK
val i: Int = <iterator>.next()
}
}
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
+14 -14
View File
@@ -1,17 +1,17 @@
fun testEmpty(ss: List<String>) {
{ // BLOCK
val tmp0_iterator: Iterator<String> = ss.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val s: String = tmp0_iterator.next()
val tmp_0: Iterator<String> = ss.iterator()
while (tmp_0.hasNext()) { // BLOCK
val s: String = tmp_0.next()
}
}
}
fun testIterable(ss: List<String>) {
{ // BLOCK
val tmp0_iterator: Iterator<String> = ss.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val s: String = tmp0_iterator.next()
val tmp_1: Iterator<String> = ss.iterator()
while (tmp_1.hasNext()) { // BLOCK
val s: String = tmp_1.next()
{ // BLOCK
println(message = s)
}
@@ -21,11 +21,11 @@ fun testIterable(ss: List<String>) {
fun testDestructuring(pp: List<Pair<Int, String>>) {
{ // BLOCK
val tmp0_iterator: Iterator<Pair<Int, String>> = pp.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val tmp1_loop_parameter: Pair<Int, String> = tmp0_iterator.next()
val i: Int = tmp1_loop_parameter.component1()
val s: String = tmp1_loop_parameter.component2()
val tmp_2: Iterator<Pair<Int, String>> = pp.iterator()
while (tmp_2.hasNext()) { // BLOCK
val tmp_3: Pair<Int, String> = tmp_2.next()
val i: Int = tmp_3.component1()
val s: String = tmp_3.component2()
{ // BLOCK
println(message = i)
println(message = s)
@@ -36,9 +36,9 @@ fun testDestructuring(pp: List<Pair<Int, String>>) {
fun testRange() {
{ // BLOCK
val tmp0_iterator: IntIterator = 1.rangeTo(other = 10).iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val i: Int = tmp0_iterator.next()
val tmp_4: IntIterator = 1.rangeTo(other = 10).iterator()
while (tmp_4.hasNext()) { // BLOCK
val i: Int = tmp_4.next()
}
}
}
@@ -1,8 +1,8 @@
fun testForBreak1(ss: List<String>) {
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
while (<iterator>.hasNext()) { // BLOCK
val s: String = <iterator>.next()
val tmp_0: Iterator<String> = ss.iterator()
while (tmp_0.hasNext()) { // BLOCK
val s: String = tmp_0.next()
{ // BLOCK
break
}
@@ -12,14 +12,14 @@ fun testForBreak1(ss: List<String>) {
fun testForBreak2(ss: List<String>) {
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
OUTER@ while (<iterator>.hasNext()) { // BLOCK
val s1: String = <iterator>.next()
val tmp_1: Iterator<String> = ss.iterator()
OUTER@ while (tmp_1.hasNext()) { // BLOCK
val s1: String = tmp_1.next()
{ // BLOCK
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
INNER@ while (<iterator>.hasNext()) { // BLOCK
val s2: String = <iterator>.next()
val tmp_2: Iterator<String> = ss.iterator()
INNER@ while (tmp_2.hasNext()) { // BLOCK
val s2: String = tmp_2.next()
{ // BLOCK
break@OUTER
break@INNER
@@ -35,9 +35,9 @@ fun testForBreak2(ss: List<String>) {
fun testForContinue1(ss: List<String>) {
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
while (<iterator>.hasNext()) { // BLOCK
val s: String = <iterator>.next()
val tmp_3: Iterator<String> = ss.iterator()
while (tmp_3.hasNext()) { // BLOCK
val s: String = tmp_3.next()
{ // BLOCK
continue
}
@@ -47,14 +47,14 @@ fun testForContinue1(ss: List<String>) {
fun testForContinue2(ss: List<String>) {
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
OUTER@ while (<iterator>.hasNext()) { // BLOCK
val s1: String = <iterator>.next()
val tmp_4: Iterator<String> = ss.iterator()
OUTER@ while (tmp_4.hasNext()) { // BLOCK
val s1: String = tmp_4.next()
{ // BLOCK
{ // BLOCK
val <iterator>: Iterator<String> = ss.iterator()
INNER@ while (<iterator>.hasNext()) { // BLOCK
val s2: String = <iterator>.next()
val tmp_5: Iterator<String> = ss.iterator()
INNER@ while (tmp_5.hasNext()) { // BLOCK
val s2: String = tmp_5.next()
{ // BLOCK
continue@OUTER
continue@INNER
@@ -1,8 +1,8 @@
fun testForBreak1(ss: List<String>) {
{ // BLOCK
val tmp0_iterator: Iterator<String> = ss.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val s: String = tmp0_iterator.next()
val tmp_0: Iterator<String> = ss.iterator()
while (tmp_0.hasNext()) { // BLOCK
val s: String = tmp_0.next()
{ // BLOCK
break
}
@@ -12,14 +12,14 @@ fun testForBreak1(ss: List<String>) {
fun testForBreak2(ss: List<String>) {
{ // BLOCK
val tmp0_iterator: Iterator<String> = ss.iterator()
OUTER@ while (tmp0_iterator.hasNext()) { // BLOCK
val s1: String = tmp0_iterator.next()
val tmp_1: Iterator<String> = ss.iterator()
OUTER@ while (tmp_1.hasNext()) { // BLOCK
val s1: String = tmp_1.next()
{ // BLOCK
{ // BLOCK
val tmp1_iterator: Iterator<String> = ss.iterator()
INNER@ while (tmp1_iterator.hasNext()) { // BLOCK
val s2: String = tmp1_iterator.next()
val tmp_2: Iterator<String> = ss.iterator()
INNER@ while (tmp_2.hasNext()) { // BLOCK
val s2: String = tmp_2.next()
{ // BLOCK
break@OUTER
break@INNER
@@ -35,9 +35,9 @@ fun testForBreak2(ss: List<String>) {
fun testForContinue1(ss: List<String>) {
{ // BLOCK
val tmp0_iterator: Iterator<String> = ss.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK
val s: String = tmp0_iterator.next()
val tmp_3: Iterator<String> = ss.iterator()
while (tmp_3.hasNext()) { // BLOCK
val s: String = tmp_3.next()
{ // BLOCK
continue
}
@@ -47,14 +47,14 @@ fun testForContinue1(ss: List<String>) {
fun testForContinue2(ss: List<String>) {
{ // BLOCK
val tmp0_iterator: Iterator<String> = ss.iterator()
OUTER@ while (tmp0_iterator.hasNext()) { // BLOCK
val s1: String = tmp0_iterator.next()
val tmp_4: Iterator<String> = ss.iterator()
OUTER@ while (tmp_4.hasNext()) { // BLOCK
val s1: String = tmp_4.next()
{ // BLOCK
{ // BLOCK
val tmp1_iterator: Iterator<String> = ss.iterator()
INNER@ while (tmp1_iterator.hasNext()) { // BLOCK
val s2: String = tmp1_iterator.next()
val tmp_5: Iterator<String> = ss.iterator()
INNER@ while (tmp_5.hasNext()) { // BLOCK
val s2: String = tmp_5.next()
{ // BLOCK
continue@OUTER
continue@INNER
@@ -32,9 +32,9 @@ interface IReceiver {
operator fun IntCell.next(): Int {
return { // BLOCK
val <unary>: Int = <this>.<get-value>()
<this>.<set-value>(<set-?> = <unary>.dec())
<unary>
val tmp_0: Int = <this>.<get-value>()
<this>.<set-value>(<set-?> = tmp_0.dec())
tmp_0
}
}
@@ -42,9 +42,9 @@ interface IReceiver {
fun IReceiver.test() {
{ // BLOCK
val <iterator>: IntCell = (<this>, FiveTimes).iterator()
while ((<this>, <iterator>).hasNext()) { // BLOCK
val i: Int = (<this>, <iterator>).next()
val tmp_1: IntCell = (<this>, FiveTimes).iterator()
while ((<this>, tmp_1).hasNext()) { // BLOCK
val i: Int = (<this>, tmp_1).next()
{ // BLOCK
println(message = i)
}
@@ -32,11 +32,11 @@ interface IReceiver {
operator fun IntCell.next(): Int {
return { // BLOCK
val tmp0_this: IntCell = <this>
val tmp_0: IntCell = <this>
{ // BLOCK
val tmp1: Int = tmp0_this.<get-value>()
tmp0_this.<set-value>(<set-?> = tmp1.dec())
tmp1
val tmp_1: Int = tmp_0.<get-value>()
tmp_0.<set-value>(<set-?> = tmp_1.dec())
tmp_1
}
}
}
@@ -45,9 +45,9 @@ interface IReceiver {
fun IReceiver.test() {
{ // BLOCK
val tmp0_iterator: IntCell = (<this>, FiveTimes).iterator()
while ((<this>, tmp0_iterator).hasNext()) { // BLOCK
val i: Int = (<this>, tmp0_iterator).next()
val tmp_2: IntCell = (<this>, FiveTimes).iterator()
while ((<this>, tmp_2).hasNext()) { // BLOCK
val i: Int = (<this>, tmp_2).next()
{ // BLOCK
println(message = i)
}
@@ -7,8 +7,8 @@ private operator fun J.component2(): Int {
}
fun test() {
val <destruct>: @FlexibleNullability J? = j()
val a: Int = <destruct>.component1()
val b: Int = <destruct> /*!! J */.component2()
val tmp_0: @FlexibleNullability J? = j()
val a: Int = tmp_0.component1()
val b: Int = tmp_0 /*!! J */.component2()
}
@@ -8,8 +8,8 @@ private operator fun J.component2(): Int {
fun test() {
// COMPOSITE {
val tmp0_container: @FlexibleNullability J? = j()
val a: Int = tmp0_container.component1()
val b: Int = tmp0_container /*!! J */.component2()
val tmp_0: @FlexibleNullability J? = j()
val a: Int = tmp_0.component1()
val b: Int = tmp_0 /*!! J */.component2()
// }
}
@@ -64,14 +64,14 @@ fun testVarPrefix() {
fun testVarPostfix() {
var x: Int = 0
val x1: Int = { // BLOCK
val <unary>: Int = x
x = <unary>.inc()
<unary>
val tmp_0: Int = x
x = tmp_0.inc()
tmp_0
}
val x2: Int = { // BLOCK
val <unary>: Int = x
x = <unary>.dec()
<unary>
val tmp_1: Int = x
x = tmp_1.dec()
tmp_1
}
}
@@ -88,106 +88,106 @@ fun testPropPrefix() {
fun testPropPostfix() {
val p1: Int = { // BLOCK
val <unary>: Int = <get-p>()
<set-p>(<set-?> = <unary>.inc())
<unary>
val tmp_2: Int = <get-p>()
<set-p>(<set-?> = tmp_2.inc())
tmp_2
}
val p2: Int = { // BLOCK
val <unary>: Int = <get-p>()
<set-p>(<set-?> = <unary>.dec())
<unary>
val tmp_3: Int = <get-p>()
<set-p>(<set-?> = tmp_3.dec())
tmp_3
}
}
fun testArrayPrefix() {
val a1: Int = { // BLOCK
val <array>: IntArray = <get-arr>()
val <index_0>: Int = 0
<array>.set(index = <index_0>, value = <array>.get(index = <index_0>).inc())
<array>.get(index = <index_0>)
val tmp_4: IntArray = <get-arr>()
val tmp_5: Int = 0
tmp_4.set(index = tmp_5, value = tmp_4.get(index = tmp_5).inc())
tmp_4.get(index = tmp_5)
}
val a2: Int = { // BLOCK
val <array>: IntArray = <get-arr>()
val <index_0>: Int = 0
<array>.set(index = <index_0>, value = <array>.get(index = <index_0>).dec())
<array>.get(index = <index_0>)
val tmp_6: IntArray = <get-arr>()
val tmp_7: Int = 0
tmp_6.set(index = tmp_7, value = tmp_6.get(index = tmp_7).dec())
tmp_6.get(index = tmp_7)
}
}
fun testArrayPostfix() {
val a1: Int = { // BLOCK
val <array>: IntArray = <get-arr>()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(index = <index_0>)
<array>.set(index = <index_0>, value = <unary>.inc())
<unary>
val tmp_8: IntArray = <get-arr>()
val tmp_9: Int = 0
val tmp_10: Int = tmp_8.get(index = tmp_9)
tmp_8.set(index = tmp_9, value = tmp_10.inc())
tmp_10
}
val a2: Int = { // BLOCK
val <array>: IntArray = <get-arr>()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(index = <index_0>)
<array>.set(index = <index_0>, value = <unary>.dec())
<unary>
val tmp_11: IntArray = <get-arr>()
val tmp_12: Int = 0
val tmp_13: Int = tmp_11.get(index = tmp_12)
tmp_11.set(index = tmp_12, value = tmp_13.dec())
tmp_13
}
}
fun testClassPropPrefix() {
val p1: Int = { // BLOCK
val <receiver>: C = C()
<receiver>.<set-p>(<set-?> = <receiver>.<get-p>().inc())
<receiver>.<get-p>()
val tmp_14: C = C()
tmp_14.<set-p>(<set-?> = tmp_14.<get-p>().inc())
tmp_14.<get-p>()
}
val p2: Int = { // BLOCK
val <receiver>: C = C()
<receiver>.<set-p>(<set-?> = <receiver>.<get-p>().dec())
<receiver>.<get-p>()
val tmp_15: C = C()
tmp_15.<set-p>(<set-?> = tmp_15.<get-p>().dec())
tmp_15.<get-p>()
}
}
fun testClassPropPostfix() {
val p1: Int = { // BLOCK
val <receiver>: C = C()
val <unary>: Int = <receiver>.<get-p>()
<receiver>.<set-p>(<set-?> = <unary>.inc())
<unary>
val tmp_16: C = C()
val tmp_17: Int = tmp_16.<get-p>()
tmp_16.<set-p>(<set-?> = tmp_17.inc())
tmp_17
}
val p2: Int = { // BLOCK
val <receiver>: C = C()
val <unary>: Int = <receiver>.<get-p>()
<receiver>.<set-p>(<set-?> = <unary>.dec())
<unary>
val tmp_18: C = C()
val tmp_19: Int = tmp_18.<get-p>()
tmp_18.<set-p>(<set-?> = tmp_19.dec())
tmp_19
}
}
fun testClassOperatorPrefix() {
val a1: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).inc())
<array>.get(i = <index_0>)
val tmp_20: C = C()
val tmp_21: Int = 0
tmp_20.set(i = tmp_21, value = tmp_20.get(i = tmp_21).inc())
tmp_20.get(i = tmp_21)
}
val a2: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).dec())
<array>.get(i = <index_0>)
val tmp_22: C = C()
val tmp_23: Int = 0
tmp_22.set(i = tmp_23, value = tmp_22.get(i = tmp_23).dec())
tmp_22.get(i = tmp_23)
}
}
fun testClassOperatorPostfix() {
val a1: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.inc())
<unary>
val tmp_24: C = C()
val tmp_25: Int = 0
val tmp_26: Int = tmp_24.get(i = tmp_25)
tmp_24.set(i = tmp_25, value = tmp_26.inc())
tmp_26
}
val a2: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.dec())
<unary>
val tmp_27: C = C()
val tmp_28: Int = 0
val tmp_29: Int = tmp_27.get(i = tmp_28)
tmp_27.set(i = tmp_28, value = tmp_29.dec())
tmp_29
}
}
@@ -204,45 +204,45 @@ fun testObjectPropPrefix() {
fun testObjectPropPostfix() {
val p1: Int = { // BLOCK
val <unary>: Int = O.<get-p>()
O.<set-p>(<set-?> = <unary>.inc())
<unary>
val tmp_30: Int = O.<get-p>()
O.<set-p>(<set-?> = tmp_30.inc())
tmp_30
}
val p2: Int = { // BLOCK
val <unary>: Int = O.<get-p>()
O.<set-p>(<set-?> = <unary>.dec())
<unary>
val tmp_31: Int = O.<get-p>()
O.<set-p>(<set-?> = tmp_31.dec())
tmp_31
}
}
fun testObjectOperatorPrefix() {
val a1: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).inc())
<array>.get(i = <index_0>)
val tmp_32: O = O
val tmp_33: Int = 0
tmp_32.set(i = tmp_33, value = tmp_32.get(i = tmp_33).inc())
tmp_32.get(i = tmp_33)
}
val a2: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).dec())
<array>.get(i = <index_0>)
val tmp_34: O = O
val tmp_35: Int = 0
tmp_34.set(i = tmp_35, value = tmp_34.get(i = tmp_35).dec())
tmp_34.get(i = tmp_35)
}
}
fun testObjectOperatorPostfix() {
val a1: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.inc())
<unary>
val tmp_36: O = O
val tmp_37: Int = 0
val tmp_38: Int = tmp_36.get(i = tmp_37)
tmp_36.set(i = tmp_37, value = tmp_38.inc())
tmp_38
}
val a2: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.dec())
<unary>
val tmp_39: O = O
val tmp_40: Int = 0
val tmp_41: Int = tmp_39.get(i = tmp_40)
tmp_39.set(i = tmp_40, value = tmp_41.dec())
tmp_41
}
}
@@ -64,14 +64,14 @@ fun testVarPrefix() {
fun testVarPostfix() {
var x: Int = 0
val x1: Int = { // BLOCK
val tmp0: Int = x
x = tmp0.inc()
tmp0
val tmp_0: Int = x
x = tmp_0.inc()
tmp_0
}
val x2: Int = { // BLOCK
val tmp1: Int = x
x = tmp1.dec()
tmp1
val tmp_1: Int = x
x = tmp_1.dec()
tmp_1
}
}
@@ -93,184 +93,184 @@ fun testPropPrefix() {
fun testPropPostfix() {
val p1: Int = { // BLOCK
{ // BLOCK
val tmp0: Int = <get-p>()
<set-p>(<set-?> = tmp0.inc())
tmp0
val tmp_2: Int = <get-p>()
<set-p>(<set-?> = tmp_2.inc())
tmp_2
}
}
val p2: Int = { // BLOCK
{ // BLOCK
val tmp1: Int = <get-p>()
<set-p>(<set-?> = tmp1.dec())
tmp1
val tmp_3: Int = <get-p>()
<set-p>(<set-?> = tmp_3.dec())
tmp_3
}
}
}
fun testArrayPrefix() {
val a1: Int = { // BLOCK
val tmp0_array: IntArray = <get-arr>()
val tmp1_index0: Int = 0
tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).inc())
tmp0_array.get(index = tmp1_index0)
val tmp_4: IntArray = <get-arr>()
val tmp_5: Int = 0
tmp_4.set(index = tmp_5, value = tmp_4.get(index = tmp_5).inc())
tmp_4.get(index = tmp_5)
}
val a2: Int = { // BLOCK
val tmp2_array: IntArray = <get-arr>()
val tmp3_index0: Int = 0
tmp2_array.set(index = tmp3_index0, value = tmp2_array.get(index = tmp3_index0).dec())
tmp2_array.get(index = tmp3_index0)
val tmp_6: IntArray = <get-arr>()
val tmp_7: Int = 0
tmp_6.set(index = tmp_7, value = tmp_6.get(index = tmp_7).dec())
tmp_6.get(index = tmp_7)
}
}
fun testArrayPostfix() {
val a1: Int = { // BLOCK
val tmp0_array: IntArray = <get-arr>()
val tmp1_index0: Int = 0
val tmp2: Int = tmp0_array.get(index = tmp1_index0)
tmp0_array.set(index = tmp1_index0, value = tmp2.inc())
tmp2
val tmp_8: IntArray = <get-arr>()
val tmp_9: Int = 0
val tmp_10: Int = tmp_8.get(index = tmp_9)
tmp_8.set(index = tmp_9, value = tmp_10.inc())
tmp_10
}
val a2: Int = { // BLOCK
val tmp3_array: IntArray = <get-arr>()
val tmp4_index0: Int = 0
val tmp5: Int = tmp3_array.get(index = tmp4_index0)
tmp3_array.set(index = tmp4_index0, value = tmp5.dec())
tmp5
val tmp_11: IntArray = <get-arr>()
val tmp_12: Int = 0
val tmp_13: Int = tmp_11.get(index = tmp_12)
tmp_11.set(index = tmp_12, value = tmp_13.dec())
tmp_13
}
}
fun testClassPropPrefix() {
val p1: Int = { // BLOCK
val tmp0_this: C = C()
val tmp_14: C = C()
{ // BLOCK
tmp0_this.<set-p>(<set-?> = tmp0_this.<get-p>().inc())
tmp0_this.<get-p>()
tmp_14.<set-p>(<set-?> = tmp_14.<get-p>().inc())
tmp_14.<get-p>()
}
}
val p2: Int = { // BLOCK
val tmp1_this: C = C()
val tmp_15: C = C()
{ // BLOCK
tmp1_this.<set-p>(<set-?> = tmp1_this.<get-p>().dec())
tmp1_this.<get-p>()
tmp_15.<set-p>(<set-?> = tmp_15.<get-p>().dec())
tmp_15.<get-p>()
}
}
}
fun testClassPropPostfix() {
val p1: Int = { // BLOCK
val tmp0_this: C = C()
val tmp_16: C = C()
{ // BLOCK
val tmp1: Int = tmp0_this.<get-p>()
tmp0_this.<set-p>(<set-?> = tmp1.inc())
tmp1
val tmp_17: Int = tmp_16.<get-p>()
tmp_16.<set-p>(<set-?> = tmp_17.inc())
tmp_17
}
}
val p2: Int = { // BLOCK
val tmp2_this: C = C()
val tmp_18: C = C()
{ // BLOCK
val tmp3: Int = tmp2_this.<get-p>()
tmp2_this.<set-p>(<set-?> = tmp3.dec())
tmp3
val tmp_19: Int = tmp_18.<get-p>()
tmp_18.<set-p>(<set-?> = tmp_19.dec())
tmp_19
}
}
}
fun testClassOperatorPrefix() {
val a1: Int = { // BLOCK
val tmp0_array: C = C()
val tmp1_index0: Int = 0
tmp0_array.set(i = tmp1_index0, value = tmp0_array.get(i = tmp1_index0).inc())
tmp0_array.get(i = tmp1_index0)
val tmp_20: C = C()
val tmp_21: Int = 0
tmp_20.set(i = tmp_21, value = tmp_20.get(i = tmp_21).inc())
tmp_20.get(i = tmp_21)
}
val a2: Int = { // BLOCK
val tmp2_array: C = C()
val tmp3_index0: Int = 0
tmp2_array.set(i = tmp3_index0, value = tmp2_array.get(i = tmp3_index0).dec())
tmp2_array.get(i = tmp3_index0)
val tmp_22: C = C()
val tmp_23: Int = 0
tmp_22.set(i = tmp_23, value = tmp_22.get(i = tmp_23).dec())
tmp_22.get(i = tmp_23)
}
}
fun testClassOperatorPostfix() {
val a1: Int = { // BLOCK
val tmp0_array: C = C()
val tmp1_index0: Int = 0
val tmp2: Int = tmp0_array.get(i = tmp1_index0)
tmp0_array.set(i = tmp1_index0, value = tmp2.inc())
tmp2
val tmp_24: C = C()
val tmp_25: Int = 0
val tmp_26: Int = tmp_24.get(i = tmp_25)
tmp_24.set(i = tmp_25, value = tmp_26.inc())
tmp_26
}
val a2: Int = { // BLOCK
val tmp3_array: C = C()
val tmp4_index0: Int = 0
val tmp5: Int = tmp3_array.get(i = tmp4_index0)
tmp3_array.set(i = tmp4_index0, value = tmp5.dec())
tmp5
val tmp_27: C = C()
val tmp_28: Int = 0
val tmp_29: Int = tmp_27.get(i = tmp_28)
tmp_27.set(i = tmp_28, value = tmp_29.dec())
tmp_29
}
}
fun testObjectPropPrefix() {
val p1: Int = { // BLOCK
val tmp0_this: O = O
val tmp_30: O = O
{ // BLOCK
tmp0_this.<set-p>(<set-?> = tmp0_this.<get-p>().inc())
tmp0_this.<get-p>()
tmp_30.<set-p>(<set-?> = tmp_30.<get-p>().inc())
tmp_30.<get-p>()
}
}
val p2: Int = { // BLOCK
val tmp1_this: O = O
val tmp_31: O = O
{ // BLOCK
tmp1_this.<set-p>(<set-?> = tmp1_this.<get-p>().dec())
tmp1_this.<get-p>()
tmp_31.<set-p>(<set-?> = tmp_31.<get-p>().dec())
tmp_31.<get-p>()
}
}
}
fun testObjectPropPostfix() {
val p1: Int = { // BLOCK
val tmp0_this: O = O
val tmp_32: O = O
{ // BLOCK
val tmp1: Int = tmp0_this.<get-p>()
tmp0_this.<set-p>(<set-?> = tmp1.inc())
tmp1
val tmp_33: Int = tmp_32.<get-p>()
tmp_32.<set-p>(<set-?> = tmp_33.inc())
tmp_33
}
}
val p2: Int = { // BLOCK
val tmp2_this: O = O
val tmp_34: O = O
{ // BLOCK
val tmp3: Int = tmp2_this.<get-p>()
tmp2_this.<set-p>(<set-?> = tmp3.dec())
tmp3
val tmp_35: Int = tmp_34.<get-p>()
tmp_34.<set-p>(<set-?> = tmp_35.dec())
tmp_35
}
}
}
fun testObjectOperatorPrefix() {
val a1: Int = { // BLOCK
val tmp0_array: O = O
val tmp1_index0: Int = 0
tmp0_array.set(i = tmp1_index0, value = tmp0_array.get(i = tmp1_index0).inc())
tmp0_array.get(i = tmp1_index0)
val tmp_36: O = O
val tmp_37: Int = 0
tmp_36.set(i = tmp_37, value = tmp_36.get(i = tmp_37).inc())
tmp_36.get(i = tmp_37)
}
val a2: Int = { // BLOCK
val tmp2_array: O = O
val tmp3_index0: Int = 0
tmp2_array.set(i = tmp3_index0, value = tmp2_array.get(i = tmp3_index0).dec())
tmp2_array.get(i = tmp3_index0)
val tmp_38: O = O
val tmp_39: Int = 0
tmp_38.set(i = tmp_39, value = tmp_38.get(i = tmp_39).dec())
tmp_38.get(i = tmp_39)
}
}
fun testObjectOperatorPostfix() {
val a1: Int = { // BLOCK
val tmp0_array: O = O
val tmp1_index0: Int = 0
val tmp2: Int = tmp0_array.get(i = tmp1_index0)
tmp0_array.set(i = tmp1_index0, value = tmp2.inc())
tmp2
val tmp_40: O = O
val tmp_41: Int = 0
val tmp_42: Int = tmp_40.get(i = tmp_41)
tmp_40.set(i = tmp_41, value = tmp_42.inc())
tmp_42
}
val a2: Int = { // BLOCK
val tmp3_array: O = O
val tmp4_index0: Int = 0
val tmp5: Int = tmp3_array.get(i = tmp4_index0)
tmp3_array.set(i = tmp4_index0, value = tmp5.dec())
tmp5
val tmp_43: O = O
val tmp_44: Int = 0
val tmp_45: Int = tmp_43.get(i = tmp_44)
tmp_43.set(i = tmp_44, value = tmp_45.dec())
tmp_45
}
}
@@ -2,13 +2,13 @@ fun <F : Any?> test(j: J<F>) {
j.getFoo() /*~> Unit */
j.setFoo(x = 1)
{ // BLOCK
val <receiver>: J<F> = j
val <unary>: Int = <receiver>.getFoo()
<receiver>.setFoo(x = <unary>.inc())
<unary>
val tmp_0: J<F> = j
val tmp_1: Int = tmp_0.getFoo()
tmp_0.setFoo(x = tmp_1.inc())
tmp_1
} /*~> Unit */
{ // BLOCK
val <receiver>: J<F> = j
<receiver>.setFoo(x = <receiver>.getFoo().plus(other = 1))
val tmp_2: J<F> = j
tmp_2.setFoo(x = tmp_2.getFoo().plus(other = 1))
}
}
@@ -2,15 +2,15 @@ fun <F : Any?> test(j: J<F>) {
j.getFoo<F>() /*~> Unit */
j.setFoo<F>(x = 1)
{ // BLOCK
val tmp0_receiver: J<F> = j
val tmp_0: J<F> = j
{ // BLOCK
val tmp1: Int = tmp0_receiver.getFoo<F>()
tmp0_receiver.setFoo<F>(x = tmp1.inc())
tmp1
val tmp_1: Int = tmp_0.getFoo<F>()
tmp_0.setFoo<F>(x = tmp_1.inc())
tmp_1
}
} /*~> Unit */
{ // BLOCK
val tmp2_receiver: J<F> = j
tmp2_receiver.setFoo<F>(x = tmp2_receiver.getFoo<F>().plus(other = 1))
val tmp_2: J<F> = j
tmp_2.setFoo<F>(x = tmp_2.getFoo<F>().plus(other = 1))
}
}
@@ -2,13 +2,13 @@ fun test(j: J) {
j.getFoo() /*~> Unit */
j.setFoo(x = 1)
{ // BLOCK
val <receiver>: J = j
val <unary>: Int = <receiver>.getFoo()
<receiver>.setFoo(x = <unary>.inc())
<unary>
val tmp_0: J = j
val tmp_1: Int = tmp_0.getFoo()
tmp_0.setFoo(x = tmp_1.inc())
tmp_1
} /*~> Unit */
{ // BLOCK
val <receiver>: J = j
<receiver>.setFoo(x = <receiver>.getFoo().plus(other = 1))
val tmp_2: J = j
tmp_2.setFoo(x = tmp_2.getFoo().plus(other = 1))
}
}
@@ -2,15 +2,15 @@ fun test(j: J) {
j.getFoo() /*~> Unit */
j.setFoo(x = 1)
{ // BLOCK
val tmp0_receiver: J = j
val tmp_0: J = j
{ // BLOCK
val tmp1: Int = tmp0_receiver.getFoo()
tmp0_receiver.setFoo(x = tmp1.inc())
tmp1
val tmp_1: Int = tmp_0.getFoo()
tmp_0.setFoo(x = tmp_1.inc())
tmp_1
}
} /*~> Unit */
{ // BLOCK
val tmp2_receiver: J = j
tmp2_receiver.setFoo(x = tmp2_receiver.getFoo().plus(other = 1))
val tmp_2: J = j
tmp_2.setFoo(x = tmp_2.getFoo().plus(other = 1))
}
}
+4 -4
View File
@@ -34,12 +34,12 @@ class Test1 : A {
/* <init>() */
{ // BLOCK
val tmp0_this: Test1 = <this>
tmp0_this.<get-x>().plusAssign(x = 42)
val tmp_0: Test1 = <this>
tmp_0.<get-x>().plusAssign(x = 42)
}
{ // BLOCK
val tmp1_this: Test1 = <this>
tmp1_this.<set-y>(<set-?> = tmp1_this.<get-y>().plus(other = 42))
val tmp_1: Test1 = <this>
tmp_1.<set-y>(<set-?> = tmp_1.<get-y>().plus(other = 42))
}
}
+10 -10
View File
@@ -20,20 +20,20 @@ fun testSimpleAssignment(a: A) {
fun testPostfixIncrement(a: A): Int {
return { // BLOCK
val <array>: A = a
val <index_0>: Int = 1
val <index_1>: Int = 2
val <unary>: Int = <array>.get(xs = [<index_0>, <index_1>])
<array>.set(i = <index_0>, j = <index_1>, v = <unary>.inc())
<unary>
val tmp_0: A = a
val tmp_1: Int = 1
val tmp_2: Int = 2
val tmp_3: Int = tmp_0.get(xs = [tmp_1, tmp_2])
tmp_0.set(i = tmp_1, j = tmp_2, v = tmp_3.inc())
tmp_3
}
}
fun testCompoundAssignment(a: A) {
{ // BLOCK
val <array>: A = a
val <index_0>: Int = 1
val <index_1>: Int = 2
<array>.set(i = <index_0>, j = <index_1>, v = <array>.get(xs = [<index_0>, <index_1>]).plus(other = 10))
val tmp_4: A = a
val tmp_5: Int = 1
val tmp_6: Int = 2
tmp_4.set(i = tmp_5, j = tmp_6, v = tmp_4.get(xs = [tmp_5, tmp_6]).plus(other = 10))
}
}
+10 -10
View File
@@ -20,20 +20,20 @@ fun testSimpleAssignment(a: A) {
fun testPostfixIncrement(a: A): Int {
return { // BLOCK
val tmp0_array: A = a
val tmp1_index0: Int = 1
val tmp2_index1: Int = 2
val tmp3: Int = tmp0_array.get(xs = [tmp1_index0, tmp2_index1])
tmp0_array.set(i = tmp1_index0, j = tmp2_index1, v = tmp3.inc())
tmp3
val tmp_0: A = a
val tmp_1: Int = 1
val tmp_2: Int = 2
val tmp_3: Int = tmp_0.get(xs = [tmp_1, tmp_2])
tmp_0.set(i = tmp_1, j = tmp_2, v = tmp_3.inc())
tmp_3
}
}
fun testCompoundAssignment(a: A) {
{ // BLOCK
val tmp0_array: A = a
val tmp1_index0: Int = 1
val tmp2_index1: Int = 2
tmp0_array.set(i = tmp1_index0, j = tmp2_index1, v = tmp0_array.get(xs = [tmp1_index0, tmp2_index1]).plus(other = 10))
val tmp_4: A = a
val tmp_5: Int = 1
val tmp_6: Int = 2
tmp_4.set(i = tmp_5, j = tmp_6, v = tmp_4.get(xs = [tmp_5, tmp_6]).plus(other = 10))
}
}
@@ -20,18 +20,18 @@ fun testSimpleAssignment(a: A) {
fun testPostfixIncrement(a: A): Int {
return { // BLOCK
val <array>: A = a
val <index_0>: Int = 1
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, v = <unary>.inc())
<unary>
val tmp_0: A = a
val tmp_1: Int = 1
val tmp_2: Int = tmp_0.get(i = tmp_1)
tmp_0.set(i = tmp_1, v = tmp_2.inc())
tmp_2
}
}
fun testCompoundAssignment(a: A) {
{ // BLOCK
val <array>: A = a
val <index_0>: Int = 1
<array>.set(i = <index_0>, v = <array>.get(i = <index_0>).plus(other = 10))
val tmp_3: A = a
val tmp_4: Int = 1
tmp_3.set(i = tmp_4, v = tmp_3.get(i = tmp_4).plus(other = 10))
}
}
+8 -8
View File
@@ -20,18 +20,18 @@ fun testSimpleAssignment(a: A) {
fun testPostfixIncrement(a: A): Int {
return { // BLOCK
val tmp0_array: A = a
val tmp1_index0: Int = 1
val tmp2: Int = tmp0_array.get(i = tmp1_index0)
tmp0_array.set(i = tmp1_index0, v = tmp2.inc())
tmp2
val tmp_0: A = a
val tmp_1: Int = 1
val tmp_2: Int = tmp_0.get(i = tmp_1)
tmp_0.set(i = tmp_1, v = tmp_2.inc())
tmp_2
}
}
fun testCompoundAssignment(a: A) {
{ // BLOCK
val tmp0_array: A = a
val tmp1_index0: Int = 1
tmp0_array.set(i = tmp1_index0, v = tmp0_array.get(i = tmp1_index0).plus(other = 10))
val tmp_3: A = a
val tmp_4: Int = 1
tmp_3.set(i = tmp_4, v = tmp_3.get(i = tmp_4).plus(other = 10))
}
}
+6 -6
View File
@@ -12,17 +12,17 @@ fun test(x: X, nx: X?) {
x.<get-xs>() as MutableList<Int>.plusAssign<Int>(element = 3)
x.f() as MutableList<Int>.plusAssign<Int>(element = 4)
CHECK_NOT_NULL<MutableList<Any>>(arg0 = { // BLOCK
val tmp0_safe_receiver: X? = nx
val tmp_0: X? = nx
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.<get-xs>()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.<get-xs>()
}
}).plusAssign<Int>(element = 5)
CHECK_NOT_NULL<MutableList<Any>>(arg0 = { // BLOCK
val tmp1_safe_receiver: X? = nx
val tmp_1: X? = nx
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.f()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.f()
}
}).plusAssign<Int>(element = 6)
}
+8 -8
View File
@@ -8,24 +8,24 @@ interface X {
fun test(x: X, nx: X?) {
{ // BLOCK
val tmp0_this: X = x
tmp0_this.<get-xs>().plusAssign<Int>(element = 1)
val tmp_0: X = x
tmp_0.<get-xs>().plusAssign<Int>(element = 1)
}
x.f().plusAssign<Int>(element = 2)
x.<get-xs>() as MutableList<Int>.plusAssign<Int>(element = 3)
x.f() as MutableList<Int>.plusAssign<Int>(element = 4)
CHECK_NOT_NULL<MutableList<Any>>(arg0 = { // BLOCK
val tmp1_safe_receiver: X? = nx
val tmp_1: X? = nx
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.<get-xs>()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.<get-xs>()
}
}).plusAssign<Int>(element = 5)
CHECK_NOT_NULL<MutableList<Any>>(arg0 = { // BLOCK
val tmp2_safe_receiver: X? = nx
val tmp_2: X? = nx
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
else -> tmp2_safe_receiver.f()
EQEQ(arg0 = tmp_2, arg1 = null) -> null
else -> tmp_2.f()
}
}).plusAssign<Int>(element = 6)
}
+36 -36
View File
@@ -4,82 +4,82 @@ fun <T : Any?> magic(): T {
fun <T : Any?> test(value: T, value2: T) {
val x1: Any = { // BLOCK
val <elvis>: T = value
val tmp_0: T = value
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> 42
else -> <elvis>
EQEQ(arg0 = tmp_0, arg1 = null) -> 42
else -> tmp_0
}
}
val x2: Any = { // BLOCK
val <elvis>: T = value
val tmp_1: T = value
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> { // BLOCK
val <elvis>: T = value2
EQEQ(arg0 = tmp_1, arg1 = null) -> { // BLOCK
val tmp_2: T = value2
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> 42
else -> <elvis>
EQEQ(arg0 = tmp_2, arg1 = null) -> 42
else -> tmp_2
}
}
else -> <elvis>
else -> tmp_1
}
}
val x3: Any = { // BLOCK
val <elvis>: Any? = { // BLOCK
val <elvis>: T = value
val tmp_3: Any? = { // BLOCK
val tmp_4: T = value
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> value2
else -> <elvis>
EQEQ(arg0 = tmp_4, arg1 = null) -> value2
else -> tmp_4
}
}
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> 42
else -> <elvis>
EQEQ(arg0 = tmp_3, arg1 = null) -> 42
else -> tmp_3
}
}
val x4: Any = { // BLOCK
val <elvis>: Any? = { // BLOCK
val <elvis>: T = value
val tmp_5: Any? = { // BLOCK
val tmp_6: T = value
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> value2
else -> <elvis>
EQEQ(arg0 = tmp_6, arg1 = null) -> value2
else -> tmp_6
}
}
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> 42
else -> <elvis>
EQEQ(arg0 = tmp_5, arg1 = null) -> 42
else -> tmp_5
}
}
val x5: Any = { // BLOCK
val <elvis>: Any? = magic<Any?>()
val tmp_7: Any? = magic<Any?>()
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> 42
else -> <elvis>
EQEQ(arg0 = tmp_7, arg1 = null) -> 42
else -> tmp_7
}
}
val x6: Any = { // BLOCK
val <elvis>: Any? = { // BLOCK
val <elvis>: T = value
val tmp_8: Any? = { // BLOCK
val tmp_9: T = value
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> magic<Any?>()
else -> <elvis>
EQEQ(arg0 = tmp_9, arg1 = null) -> magic<Any?>()
else -> tmp_9
}
}
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> 42
else -> <elvis>
EQEQ(arg0 = tmp_8, arg1 = null) -> 42
else -> tmp_8
}
}
val x7: Any = { // BLOCK
val <elvis>: Any? = { // BLOCK
val <elvis>: Any? = magic<Any?>()
val tmp_10: Any? = { // BLOCK
val tmp_11: Any? = magic<Any?>()
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> value
else -> <elvis>
EQEQ(arg0 = tmp_11, arg1 = null) -> value
else -> tmp_11
}
}
when {
EQEQ(arg0 = <elvis>, arg1 = null) -> 42
else -> <elvis>
EQEQ(arg0 = tmp_10, arg1 = null) -> 42
else -> tmp_10
}
}
}
+36 -36
View File
@@ -4,82 +4,82 @@ fun <T : Any?> magic(): T {
fun <T : Any?> test(value: T, value2: T) {
val x1: Any = { // BLOCK
val tmp0_elvis_lhs: T = value
val tmp_0: T = value
when {
EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> 42
else -> tmp0_elvis_lhs
EQEQ(arg0 = tmp_0, arg1 = null) -> 42
else -> tmp_0
}
}
val x2: Any = { // BLOCK
val tmp2_elvis_lhs: T = value
val tmp_1: T = value
when {
EQEQ(arg0 = tmp2_elvis_lhs, arg1 = null) -> { // BLOCK
val tmp1_elvis_lhs: T = value2
EQEQ(arg0 = tmp_1, arg1 = null) -> { // BLOCK
val tmp_2: T = value2
when {
EQEQ(arg0 = tmp1_elvis_lhs, arg1 = null) -> 42
else -> tmp1_elvis_lhs
EQEQ(arg0 = tmp_2, arg1 = null) -> 42
else -> tmp_2
}
}
else -> tmp2_elvis_lhs
else -> tmp_1
}
}
val x3: Any = { // BLOCK
val tmp4_elvis_lhs: T = { // BLOCK
val tmp3_elvis_lhs: T = value
val tmp_3: T = { // BLOCK
val tmp_4: T = value
when {
EQEQ(arg0 = tmp3_elvis_lhs, arg1 = null) -> value2
else -> tmp3_elvis_lhs
EQEQ(arg0 = tmp_4, arg1 = null) -> value2
else -> tmp_4
}
}
when {
EQEQ(arg0 = tmp4_elvis_lhs, arg1 = null) -> 42
else -> tmp4_elvis_lhs
EQEQ(arg0 = tmp_3, arg1 = null) -> 42
else -> tmp_3
}
}
val x4: Any = { // BLOCK
val tmp6_elvis_lhs: T = { // BLOCK
val tmp5_elvis_lhs: T = value
val tmp_5: T = { // BLOCK
val tmp_6: T = value
when {
EQEQ(arg0 = tmp5_elvis_lhs, arg1 = null) -> value2
else -> tmp5_elvis_lhs
EQEQ(arg0 = tmp_6, arg1 = null) -> value2
else -> tmp_6
}
}
when {
EQEQ(arg0 = tmp6_elvis_lhs, arg1 = null) -> 42
else -> tmp6_elvis_lhs
EQEQ(arg0 = tmp_5, arg1 = null) -> 42
else -> tmp_5
}
}
val x5: Any = { // BLOCK
val tmp7_elvis_lhs: Any? = magic<Any?>()
val tmp_7: Any? = magic<Any?>()
when {
EQEQ(arg0 = tmp7_elvis_lhs, arg1 = null) -> 42
else -> tmp7_elvis_lhs
EQEQ(arg0 = tmp_7, arg1 = null) -> 42
else -> tmp_7
}
}
val x6: Any = { // BLOCK
val tmp9_elvis_lhs: Any? = { // BLOCK
val tmp8_elvis_lhs: T = value
val tmp_8: Any? = { // BLOCK
val tmp_9: T = value
when {
EQEQ(arg0 = tmp8_elvis_lhs, arg1 = null) -> magic<Any?>()
else -> tmp8_elvis_lhs
EQEQ(arg0 = tmp_9, arg1 = null) -> magic<Any?>()
else -> tmp_9
}
}
when {
EQEQ(arg0 = tmp9_elvis_lhs, arg1 = null) -> 42
else -> tmp9_elvis_lhs
EQEQ(arg0 = tmp_8, arg1 = null) -> 42
else -> tmp_8
}
}
val x7: Any = { // BLOCK
val tmp11_elvis_lhs: Any? = { // BLOCK
val tmp10_elvis_lhs: Any? = magic<Any?>()
val tmp_10: Any? = { // BLOCK
val tmp_11: Any? = magic<Any?>()
when {
EQEQ(arg0 = tmp10_elvis_lhs, arg1 = null) -> value
else -> tmp10_elvis_lhs
EQEQ(arg0 = tmp_11, arg1 = null) -> value
else -> tmp_11
}
}
when {
EQEQ(arg0 = tmp11_elvis_lhs, arg1 = null) -> 42
else -> tmp11_elvis_lhs
EQEQ(arg0 = tmp_10, arg1 = null) -> 42
else -> tmp_10
}
}
}
+5 -5
View File
@@ -24,10 +24,10 @@ val aFloat: A<Float>
val aInt: Float
field = { // BLOCK
val <array>: A<Float> = <get-aFloat>()
val <index_0>: Int = 1
val <unary>: Float = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, v = <unary>.dec())
<unary>
val tmp_0: A<Float> = <get-aFloat>()
val tmp_1: Int = 1
val tmp_2: Float = tmp_0.get(i = tmp_1)
tmp_0.set(i = tmp_1, v = tmp_2.dec())
tmp_2
}
get
+5 -5
View File
@@ -24,10 +24,10 @@ val aFloat: A<Float>
val aInt: Float
field = { // BLOCK
val tmp0_array: A<Float> = <get-aFloat>()
val tmp1_index0: Int = 1
val tmp2: Float = tmp0_array.get(i = tmp1_index0)
tmp0_array.set(i = tmp1_index0, v = tmp2.dec())
tmp2
val tmp_0: A<Float> = <get-aFloat>()
val tmp_1: Int = 1
val tmp_2: Float = tmp_0.get(i = tmp_1)
tmp_0.set(i = tmp_1, v = tmp_2.dec())
tmp_2
}
get
@@ -17,22 +17,22 @@ fun test1(a: Any) {
fun test2(a: Any) {
{ // BLOCK
val <array>: Any = a
val <index_0>: Function0<Unit> = local fun <anonymous>() {
val tmp_0: Any = a
val tmp_1: Function0<Unit> = local fun <anonymous>() {
return Unit
}
<array>.set(index = <index_0>, value = <array>.get(index = <index_0>).plus(other = 42))
tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42))
}
}
fun test3(a: Any) {
val <array>: Any = a
val <index_0>: Function0<Unit> = local fun <anonymous>() {
val tmp_2: Any = a
val tmp_3: Function0<Unit> = local fun <anonymous>() {
return Unit
}
val <unary>: Int = <array>.get(index = <index_0>)
<array>.set(index = <index_0>, value = <unary>.inc())
<unary> /*~> Unit */
val tmp_4: Int = tmp_2.get(index = tmp_3)
tmp_2.set(index = tmp_3, value = tmp_4.inc())
tmp_4 /*~> Unit */
}
+8 -8
View File
@@ -17,24 +17,24 @@ fun test1(a: Any) {
fun test2(a: Any) {
{ // BLOCK
val tmp0_array: Any = a
val tmp1_index0: Function0<Unit> = local fun <anonymous>() {
val tmp_0: Any = a
val tmp_1: Function0<Unit> = local fun <anonymous>() {
return Unit
}
tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).plus(other = 42))
tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42))
}
}
fun test3(a: Any) {
{ // BLOCK
val tmp0_array: Any = a
val tmp1_index0: Function0<Unit> = local fun <anonymous>() {
val tmp_2: Any = a
val tmp_3: Function0<Unit> = local fun <anonymous>() {
return Unit
}
val tmp2: Int = tmp0_array.get(index = tmp1_index0)
tmp0_array.set(index = tmp1_index0, value = tmp2.inc())
tmp2
val tmp_4: Int = tmp_2.get(index = tmp_3)
tmp_2.set(index = tmp_3, value = tmp_4.inc())
tmp_4
} /*~> Unit */
}
@@ -14,9 +14,9 @@ fun test(x: Any) {
x is IC1 -> x /*as IC1 */ is IC2
else -> false
} -> { // BLOCK
val <destruct>: Any = x /*as IC1 */
val x1: Int = <destruct> /*as IC1 */.component1()
val x2: String = <destruct> /*as IC1 */ /*as IC2 */.component2()
val tmp_0: Any = x /*as IC1 */
val x1: Int = tmp_0 /*as IC1 */.component1()
val x2: String = tmp_0 /*as IC1 */ /*as IC2 */.component2()
}
}
}
@@ -15,9 +15,9 @@ fun test(x: Any) {
else -> false
} -> { // BLOCK
// COMPOSITE {
val tmp0_container: Any = x
val x1: Int = tmp0_container /*as IC1 */.component1()
val x2: String = tmp0_container /*as IC2 */.component2()
val tmp_0: Any = x
val x1: Int = tmp_0 /*as IC1 */.component1()
val x2: String = tmp_0 /*as IC2 */.component2()
// }
}
}
@@ -14,10 +14,10 @@ class C {
fun test(nc: C?) {
{ // BLOCK
val tmp0_safe_receiver: C? = nc
val tmp_0: C? = nc
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.<set-x>(<set-?> = 42)
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.<set-x>(<set-?> = 42)
}
} /*~> Unit */
}
@@ -14,10 +14,10 @@ class C {
fun test(nc: C?) {
{ // BLOCK
val tmp0_safe_receiver: C? = nc
val tmp_0: C? = nc
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null /*~> Unit */
else -> tmp0_safe_receiver.<set-x>(<set-?> = 42)
EQEQ(arg0 = tmp_0, arg1 = null) -> null /*~> Unit */
else -> tmp_0.<set-x>(<set-?> = 42)
}
}
}
@@ -18,10 +18,10 @@ var C?.p: Int
operator fun Int?.inc(): Int? {
return { // BLOCK
val tmp0_safe_receiver: Int? = <this>
val tmp_0: Int? = <this>
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.inc()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.inc()
}
}
}
@@ -35,14 +35,14 @@ operator fun Int?.set(index: Int, value: Int) {
fun testProperty(nc: C?) {
{ // BLOCK
val tmp1_safe_receiver: C? = nc
val tmp_1: C? = nc
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> { // BLOCK
val <receiver>: C = tmp1_safe_receiver
val <unary>: Int = <receiver>.<get-p>()
<receiver>.<set-p>(value = <unary>.inc())
<unary>
val tmp_2: C = tmp_1
val tmp_3: Int = tmp_2.<get-p>()
tmp_2.<set-p>(value = tmp_3.inc())
tmp_3
}
}
} /*~> Unit */
@@ -50,15 +50,15 @@ fun testProperty(nc: C?) {
fun testArrayAccess(nc: C?) {
{ // BLOCK
val tmp2_safe_receiver: C? = nc
val tmp_4: C? = nc
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
EQEQ(arg0 = tmp_4, arg1 = null) -> null
else -> { // BLOCK
val <array>: Int = tmp2_safe_receiver.<get-p>()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(index = <index_0>)
<array>.set(index = <index_0>, value = <unary>.inc())
<unary>
val tmp_5: Int = tmp_4.<get-p>()
val tmp_6: Int = 0
val tmp_7: Int = tmp_5.get(index = tmp_6)
tmp_5.set(index = tmp_6, value = tmp_7.inc())
tmp_7
}
}
} /*~> Unit */
@@ -18,10 +18,10 @@ var C?.p: Int
operator fun Int?.inc(): Int? {
return { // BLOCK
val tmp0_safe_receiver: Int? = <this>
val tmp_0: Int? = <this>
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.inc()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.inc()
}
}
}
@@ -35,15 +35,15 @@ operator fun Int?.set(index: Int, value: Int) {
fun testProperty(nc: C?) {
{ // BLOCK
val tmp0_safe_receiver: C? = nc
val tmp_1: C? = nc
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> { // BLOCK
val tmp1_receiver: C? = tmp0_safe_receiver
val tmp_2: C? = tmp_1
{ // BLOCK
val tmp2: Int = tmp1_receiver.<get-p>()
tmp1_receiver.<set-p>(value = tmp2.inc())
tmp2
val tmp_3: Int = tmp_2.<get-p>()
tmp_2.<set-p>(value = tmp_3.inc())
tmp_3
}
}
}
@@ -52,16 +52,16 @@ fun testProperty(nc: C?) {
fun testArrayAccess(nc: C?) {
{ // BLOCK
val tmp1_array: Int? = { // BLOCK
val tmp0_safe_receiver: C? = nc
val tmp_4: Int? = { // BLOCK
val tmp_5: C? = nc
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.<get-p>()
EQEQ(arg0 = tmp_5, arg1 = null) -> null
else -> tmp_5.<get-p>()
}
}
val tmp2_index0: Int = 0
val tmp3: Int = tmp1_array.get(index = tmp2_index0)
tmp1_array.set(index = tmp2_index0, value = tmp3.inc())
tmp3
val tmp_6: Int = 0
val tmp_7: Int = tmp_4.get(index = tmp_6)
tmp_4.set(index = tmp_6, value = tmp_7.inc())
tmp_7
} /*~> Unit */
}
+18 -18
View File
@@ -21,50 +21,50 @@ interface IHost {
fun test1(x: String?): Int? {
return { // BLOCK
val tmp0_safe_receiver: String? = x
val tmp_0: String? = x
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.<get-length>()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.<get-length>()
}
}
}
fun test2(x: String?): Int? {
return { // BLOCK
val tmp1_safe_receiver: String? = x
val tmp_1: String? = x
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.hashCode()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.hashCode()
}
}
}
fun test3(x: String?, y: Any?): Boolean? {
return { // BLOCK
val tmp2_safe_receiver: String? = x
val tmp_2: String? = x
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
else -> tmp2_safe_receiver.equals(other = y)
EQEQ(arg0 = tmp_2, arg1 = null) -> null
else -> tmp_2.equals(other = y)
}
}
}
fun test4(x: Ref?) {
{ // BLOCK
val tmp3_safe_receiver: Ref? = x
val tmp_3: Ref? = x
when {
EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null
else -> tmp3_safe_receiver.<set-value>(<set-?> = 0)
EQEQ(arg0 = tmp_3, arg1 = null) -> null
else -> tmp_3.<set-value>(<set-?> = 0)
}
} /*~> Unit */
}
fun IHost.test5(s: String?): Int? {
return { // BLOCK
val tmp4_safe_receiver: String? = s
val tmp_4: String? = s
when {
EQEQ(arg0 = tmp4_safe_receiver, arg1 = null) -> null
else -> (<this>, tmp4_safe_receiver).extLength()
EQEQ(arg0 = tmp_4, arg1 = null) -> null
else -> (<this>, tmp_4).extLength()
}
}
}
@@ -75,10 +75,10 @@ fun Int.foo(): Int {
fun box() {
{ // BLOCK
val tmp5_safe_receiver: Int = 42
val tmp_5: Int = 42
when {
EQEQ(arg0 = tmp5_safe_receiver, arg1 = null) -> null
else -> tmp5_safe_receiver.foo()
EQEQ(arg0 = tmp_5, arg1 = null) -> null
else -> tmp_5.foo()
}
} /*~> Unit */
}
+18 -18
View File
@@ -21,50 +21,50 @@ interface IHost {
fun test1(x: String?): Int? {
return { // BLOCK
val tmp0_safe_receiver: String? = x
val tmp_0: String? = x
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.<get-length>()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.<get-length>()
}
}
}
fun test2(x: String?): Int? {
return { // BLOCK
val tmp0_safe_receiver: String? = x
val tmp_1: String? = x
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.hashCode()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.hashCode()
}
}
}
fun test3(x: String?, y: Any?): Boolean? {
return { // BLOCK
val tmp0_safe_receiver: String? = x
val tmp_2: String? = x
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.equals(other = y)
EQEQ(arg0 = tmp_2, arg1 = null) -> null
else -> tmp_2.equals(other = y)
}
}
}
fun test4(x: Ref?) {
{ // BLOCK
val tmp0_safe_receiver: Ref? = x
val tmp_3: Ref? = x
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null /*~> Unit */
else -> tmp0_safe_receiver.<set-value>(<set-?> = 0)
EQEQ(arg0 = tmp_3, arg1 = null) -> null /*~> Unit */
else -> tmp_3.<set-value>(<set-?> = 0)
}
}
}
fun IHost.test5(s: String?): Int? {
return { // BLOCK
val tmp0_safe_receiver: String? = s
val tmp_4: String? = s
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> (<this>, tmp0_safe_receiver).extLength()
EQEQ(arg0 = tmp_4, arg1 = null) -> null
else -> (<this>, tmp_4).extLength()
}
}
}
@@ -75,10 +75,10 @@ fun Int.foo(): Int {
fun box() {
{ // BLOCK
val tmp0_safe_receiver: Int = 42
val tmp_5: Int = 42
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.foo()
EQEQ(arg0 = tmp_5, arg1 = null) -> null
else -> tmp_5.foo()
}
} /*~> Unit */
}
@@ -18,7 +18,7 @@ fun test(x: I1) {
when {
x !is I2 -> return Unit
}
val <destruct>: I1 = x /*as I2 */
val c1: Int = <destruct> /*as I2 */.component1()
val c2: String = <destruct> /*as I2 */.component2()
val tmp_0: I1 = x /*as I2 */
val c1: Int = tmp_0 /*as I2 */.component1()
val c2: String = tmp_0 /*as I2 */.component2()
}
@@ -19,8 +19,8 @@ fun test(x: I1) {
x !is I2 -> return Unit
}
// COMPOSITE {
val tmp0_container: I2 = x /*as I2 */
val c1: Int = tmp0_container /*as I1 */.component1()
val c2: String = tmp0_container.component2()
val tmp_0: I2 = x /*as I2 */
val c1: Int = tmp_0 /*as I1 */.component1()
val c2: String = tmp_0.component2()
// }
}
@@ -14,10 +14,10 @@ enum class En : Enum<En> {
get
ENTRY = En(x = { // BLOCK
val tmp0_safe_receiver: Any? = <get-n>()
val tmp_0: Any? = <get-n>()
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.toString()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.toString()
}
})
@@ -14,10 +14,10 @@ enum class En : Enum<En> {
get
ENTRY = En(x = { // BLOCK
val tmp0_safe_receiver: Any? = <get-n>()
val tmp_0: Any? = <get-n>()
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.toString()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.toString()
}
})
@@ -10,10 +10,10 @@ class C {
init {
<this>.#s = { // BLOCK
val tmp0_safe_receiver: Any? = x
val tmp_0: Any? = x
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.toString()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.toString()
}
}
}
@@ -19,16 +19,16 @@ fun test3(): String {
fun test4(ns: String?): String? {
return { // BLOCK
val tmp1_safe_receiver: Function0<String>? = { // BLOCK
val tmp0_safe_receiver: String? = ns
val tmp_0: Function0<String>? = { // BLOCK
val tmp_1: String? = ns
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.k()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.k()
}
}
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.invoke()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.invoke()
}
}
}
@@ -19,16 +19,16 @@ fun test3(): String {
fun test4(ns: String?): String? {
return { // BLOCK
val tmp1_safe_receiver: Function0<String>? = { // BLOCK
val tmp0_safe_receiver: String? = ns
val tmp_0: Function0<String>? = { // BLOCK
val tmp_1: String? = ns
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.k()
EQEQ(arg0 = tmp_1, arg1 = null) -> null
else -> tmp_1.k()
}
}
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.invoke()
EQEQ(arg0 = tmp_0, arg1 = null) -> null
else -> tmp_0.invoke()
}
}
}
+16 -16
View File
@@ -9,13 +9,13 @@ object A {
fun testWithSubject(x: Any?): String {
return { // BLOCK
val tmp0_subject: Any? = x
val tmp_0: Any? = x
when {
EQEQ(arg0 = tmp0_subject, arg1 = null) -> "null"
EQEQ(arg0 = tmp0_subject, arg1 = A) -> "A"
tmp0_subject is String -> "String"
tmp0_subject !is Number -> "!Number"
setOf<Nothing>().contains<Number>(element = tmp0_subject /*as Number */) -> "nothingness?"
EQEQ(arg0 = tmp_0, arg1 = null) -> "null"
EQEQ(arg0 = tmp_0, arg1 = A) -> "A"
tmp_0 is String -> "String"
tmp_0 !is Number -> "!Number"
setOf<Nothing>().contains<Number>(element = tmp_0 /*as Number */) -> "nothingness?"
else -> "something"
}
}
@@ -34,28 +34,28 @@ fun test(x: Any?): String {
fun testComma(x: Int): String {
return { // BLOCK
val tmp1_subject: Int = x
val tmp_1: Int = x
when {
when {
when {
EQEQ(arg0 = tmp1_subject, arg1 = 1) -> true
else -> EQEQ(arg0 = tmp1_subject, arg1 = 2)
EQEQ(arg0 = tmp_1, arg1 = 1) -> true
else -> EQEQ(arg0 = tmp_1, arg1 = 2)
} -> true
else -> when {
EQEQ(arg0 = tmp1_subject, arg1 = 3) -> true
else -> EQEQ(arg0 = tmp1_subject, arg1 = 4)
EQEQ(arg0 = tmp_1, arg1 = 3) -> true
else -> EQEQ(arg0 = tmp_1, arg1 = 4)
}
} -> "1234"
when {
EQEQ(arg0 = tmp1_subject, arg1 = 5) -> true
EQEQ(arg0 = tmp_1, arg1 = 5) -> true
else -> when {
EQEQ(arg0 = tmp1_subject, arg1 = 6) -> true
else -> EQEQ(arg0 = tmp1_subject, arg1 = 7)
EQEQ(arg0 = tmp_1, arg1 = 6) -> true
else -> EQEQ(arg0 = tmp_1, arg1 = 7)
}
} -> "567"
when {
EQEQ(arg0 = tmp1_subject, arg1 = 8) -> true
else -> EQEQ(arg0 = tmp1_subject, arg1 = 9)
EQEQ(arg0 = tmp_1, arg1 = 8) -> true
else -> EQEQ(arg0 = tmp_1, arg1 = 9)
} -> "89"
else -> "?"
}
+16 -16
View File
@@ -9,13 +9,13 @@ object A {
fun testWithSubject(x: Any?): String {
return { // BLOCK
val tmp0_subject: Any? = x
val tmp_0: Any? = x
when {
EQEQ(arg0 = tmp0_subject, arg1 = null) -> "null"
EQEQ(arg0 = tmp0_subject, arg1 = A) -> "A"
tmp0_subject is String -> "String"
tmp0_subject is Number.not() -> "!Number"
setOf<Nothing>().contains<Number>(element = tmp0_subject /*as Number */) -> "nothingness?"
EQEQ(arg0 = tmp_0, arg1 = null) -> "null"
EQEQ(arg0 = tmp_0, arg1 = A) -> "A"
tmp_0 is String -> "String"
tmp_0 is Number.not() -> "!Number"
setOf<Nothing>().contains<Number>(element = tmp_0 /*as Number */) -> "nothingness?"
else -> "something"
}
}
@@ -34,28 +34,28 @@ fun test(x: Any?): String {
fun testComma(x: Int): String {
return { // BLOCK
val tmp0_subject: Int = x
val tmp_1: Int = x
when {
when {
when {
when {
EQEQ(arg0 = tmp0_subject, arg1 = 1) -> true
else -> EQEQ(arg0 = tmp0_subject, arg1 = 2)
EQEQ(arg0 = tmp_1, arg1 = 1) -> true
else -> EQEQ(arg0 = tmp_1, arg1 = 2)
} -> true
else -> EQEQ(arg0 = tmp0_subject, arg1 = 3)
else -> EQEQ(arg0 = tmp_1, arg1 = 3)
} -> true
else -> EQEQ(arg0 = tmp0_subject, arg1 = 4)
else -> EQEQ(arg0 = tmp_1, arg1 = 4)
} -> "1234"
when {
when {
EQEQ(arg0 = tmp0_subject, arg1 = 5) -> true
else -> EQEQ(arg0 = tmp0_subject, arg1 = 6)
EQEQ(arg0 = tmp_1, arg1 = 5) -> true
else -> EQEQ(arg0 = tmp_1, arg1 = 6)
} -> true
else -> EQEQ(arg0 = tmp0_subject, arg1 = 7)
else -> EQEQ(arg0 = tmp_1, arg1 = 7)
} -> "567"
when {
EQEQ(arg0 = tmp0_subject, arg1 = 8) -> true
else -> EQEQ(arg0 = tmp0_subject, arg1 = 9)
EQEQ(arg0 = tmp_1, arg1 = 8) -> true
else -> EQEQ(arg0 = tmp_1, arg1 = 9)
} -> "89"
else -> "?"
}
@@ -1,8 +1,8 @@
fun foo(x: Int) {
{ // BLOCK
val tmp0_subject: Int = x
val tmp_0: Int = x
when {
EQEQ(arg0 = tmp0_subject, arg1 = 0) -> 0 /*~> Unit */
EQEQ(arg0 = tmp_0, arg1 = 0) -> 0 /*~> Unit */
}
}
}
@@ -1,11 +1,11 @@
fun toString(grade: String): String {
{ // BLOCK
val tmp0_subject: String = grade
val tmp_0: String = grade
when {
EQEQ(arg0 = tmp0_subject, arg1 = "A") -> return "Excellent"
EQEQ(arg0 = tmp0_subject, arg1 = "B") -> return "Good"
EQEQ(arg0 = tmp0_subject, arg1 = "C") -> return "Mediocre"
EQEQ(arg0 = tmp0_subject, arg1 = "D") -> return "Fair"
EQEQ(arg0 = tmp_0, arg1 = "A") -> return "Excellent"
EQEQ(arg0 = tmp_0, arg1 = "B") -> return "Good"
EQEQ(arg0 = tmp_0, arg1 = "C") -> return "Mediocre"
EQEQ(arg0 = tmp_0, arg1 = "D") -> return "Fair"
else -> return "Failure"
}
}
+5 -5
View File
@@ -1,11 +1,11 @@
fun toString(grade: String): String {
{ // BLOCK
val tmp0_subject: String = grade
val tmp_0: String = grade
when {
EQEQ(arg0 = tmp0_subject, arg1 = "A") -> return "Excellent"
EQEQ(arg0 = tmp0_subject, arg1 = "B") -> return "Good"
EQEQ(arg0 = tmp0_subject, arg1 = "C") -> return "Mediocre"
EQEQ(arg0 = tmp0_subject, arg1 = "D") -> return "Fair"
EQEQ(arg0 = tmp_0, arg1 = "A") -> return "Excellent"
EQEQ(arg0 = tmp_0, arg1 = "B") -> return "Good"
EQEQ(arg0 = tmp_0, arg1 = "C") -> return "Mediocre"
EQEQ(arg0 = tmp_0, arg1 = "D") -> return "Fair"
else -> return "Failure"
}
}
@@ -4,10 +4,10 @@ fun run(block: Function0<Unit>) {
fun branch(x: Int) {
return run(block = local fun <anonymous>() {
{ // BLOCK
val tmp0_subject: Int = x
val tmp_0: Int = x
when {
EQEQ(arg0 = tmp0_subject, arg1 = 1) -> TODO(reason = "1")
EQEQ(arg0 = tmp0_subject, arg1 = 2) -> TODO(reason = "2")
EQEQ(arg0 = tmp_0, arg1 = 1) -> TODO(reason = "1")
EQEQ(arg0 = tmp_0, arg1 = 2) -> TODO(reason = "2")
}
}
}
@@ -26,14 +26,14 @@ fun test() {
when {
x is En -> { // BLOCK
{ // BLOCK
val tmp0_subject: En = x /*as En */
val tmp_0: En = x /*as En */
when {
EQEQ(arg0 = tmp0_subject, arg1 = En.A) -> { // BLOCK
EQEQ(arg0 = tmp_0, arg1 = En.A) -> { // BLOCK
r = "when1"
}
EQEQ(arg0 = tmp0_subject, arg1 = En.B) -> { // BLOCK
EQEQ(arg0 = tmp_0, arg1 = En.B) -> { // BLOCK
}
EQEQ(arg0 = tmp0_subject, arg1 = En.C) -> { // BLOCK
EQEQ(arg0 = tmp_0, arg1 = En.C) -> { // BLOCK
}
else -> noWhenBranchMatchedException()
}
@@ -44,14 +44,14 @@ fun test() {
when {
y is En -> { // BLOCK
{ // BLOCK
val tmp1_subject: En = y /*as En */
val tmp_1: En = y /*as En */
when {
EQEQ(arg0 = tmp1_subject, arg1 = En.A) -> { // BLOCK
EQEQ(arg0 = tmp_1, arg1 = En.A) -> { // BLOCK
r = "when2"
}
EQEQ(arg0 = tmp1_subject, arg1 = En.B) -> { // BLOCK
EQEQ(arg0 = tmp_1, arg1 = En.B) -> { // BLOCK
}
EQEQ(arg0 = tmp1_subject, arg1 = En.C) -> { // BLOCK
EQEQ(arg0 = tmp_1, arg1 = En.C) -> { // BLOCK
}
else -> noWhenBranchMatchedException()
}
@@ -26,14 +26,14 @@ fun test() {
when {
x is En -> { // BLOCK
{ // BLOCK
val tmp0_subject: En = x /*as En */
val tmp_0: En = x /*as En */
when {
EQEQ(arg0 = tmp0_subject, arg1 = En.A) -> { // BLOCK
EQEQ(arg0 = tmp_0, arg1 = En.A) -> { // BLOCK
r = "when1"
}
EQEQ(arg0 = tmp0_subject, arg1 = En.B) -> { // BLOCK
EQEQ(arg0 = tmp_0, arg1 = En.B) -> { // BLOCK
}
EQEQ(arg0 = tmp0_subject, arg1 = En.C) -> { // BLOCK
EQEQ(arg0 = tmp_0, arg1 = En.C) -> { // BLOCK
}
}
}
@@ -43,14 +43,14 @@ fun test() {
when {
y is En -> { // BLOCK
{ // BLOCK
val tmp1_subject: En = y /*as En */
val tmp_1: En = y /*as En */
when {
EQEQ(arg0 = tmp1_subject, arg1 = En.A) -> { // BLOCK
EQEQ(arg0 = tmp_1, arg1 = En.A) -> { // BLOCK
r = "when2"
}
EQEQ(arg0 = tmp1_subject, arg1 = En.B) -> { // BLOCK
EQEQ(arg0 = tmp_1, arg1 = En.B) -> { // BLOCK
}
EQEQ(arg0 = tmp1_subject, arg1 = En.C) -> { // BLOCK
EQEQ(arg0 = tmp_1, arg1 = En.C) -> { // BLOCK
}
}
}
@@ -2,9 +2,9 @@ fun test(b: Boolean, i: Int) {
when {
b -> { // BLOCK
{ // BLOCK
val tmp0_subject: Int = i
val tmp_0: Int = i
when {
EQEQ(arg0 = tmp0_subject, arg1 = 0) -> 1
EQEQ(arg0 = tmp_0, arg1 = 0) -> 1
else -> null
}
}
@@ -2,9 +2,9 @@ fun test(b: Boolean, i: Int) {
when {
b -> { // BLOCK
{ // BLOCK
val tmp0_subject: Int = i
val tmp_0: Int = i
when {
EQEQ(arg0 = tmp0_subject, arg1 = 0) -> 1 /*~> Unit */
EQEQ(arg0 = tmp_0, arg1 = 0) -> 1 /*~> Unit */
else -> null /*~> Unit */
}
}
@@ -2,15 +2,15 @@ fun test() {
var x: Int = 0
while (less(arg0 = x, arg1 = 0))
while (less(arg0 = x, arg1 = 5)) { // BLOCK
val <unary>: Int = x
x = <unary>.inc()
<unary>
val tmp_0: Int = x
x = tmp_0.inc()
tmp_0
}
while (less(arg0 = x, arg1 = 10)) { // BLOCK
{ // BLOCK
val <unary>: Int = x
x = <unary>.inc()
<unary>
val tmp_1: Int = x
x = tmp_1.inc()
tmp_1
}
}
{ // BLOCK
@@ -22,17 +22,17 @@ fun test() {
}
{ // BLOCK
do{ // BLOCK
val <unary>: Int = x
x = <unary>.inc()
<unary>
val tmp_2: Int = x
x = tmp_2.inc()
tmp_2
} while (less(arg0 = x, arg1 = 15))
}
{ // BLOCK
do// COMPOSITE {
{ // BLOCK
val <unary>: Int = x
x = <unary>.inc()
<unary>
val tmp_3: Int = x
x = tmp_3.inc()
tmp_3
}
// } while (less(arg0 = x, arg1 = 20))
}
+12 -12
View File
@@ -2,15 +2,15 @@ fun test() {
var x: Int = 0
while (less(arg0 = x, arg1 = 0))
while (less(arg0 = x, arg1 = 5)) { // BLOCK
val tmp0: Int = x
x = tmp0.inc()
tmp0
val tmp_0: Int = x
x = tmp_0.inc()
tmp_0
} /*~> Unit */
while (less(arg0 = x, arg1 = 10)) { // BLOCK
{ // BLOCK
val tmp1: Int = x
x = tmp1.inc()
tmp1
val tmp_1: Int = x
x = tmp_1.inc()
tmp_1
} /*~> Unit */
}
{ // BLOCK
@@ -22,17 +22,17 @@ fun test() {
}
{ // BLOCK
do{ // BLOCK
val tmp2: Int = x
x = tmp2.inc()
tmp2
val tmp_2: Int = x
x = tmp_2.inc()
tmp_2
} /*~> Unit */ while (less(arg0 = x, arg1 = 15))
}
{ // BLOCK
do// COMPOSITE {
{ // BLOCK
val tmp3: Int = x
x = tmp3.inc()
tmp3
val tmp_3: Int = x
x = tmp_3.inc()
tmp_3
} /*~> Unit */
// } while (less(arg0 = x, arg1 = 20))
}