[FIR2IR] Properly set statement origin for all parts of += calls

^KT-65649 Fixed
This commit is contained in:
Dmitriy Novozhilov
2024-02-27 11:04:41 +02:00
committed by Space Team
parent e4537cb9f0
commit dd94de3a34
43 changed files with 129 additions and 1294 deletions
@@ -17,23 +17,23 @@ FILE fqName:<root> fileName:/augmentedAssignment1.kt
FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: CONST Int type=kotlin.Int value=1
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: CONST Int type=kotlin.Int value=2
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: CONST Int type=kotlin.Int value=3
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: CONST Int type=kotlin.Int value=4
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PERCEQ
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: CONST Int type=kotlin.Int value=5
FUN name:testVariable visibility:public modality:FINAL <> () returnType:kotlin.Unit
@@ -41,22 +41,22 @@ FILE fqName:<root> fileName:/augmentedAssignment1.kt
VAR name:x type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
SET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=null
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=PLUSEQ
other: CONST Int type=kotlin.Int value=1
SET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Unit origin=MINUSEQ
CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=null
CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=MINUSEQ
other: CONST Int type=kotlin.Int value=2
SET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Unit origin=EQ
CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=null
CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=MULTEQ
other: CONST Int type=kotlin.Int value=3
SET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Unit origin=EQ
CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=null
CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=DIVEQ
other: CONST Int type=kotlin.Int value=4
SET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Unit origin=EQ
CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=null
CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PERCEQ
$this: GET_VAR 'var x: kotlin.Int declared in <root>.testVariable' type=kotlin.Int origin=PERCEQ
other: CONST Int type=kotlin.Int value=5
@@ -65,19 +65,19 @@ FILE fqName:<root> fileName:/augmentedAssignment2.kt
VAR name:a type:<root>.A [val]
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A' type=<root>.A origin=null
CALL 'public final fun plusAssign (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=null
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=PLUSEQ
s: CONST String type=kotlin.String value="+="
CALL 'public final fun minusAssign (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=MINUSEQ
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=null
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=MINUSEQ
s: CONST String type=kotlin.String value="-="
CALL 'public final fun timesAssign (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=MULTEQ
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=null
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=MULTEQ
s: CONST String type=kotlin.String value="*="
CALL 'public final fun divAssign (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=DIVEQ
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=null
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=DIVEQ
s: CONST String type=kotlin.String value="/="
CALL 'public final fun remAssign (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PERCEQ
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=null
$receiver: GET_VAR 'val a: <root>.A declared in <root>.testVariable' type=<root>.A origin=PERCEQ
s: CONST String type=kotlin.String value="*="
FUN name:timesAssign visibility:public modality:FINAL <> ($receiver:<root>.A, s:kotlin.String) returnType:kotlin.Unit [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
@@ -26,7 +26,7 @@ FILE fqName:<root> fileName:/augmentedAssignmentWithExpression.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in <root>.Host' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host.test1' type=<root>.Host origin=null
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host.test1' type=<root>.Host origin=PLUSEQ
x: CONST Int type=kotlin.Int value=1
FUN name:foo visibility:public modality:FINAL <> () returnType:<root>.Host
BLOCK_BODY
@@ -36,12 +36,12 @@ FILE fqName:<root> fileName:/augmentedAssignmentWithExpression.kt
$receiver: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in <root>.Host' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR '<this>: <root>.Host declared in <root>.test2' type=<root>.Host origin=null
$this: GET_VAR '<this>: <root>.Host declared in <root>.test2' type=<root>.Host origin=PLUSEQ
x: CONST Int type=kotlin.Int value=1
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in <root>.Host' type=kotlin.Unit origin=PLUSEQ
$this: CALL 'public final fun foo (): <root>.Host declared in <root>' type=<root>.Host origin=null
$this: CALL 'public final fun foo (): <root>.Host declared in <root>' type=<root>.Host origin=PLUSEQ
x: CONST Int type=kotlin.Int value=1
FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0<<root>.Host>) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Function0<<root>.Host>
@@ -83,8 +83,8 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
arg1: CONST Int type=kotlin.Int value=2
then: CONTINUE label=null loop.label=null
SET_VAR 'var s: kotlin.String declared in <root>.testContinueDoWhile' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null
$this: GET_VAR 'var s: kotlin.String declared in <root>.testContinueDoWhile' type=kotlin.String origin=null
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ
$this: GET_VAR 'var s: kotlin.String declared in <root>.testContinueDoWhile' type=kotlin.String origin=PLUSEQ
other: STRING_CONCATENATION type=kotlin.String
GET_VAR 'var k: kotlin.Int declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
CONST String type=kotlin.String value=";"
@@ -1,94 +0,0 @@
FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array<out kotlin.Number>) returnType:kotlin.Int
VALUE_PARAMETER name:args index:0 type:kotlin.Array<out kotlin.Number> varargElementType:kotlin.Number [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in <root>'
CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
SPREAD_ELEMENT
CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
size: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'args: kotlin.Array<out kotlin.Number> declared in <root>.nsum' type=kotlin.Array<out kotlin.Number> origin=null
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: kotlin.Int): kotlin.Int declared in <root>.nsum'
CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
$this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Number origin=GET_ARRAY_ELEMENT
$this: GET_VAR 'args: kotlin.Array<out kotlin.Number> declared in <root>.nsum' type=kotlin.Array<out kotlin.Number> origin=null
index: GET_VAR 'it: kotlin.Int declared in <root>.nsum.<anonymous>' type=kotlin.Int origin=null
FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.IntIterator [val]
CALL 'public final fun iterator (): kotlin.collections.IntIterator declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
$this: GET_VAR 'args: kotlin.IntArray declared in <root>.sum' type=kotlin.IntArray origin=null
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_0: kotlin.collections.IntIterator declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR FOR_LOOP_VARIABLE name:arg 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_0: kotlin.collections.IntIterator declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.sum' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.sum' type=kotlin.Int origin=null
other: GET_VAR 'val arg: kotlin.Int declared in <root>.sum' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>'
GET_VAR 'var result: kotlin.Int declared in <root>.sum' type=kotlin.Int origin=null
FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun useStringArray (fn: kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.Function1<kotlin.Array<out kotlin.String>, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:zap visibility:local modality:FINAL <> (p0:kotlin.Array<out kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Array<out kotlin.String>
BLOCK_BODY
CALL 'public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
b: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
SPREAD_ELEMENT
GET_VAR 'p0: kotlin.Array<out kotlin.String> declared in <root>.testArrayAndDefaults.zap' type=kotlin.Array<out kotlin.String> origin=null
FUNCTION_REFERENCE 'local final fun zap (p0: kotlin.Array<out kotlin.String>): kotlin.Unit declared in <root>.testArrayAndDefaults' type=kotlin.Function1<kotlin.Array<out kotlin.String>, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in <root>
FUN name:testArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun useArray (fn: kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: FUNCTION_REFERENCE 'public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Array<out kotlin.Number>, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun usePlainArgs (fn: kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int> origin=ADAPTED_FUNCTION_REFERENCE
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:sum visibility:local modality:FINAL <> (p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in <root>.testPlainArgs'
CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testPlainArgs.sum' type=kotlin.Int origin=null
GET_VAR 'p1: kotlin.Int declared in <root>.testPlainArgs.sum' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in <root>.testPlainArgs' type=kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>
FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1<kotlin.IntArray, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: FUNCTION_REFERENCE 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:useArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>
BLOCK_BODY
FUN name:usePlainArgs visibility:public modality:FINAL <> (fn:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>
BLOCK_BODY
FUN name:usePrimitiveArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.IntArray, kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.IntArray, kotlin.Int>
BLOCK_BODY
FUN name:useStringArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>
BLOCK_BODY
FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array<out kotlin.String>, k:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:kotlin.Array<out kotlin.String> varargElementType:kotlin.String [vararg]
VALUE_PARAMETER name:k index:1 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=42
BLOCK_BODY
@@ -1,62 +0,0 @@
fun nsum(vararg args: Number): Int {
return sum(args = [*IntArray(size = args.<get-size>(), init = local fun <anonymous>(it: Int): Int {
return args.get(index = it).toInt()
}
)])
}
fun sum(vararg args: Int): Int {
var result: Int = 0
{ // BLOCK
val tmp_0: IntIterator = args.iterator()
while (tmp_0.hasNext()) { // BLOCK
val arg: Int = tmp_0.next()
result = result.plus(other = arg)
}
}
return result
}
fun testArrayAndDefaults() {
useStringArray(fn = { // BLOCK
local fun zap(p0: Array<out String>) {
zap(b = [*p0])
}
::zap
})
}
fun testArrayAsVararg() {
useArray(fn = ::nsum)
}
fun testPlainArgs() {
usePlainArgs(fn = { // BLOCK
local fun sum(p0: Int, p1: Int): Int {
return sum(args = [p0, p1])
}
::sum
})
}
fun testPrimitiveArrayAsVararg() {
usePrimitiveArray(fn = ::sum)
}
fun useArray(fn: Function1<Array<Int>, Int>) {
}
fun usePlainArgs(fn: Function2<Int, Int, Int>) {
}
fun usePrimitiveArray(fn: Function1<IntArray, Int>) {
}
fun useStringArray(fn: Function1<Array<String>, Unit>) {
}
fun zap(vararg b: String, k: Int = 42) {
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun sum(vararg args: Int): Int {
var result = 0
for (arg in args)
@@ -66,7 +66,7 @@ FILE fqName:<root> fileName:/complexAugmentedAssignment.kt
BLOCK_BODY
CALL 'public final fun <set-s> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.B' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.B declared in <root>.Host.plusAssign' type=<root>.B origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-s> (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.B declared in <root>.Host.plusAssign' type=<root>.B origin=null
other: CALL 'public final fun <get-s> (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=GET_PROPERTY
@@ -249,6 +249,6 @@ FILE fqName:<root> fileName:/complexAugmentedAssignment.kt
BLOCK_BODY
CALL 'public final fun plusAssign (b: <root>.B): kotlin.Unit declared in <root>.Host' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR '<this>: <root>.Host declared in <root>.test3' type=<root>.Host origin=null
$receiver: GET_VAR 'v: <root>.B declared in <root>.test3' type=<root>.B origin=null
$receiver: GET_VAR 'v: <root>.B declared in <root>.test3' type=<root>.B origin=PLUSEQ
b: CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.Int) declared in <root>.B' type=<root>.B origin=null
s: CONST Int type=kotlin.Int value=1000
@@ -1,33 +0,0 @@
FILE fqName:<root> fileName:/field.kt
PROPERTY name:testSimple visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testSimple> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:testSimple visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testSimple> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN name:<set-testSimple> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:testSimple visibility:public modality:FINAL [var]
VALUE_PARAMETER name:value index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=EQ
value: GET_VAR 'value: kotlin.Int declared in <root>.<set-testSimple>' type=kotlin.Int origin=null
PROPERTY name:testAugmented visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testAugmented> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:testAugmented visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testAugmented> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
FUN name:<set-testAugmented> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:testAugmented visibility:public modality:FINAL [var]
VALUE_PARAMETER name:value index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=PLUSEQ
value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
other: GET_VAR 'value: kotlin.Int declared in <root>.<set-testAugmented>' type=kotlin.Int origin=null
@@ -1,13 +0,0 @@
var testSimple: Int
field = 0
get
set(value: Int) {
#testSimple = value
}
var testAugmented: Int
field = 0
get
set(value: Int) {
#testAugmented = #testAugmented.plus(other = value)
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
var testSimple: Int = 0
set(value) {
field = value
@@ -1,121 +0,0 @@
FILE fqName:<root> fileName:/ifWithAssignment.kt
FUN name:topLevelMethod visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:z type:kotlin.Int [var]
CONST Int type=kotlin.Int value=1
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=2
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=3
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=4
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=5
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=6
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=7
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=8
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=9
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=10
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=11
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=12
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value=13
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=14
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=15
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=16
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=17
@@ -1,63 +0,0 @@
fun topLevelMethod() {
var z: Int = 1
when {
true -> { // BLOCK
z = 2
}
else -> { // BLOCK
z = 3
}
}
when {
true -> z = 4
else -> z = 5
}
when {
true -> { // BLOCK
z = z.plus(other = 6)
}
else -> { // BLOCK
z = z.plus(other = 7)
}
}
when {
true -> z = z.plus(other = 8)
else -> z = z.plus(other = 9)
}
{ // BLOCK
val tmp_0: Int = z
when {
EQEQ(arg0 = tmp_0, arg1 = 1) -> { // BLOCK
z = 10
}
else -> { // BLOCK
z = 11
}
}
}
{ // BLOCK
val tmp_1: Int = z
when {
EQEQ(arg0 = tmp_1, arg1 = 1) -> z = 12
else -> z = 13
}
}
{ // BLOCK
val tmp_2: Int = z
when {
EQEQ(arg0 = tmp_2, arg1 = 1) -> { // BLOCK
z = z.plus(other = 14)
}
else -> { // BLOCK
z = z.plus(other = 15)
}
}
}
{ // BLOCK
val tmp_3: Int = z
when {
EQEQ(arg0 = tmp_3, arg1 = 1) -> z = z.plus(other = 16)
else -> z = z.plus(other = 17)
}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun topLevelMethod() {
var z = 1
if(true) { z = 2 } else { z = 3 }
@@ -1,355 +0,0 @@
FILE fqName:<root> fileName:/ifWithLoop.kt
FUN name:topLevelMethod visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:z type:kotlin.Int [var]
CONST Int type=kotlin.Int value=1
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_0 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=0
other: CONST Int type=kotlin.Int value=2
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_0: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_0: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_1 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=0
other: CONST Int type=kotlin.Int value=3
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_1: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_1: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_2 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=0
other: CONST Int type=kotlin.Int value=4
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_2: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_2: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_3 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=0
other: CONST Int type=kotlin.Int value=5
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_3: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_3: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=6
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=7
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=8
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=9
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=10
condition: CONST Boolean type=kotlin.Boolean value=false
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=11
condition: CONST Boolean type=kotlin.Boolean value=false
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=12
condition: CONST Boolean type=kotlin.Boolean value=false
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=13
condition: CONST Boolean type=kotlin.Boolean value=false
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_5 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=0
other: CONST Int type=kotlin.Int value=14
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_5: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_5: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_6 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=0
other: CONST Int type=kotlin.Int value=15
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_6: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_6: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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_7: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_8 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=0
other: CONST Int type=kotlin.Int value=16
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_8: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_8: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_9 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=0
other: CONST Int type=kotlin.Int value=17
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_9: kotlin.collections.IntIterator declared in <root>.topLevelMethod' 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_9: kotlin.collections.IntIterator declared in <root>.topLevelMethod' type=kotlin.collections.IntIterator origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: GET_VAR 'val i: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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_10: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: BLOCK type=kotlin.Unit origin=null
WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=18
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=19
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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_11: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=20
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value=false
body: SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=21
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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_12: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=22
condition: CONST Boolean type=kotlin.Boolean value=false
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=23
condition: CONST Boolean type=kotlin.Boolean value=false
BLOCK type=kotlin.Unit origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Int [val]
GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
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_13: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=1
then: BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=24
condition: CONST Boolean type=kotlin.Boolean value=false
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
SET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var z: kotlin.Int declared in <root>.topLevelMethod' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=25
condition: CONST Boolean type=kotlin.Boolean value=false
@@ -1,173 +0,0 @@
fun topLevelMethod() {
var z: Int = 1
when {
true -> { // BLOCK
{ // BLOCK
val tmp_0: IntIterator = 0.rangeTo(other = 2).iterator()
while (tmp_0.hasNext()) { // BLOCK
val i: Int = tmp_0.next()
z = z.plus(other = i)
}
}
}
else -> { // BLOCK
{ // BLOCK
val tmp_1: IntIterator = 0.rangeTo(other = 3).iterator()
while (tmp_1.hasNext()) { // BLOCK
val i: Int = tmp_1.next()
z = z.plus(other = i)
}
}
}
}
when {
true -> { // BLOCK
val tmp_2: IntIterator = 0.rangeTo(other = 4).iterator()
while (tmp_2.hasNext()) { // BLOCK
val i: Int = tmp_2.next()
z = z.plus(other = i)
}
}
else -> { // BLOCK
val tmp_3: IntIterator = 0.rangeTo(other = 5).iterator()
while (tmp_3.hasNext()) { // BLOCK
val i: Int = tmp_3.next()
z = z.plus(other = i)
}
}
}
when {
true -> { // BLOCK
while (false) z = z.plus(other = 6)
}
else -> { // BLOCK
while (false) z = z.plus(other = 7)
}
}
when {
true -> while (false) z = z.plus(other = 8)
else -> while (false) z = z.plus(other = 9)
}
when {
true -> { // BLOCK
{ // BLOCK
do// COMPOSITE {
z = z.plus(other = 10)
// } while (false)
}
}
else -> { // BLOCK
{ // BLOCK
do// COMPOSITE {
z = z.plus(other = 11)
// } while (false)
}
}
}
when {
true -> { // BLOCK
do// COMPOSITE {
z = z.plus(other = 12)
// } while (false)
}
else -> { // BLOCK
do// COMPOSITE {
z = z.plus(other = 13)
// } while (false)
}
}
{ // BLOCK
val tmp_4: Int = z
when {
EQEQ(arg0 = tmp_4, arg1 = 1) -> { // BLOCK
{ // BLOCK
val tmp_5: IntIterator = 0.rangeTo(other = 14).iterator()
while (tmp_5.hasNext()) { // BLOCK
val i: Int = tmp_5.next()
z = z.plus(other = i)
}
}
}
else -> { // BLOCK
{ // BLOCK
val tmp_6: IntIterator = 0.rangeTo(other = 15).iterator()
while (tmp_6.hasNext()) { // BLOCK
val i: Int = tmp_6.next()
z = z.plus(other = i)
}
}
}
}
}
{ // BLOCK
val tmp_7: Int = z
when {
EQEQ(arg0 = tmp_7, arg1 = 1) -> { // BLOCK
val tmp_8: IntIterator = 0.rangeTo(other = 16).iterator()
while (tmp_8.hasNext()) { // BLOCK
val i: Int = tmp_8.next()
z = z.plus(other = i)
}
}
else -> { // BLOCK
val tmp_9: IntIterator = 0.rangeTo(other = 17).iterator()
while (tmp_9.hasNext()) { // BLOCK
val i: Int = tmp_9.next()
z = z.plus(other = i)
}
}
}
}
{ // BLOCK
val tmp_10: Int = z
when {
EQEQ(arg0 = tmp_10, arg1 = 1) -> { // BLOCK
while (false) z = z.plus(other = 18)
}
else -> { // BLOCK
while (false) z = z.plus(other = 19)
}
}
}
{ // BLOCK
val tmp_11: Int = z
when {
EQEQ(arg0 = tmp_11, arg1 = 1) -> while (false) z = z.plus(other = 20)
else -> while (false) z = z.plus(other = 21)
}
}
{ // BLOCK
val tmp_12: Int = z
when {
EQEQ(arg0 = tmp_12, arg1 = 1) -> { // BLOCK
{ // BLOCK
do// COMPOSITE {
z = z.plus(other = 22)
// } while (false)
}
}
else -> { // BLOCK
{ // BLOCK
do// COMPOSITE {
z = z.plus(other = 23)
// } while (false)
}
}
}
}
{ // BLOCK
val tmp_13: Int = z
when {
EQEQ(arg0 = tmp_13, arg1 = 1) -> { // BLOCK
do// COMPOSITE {
z = z.plus(other = 24)
// } while (false)
}
else -> { // BLOCK
do// COMPOSITE {
z = z.plus(other = 25)
// } while (false)
}
}
}
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun topLevelMethod() {
var z = 1
@@ -26,7 +26,7 @@ FILE fqName:<root> fileName:/javaSyntheticGenericPropertyAccess.kt
GET_VAR 'j: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_2: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public open fun getFoo (): kotlin.Int declared in <root>.J' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_2: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
other: CONST Int type=kotlin.Int value=1
@@ -25,7 +25,7 @@ FILE fqName:<root> fileName:/javaSyntheticPropertyAccess.kt
GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_2: <root>.J declared in <root>.test' type=<root>.J origin=null
x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public open fun getFoo (): kotlin.Int declared in <root>.J' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_2: <root>.J declared in <root>.test' type=<root>.J origin=null
other: CONST Int type=kotlin.Int value=1
+1 -1
View File
@@ -83,7 +83,7 @@ FILE fqName:<root> fileName:/kt16904.kt
x: CONST Int type=kotlin.Int value=42
CALL 'public final fun <set-y> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Test1' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1' type=<root>.Test1 origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-y> (): kotlin.Int declared in <root>.Test1' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1' type=<root>.Test1 origin=null
other: CONST Int type=kotlin.Int value=42
+4 -4
View File
@@ -13,8 +13,8 @@ FILE fqName:<root> fileName:/kt27933.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: SET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null
$this: GET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.String origin=null
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ
$this: GET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.String origin=PLUSEQ
other: CONST String type=kotlin.String value="O"
WHEN type=kotlin.Unit origin=IF
BRANCH
@@ -22,8 +22,8 @@ FILE fqName:<root> fileName:/kt27933.kt
arg0: GET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.String origin=null
arg1: CONST String type=kotlin.String value="O"
then: SET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null
$this: GET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.String origin=null
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ
$this: GET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.String origin=PLUSEQ
other: CONST String type=kotlin.String value="K"
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
GET_VAR 'var r: kotlin.String declared in <root>.box' type=kotlin.String origin=null
+4 -4
View File
@@ -26,7 +26,7 @@ FILE fqName:<root> fileName:/kt30020.kt
BLOCK_BODY
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ
<T>: kotlin.Int
$receiver: GET_VAR '<this>: <root>.AML declared in <root>.AML' type=<root>.AML origin=null
$receiver: GET_VAR '<this>: <root>.AML declared in <root>.AML' type=<root>.AML origin=PLUSEQ
element: CONST Int type=kotlin.Int value=300
CONSTRUCTOR visibility:public <> () returnType:<root>.AML [primary]
BLOCK_BODY
@@ -150,7 +150,7 @@ FILE fqName:<root> fileName:/kt30020.kt
BLOCK_BODY
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ
<T>: kotlin.Int
$receiver: GET_VAR '<this>: <root>.AML declared in <root>.AML.testExplicitThis' type=<root>.AML origin=null
$receiver: GET_VAR '<this>: <root>.AML declared in <root>.AML.testExplicitThis' type=<root>.AML origin=PLUSEQ
element: CONST Int type=kotlin.Int value=200
PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val]
overridden:
@@ -192,7 +192,7 @@ FILE fqName:<root> fileName:/kt30020.kt
element: CONST Int type=kotlin.Int value=1
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ
<T>: kotlin.Int
$receiver: CALL 'public abstract fun f (): kotlin.collections.MutableList<kotlin.Any> declared in <root>.X' type=kotlin.collections.MutableList<kotlin.Any> origin=null
$receiver: CALL 'public abstract fun f (): kotlin.collections.MutableList<kotlin.Any> declared in <root>.X' type=kotlin.collections.MutableList<kotlin.Any> origin=PLUSEQ
$this: GET_VAR 'x: <root>.X declared in <root>.test' type=<root>.X origin=null
element: CONST Int type=kotlin.Int value=2
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ
@@ -248,5 +248,5 @@ FILE fqName:<root> fileName:/kt30020.kt
BLOCK_BODY
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ
<T>: kotlin.Int
$receiver: GET_VAR '<this>: kotlin.collections.MutableList<kotlin.Any> declared in <root>.testExtensionReceiver' type=kotlin.collections.MutableList<kotlin.Any> origin=null
$receiver: GET_VAR '<this>: kotlin.collections.MutableList<kotlin.Any> declared in <root>.testExtensionReceiver' type=kotlin.collections.MutableList<kotlin.Any> origin=PLUSEQ
element: CONST Int type=kotlin.Int value=100
+1 -1
View File
@@ -133,7 +133,7 @@ FILE fqName:<root> fileName:/kt49203.kt
BLOCK_BODY
CALL 'public final fun <set-value> (<set-?>: kotlin.String): kotlin.Unit declared in <root>.X' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.X declared in <root>.X.plusAssign' type=<root>.X origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ
$this: CALL 'public final fun <get-value> (): kotlin.String declared in <root>.X' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.X declared in <root>.X.plusAssign' type=<root>.X origin=null
other: GET_VAR 'data: kotlin.String declared in <root>.X.plusAssign' type=kotlin.String origin=null
@@ -18,7 +18,7 @@ FILE fqName:<root> fileName:/lambdaInCAO.kt
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
CALL 'public final fun plusAssign (lambda: kotlin.Function0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'a: kotlin.Any declared in <root>.test1' type=kotlin.Any origin=null
$receiver: GET_VAR 'a: kotlin.Any declared in <root>.test1' type=kotlin.Any origin=PLUSEQ
lambda: FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
@@ -33,8 +33,8 @@ FILE fqName:<root> fileName:/genericSamProjectedOut.kt
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in <root>.test'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
SET_VAR 'var a: example.SomeJavaClass<out kotlin.String> declared in <root>.test' type=kotlin.Unit origin=EQ
CALL 'public open fun plus (hello: @[FlexibleNullability] example.Hello<@[FlexibleNullability] A of example.SomeJavaClass?>?): @[FlexibleNullability] example.SomeJavaClass<@[FlexibleNullability] A of example.SomeJavaClass?>? declared in example.SomeJavaClass' type=@[FlexibleNullability] example.SomeJavaClass<out @[FlexibleNullability] kotlin.String?>? origin=null
$this: GET_VAR 'var a: example.SomeJavaClass<out kotlin.String> declared in <root>.test' type=example.SomeJavaClass<out kotlin.String> origin=null
CALL 'public open fun plus (hello: @[FlexibleNullability] example.Hello<@[FlexibleNullability] A of example.SomeJavaClass?>?): @[FlexibleNullability] example.SomeJavaClass<@[FlexibleNullability] A of example.SomeJavaClass?>? declared in example.SomeJavaClass' type=@[FlexibleNullability] example.SomeJavaClass<out @[FlexibleNullability] kotlin.String?>? origin=PLUSEQ
$this: GET_VAR 'var a: example.SomeJavaClass<out kotlin.String> declared in <root>.test' type=example.SomeJavaClass<out kotlin.String> origin=PLUSEQ
hello: TYPE_OP type=example.Hello<out @[FlexibleNullability] kotlin.String?> origin=SAM_CONVERSION typeOperand=example.Hello<out @[FlexibleNullability] kotlin.String?>
FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.Nothing?, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Unit
@@ -35,10 +35,10 @@ FILE fqName:<root> fileName:/samOperators.kt
$receiver: VALUE_PARAMETER name:<this> type:<root>.J
BLOCK_BODY
CALL 'public open fun plusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR '<this>: <root>.J declared in <root>.test3' type=<root>.J origin=null
$this: GET_VAR '<this>: <root>.J declared in <root>.test3' type=<root>.J origin=PLUSEQ
i: TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=java.lang.Runnable
FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
CALL 'public open fun minusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=MINUSEQ
$this: GET_VAR '<this>: <root>.J declared in <root>.test3' type=<root>.J origin=null
$this: GET_VAR '<this>: <root>.J declared in <root>.test3' type=<root>.J origin=MINUSEQ
i: TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=java.lang.Runnable
FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>