[FIR] Capture array and indices for postfix/prefix increment/decrement
of array element (including overloaded indexed access operators, e.g., `a[b, c]++`). This prevents double-evaluation of the array and indices expressions, which may have side-effects.
This commit is contained in:
committed by
teamcityserver
parent
eb631bc429
commit
a2a4d94834
@@ -0,0 +1,51 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// Currently fails because prefix increment only calls getter once.
|
||||
var log = ""
|
||||
|
||||
fun <T> logged(value: T): T =
|
||||
value.also { log += "$value;" }
|
||||
|
||||
fun doTest(id: String, expected: Int, expectedLog: String, test: () -> Int) {
|
||||
log = ""
|
||||
val actual = test()
|
||||
if (actual != expected) throw AssertionError("$id expected: $expected, actual: $actual")
|
||||
if (log != expectedLog) throw AssertionError("$id expectedLog: $expectedLog, actual: $log")
|
||||
}
|
||||
|
||||
object A {
|
||||
var x = 0
|
||||
get() = field.also { log += "get-A.x;" }
|
||||
set(value: Int) {
|
||||
log += "set-A.x;"
|
||||
field = value
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun getA() = A.also { log += "getA();" }
|
||||
|
||||
object B {
|
||||
var x = 0
|
||||
|
||||
operator fun get(i1: Int, i2: Int, i3: Int): Int = x.also { log += "get-B($i1, $i2, $i3);" }
|
||||
|
||||
operator fun set(i1: Int, i2: Int, i3: Int, value: Int) {
|
||||
log += "set-B($i1, $i2, $i3, $value);"
|
||||
x = value
|
||||
}
|
||||
}
|
||||
|
||||
fun getB() = B.also { log += "getB();" }
|
||||
|
||||
fun box(): String {
|
||||
// NOTE: Getter is currently called twice for prefix increment; 1st for initial value, 2nd for return value. See KT-42077.
|
||||
doTest("++getA().x", 1, "getA();get-A.x;set-A.x;get-A.x;") { ++getA().x }
|
||||
doTest("getA().x--", 1, "getA();get-A.x;set-A.x;") { getA().x-- }
|
||||
|
||||
doTest("++getB()[1, 2, 3]", 1, "getB();1;2;3;get-B(1, 2, 3);set-B(1, 2, 3, 1);get-B(1, 2, 3);") {
|
||||
++getB()[logged(1), logged(2), logged(3)]
|
||||
}
|
||||
doTest("getB()[1, 2, 3].x--", 1, "getB();1;2;3;get-B(1, 2, 3);set-B(1, 2, 3, 0);") { getB()[logged(1), logged(2), logged(3)]-- }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// Currently fails as the indices (`va`) are evaluated twice (on get and set).
|
||||
var log = ""
|
||||
|
||||
fun logged(value: String) =
|
||||
|
||||
+4
-4
@@ -18,8 +18,8 @@ object MismatchingTypes {
|
||||
}
|
||||
|
||||
fun testMismatchingTypes() {
|
||||
<!INAPPLICABLE_CANDIDATE!>++MismatchingTypes[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingTypes[0]++<!>
|
||||
++<!INAPPLICABLE_CANDIDATE!>MismatchingTypes[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingTypes[0]<!>++
|
||||
MismatchingTypes[0] += 1
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ object MismatchingArities2 {
|
||||
}
|
||||
|
||||
fun testMismatchingArities() {
|
||||
<!INAPPLICABLE_CANDIDATE!>++MismatchingArities1[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingArities1[0]++<!>
|
||||
++<!INAPPLICABLE_CANDIDATE!>MismatchingArities1[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingArities1[0]<!>++
|
||||
MismatchingArities1[0] += 1
|
||||
|
||||
++<!INAPPLICABLE_CANDIDATE!>MismatchingArities2[0]<!>
|
||||
|
||||
+13
-10
@@ -77,16 +77,19 @@ FILE fqName:<root> fileName:/arrayAugmentedAssignment1.kt
|
||||
FUN name:testMember visibility:public modality:FINAL <> (c:<root>.C) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:c index:0 type:<root>.C
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun <get-x> (): kotlin.IntArray declared in <root>.C' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
$this: GET_VAR 'c: <root>.C declared in <root>.testMember' type=<root>.C origin=null
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-x> (): kotlin.IntArray declared in <root>.C' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.IntArray [val]
|
||||
CALL 'public final fun <get-x> (): kotlin.IntArray declared in <root>.C' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
$this: GET_VAR 'c: <root>.C declared in <root>.testMember' type=<root>.C origin=null
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testMember' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testMember' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
|
||||
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
|
||||
|
||||
+31
-33
@@ -118,64 +118,62 @@ FILE fqName:<root> fileName:/complexAugmentedAssignment.kt
|
||||
BLOCK_BODY
|
||||
VAR name:i type:kotlin.Int [var]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'a: kotlin.IntArray declared in <root>.test1' type=kotlin.IntArray origin=null
|
||||
index: BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
|
||||
GET_VAR 'var i: kotlin.Int [var] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
SET_VAR 'var i: kotlin.Int [var] declared in <root>.test1' type=kotlin.Unit origin=EQ
|
||||
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'a: kotlin.IntArray declared in <root>.test1' type=kotlin.IntArray origin=null
|
||||
index: BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.IntArray [val]
|
||||
GET_VAR 'a: kotlin.IntArray declared in <root>.test1' type=kotlin.IntArray origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
GET_VAR 'var i: kotlin.Int [var] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
SET_VAR 'var i: kotlin.Int [var] declared in <root>.test1' type=kotlin.Unit origin=EQ
|
||||
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.IntArray [val] declared in <root>.test1' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.IntArray [val] declared in <root>.test1' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.X1 [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:<root>.X1 [val]
|
||||
GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
|
||||
CALL 'public final fun <get-x1> (): kotlin.Int declared in <root>.X1' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val tmp_3: <root>.X1 [val] declared in <root>.test2' type=<root>.X1 origin=null
|
||||
$this: GET_VAR 'val tmp_4: <root>.X1 [val] declared in <root>.test2' type=<root>.X1 origin=null
|
||||
CALL 'public final fun <set-x1> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.X1' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'val tmp_3: <root>.X1 [val] declared in <root>.test2' type=<root>.X1 origin=null
|
||||
$this: GET_VAR 'val tmp_4: <root>.X1 [val] declared in <root>.test2' type=<root>.X1 origin=null
|
||||
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:<root>.X1.X2 [val]
|
||||
GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:<root>.X1.X2 [val]
|
||||
GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1.X2
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val]
|
||||
CALL 'public final fun <get-x2> (): kotlin.Int declared in <root>.X1.X2' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val tmp_5: <root>.X1.X2 [val] declared in <root>.test2' type=<root>.X1.X2 origin=null
|
||||
$this: GET_VAR 'val tmp_6: <root>.X1.X2 [val] declared in <root>.test2' type=<root>.X1.X2 origin=null
|
||||
CALL 'public final fun <set-x2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.X1.X2' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'val tmp_5: <root>.X1.X2 [val] declared in <root>.test2' type=<root>.X1.X2 origin=null
|
||||
$this: GET_VAR 'val tmp_6: <root>.X1.X2 [val] declared in <root>.test2' type=<root>.X1.X2 origin=null
|
||||
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:<root>.X1.X2.X3 [val]
|
||||
GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:<root>.X1.X2.X3 [val]
|
||||
GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1.X2.X3
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Int [val]
|
||||
CALL 'public final fun <get-x3> (): kotlin.Int declared in <root>.X1.X2.X3' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val tmp_7: <root>.X1.X2.X3 [val] declared in <root>.test2' type=<root>.X1.X2.X3 origin=null
|
||||
$this: GET_VAR 'val tmp_8: <root>.X1.X2.X3 [val] declared in <root>.test2' type=<root>.X1.X2.X3 origin=null
|
||||
CALL 'public final fun <set-x3> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.X1.X2.X3' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'val tmp_7: <root>.X1.X2.X3 [val] declared in <root>.test2' type=<root>.X1.X2.X3 origin=null
|
||||
$this: GET_VAR 'val tmp_8: <root>.X1.X2.X3 [val] declared in <root>.test2' type=<root>.X1.X2.X3 origin=null
|
||||
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
CLASS CLASS name:B modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
|
||||
CONSTRUCTOR visibility:public <> (s:kotlin.Int) returnType:<root>.B [primary]
|
||||
|
||||
@@ -97,51 +97,67 @@ FILE fqName:<root> fileName:/incrementDecrement.kt
|
||||
BLOCK_BODY
|
||||
VAR name:a1 type:kotlin.Int [val]
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.IntArray [val]
|
||||
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
|
||||
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
$this: GET_VAR 'val tmp_3: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
value: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_3: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
value: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
VAR name:a2 type:kotlin.Int [val]
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.IntArray [val]
|
||||
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val]
|
||||
CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
value: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
value: GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
|
||||
FUN name:testArrayPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR name:a1 type:kotlin.Int [val]
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.IntArray [val]
|
||||
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
$this: GET_VAR 'val tmp_9: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
$this: GET_VAR 'val tmp_9: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_11: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_11: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
VAR name:a2 type:kotlin.Int [val]
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.IntArray [val]
|
||||
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
$this: GET_VAR 'val tmp_12: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
$this: GET_VAR 'val tmp_12: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
|
||||
index: GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_14: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_14: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
|
||||
|
||||
+24
-18
@@ -43,37 +43,43 @@ FILE fqName:<root> fileName:/kt28456.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testPostfixIncrement (a: <root>.A): kotlin.Int declared in <root>'
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.A [val]
|
||||
GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=1
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=2
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (vararg xs: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
CONST Int type=kotlin.Int value=1
|
||||
CONST Int type=kotlin.Int value=2
|
||||
GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=null
|
||||
$receiver: GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
i: CONST Int type=kotlin.Int value=1
|
||||
j: CONST Int type=kotlin.Int value=2
|
||||
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
j: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
v: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
FUN name:testCompoundAssignment visibility:public modality:FINAL <> (a:<root>.A) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:a index:0 type:<root>.A
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.A [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:<root>.A [val]
|
||||
GET_VAR 'a: <root>.A declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=1
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=2
|
||||
CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=null
|
||||
$receiver: GET_VAR 'val tmp_1: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
j: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'val tmp_4: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
j: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
v: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun get (vararg xs: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'val tmp_1: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
$receiver: GET_VAR 'val tmp_4: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value=10
|
||||
|
||||
+17
-13
@@ -56,29 +56,33 @@ FILE fqName:<root> fileName:/kt28456b.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testPostfixIncrement (a: <root>.A): kotlin.Int declared in <root>'
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.A [val]
|
||||
GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=1
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (i: kotlin.Int, a: kotlin.Int, b: kotlin.Int, c: kotlin.Int, d: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
i: CONST Int type=kotlin.Int value=1
|
||||
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=null
|
||||
$receiver: GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
i: CONST Int type=kotlin.Int value=1
|
||||
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.testPostfixIncrement' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
v: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPostfixIncrement' type=kotlin.Int origin=null
|
||||
FUN name:testCompoundAssignment visibility:public modality:FINAL <> (a:<root>.A) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:a index:0 type:<root>.A
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.A [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.A [val]
|
||||
GET_VAR 'a: <root>.A declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=null
|
||||
$receiver: GET_VAR 'val tmp_1: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'val tmp_3: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
v: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun get (i: kotlin.Int, a: kotlin.Int, b: kotlin.Int, c: kotlin.Int, d: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'val tmp_1: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'val tmp_3: <root>.A [val] declared in <root>.testCompoundAssignment' type=<root>.A origin=null
|
||||
i: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testCompoundAssignment' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value=10
|
||||
|
||||
+11
-7
@@ -58,16 +58,20 @@ FILE fqName:<root> fileName:/kt36956.kt
|
||||
FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Float origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Float [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.A<kotlin.Float> [val]
|
||||
CALL 'public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>' type=<root>.A<kotlin.Float> origin=GET_PROPERTY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=1
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Float [val]
|
||||
CALL 'public final fun get (i: kotlin.Int): T of <root>.A [operator] declared in <root>.A' type=kotlin.Float origin=null
|
||||
$this: CALL 'public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>' type=<root>.A<kotlin.Float> origin=GET_PROPERTY
|
||||
i: CONST Int type=kotlin.Int value=1
|
||||
$this: GET_VAR 'val tmp_0: <root>.A<kotlin.Float> [val] declared in <root>.aInt' type=<root>.A<kotlin.Float> origin=null
|
||||
i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.aInt' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (i: kotlin.Int, v: T of <root>.A): kotlin.Unit [operator] declared in <root>.A' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>' type=<root>.A<kotlin.Float> origin=GET_PROPERTY
|
||||
i: CONST Int type=kotlin.Int value=1
|
||||
$this: GET_VAR 'val tmp_0: <root>.A<kotlin.Float> [val] declared in <root>.aInt' type=<root>.A<kotlin.Float> origin=null
|
||||
i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.aInt' type=kotlin.Int origin=null
|
||||
v: CALL 'public final fun dec (): kotlin.Float [operator] declared in kotlin.Float' type=kotlin.Float origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
GET_VAR 'val tmp_0: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
$this: GET_VAR 'val tmp_2: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
GET_VAR 'val tmp_2: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-aInt> visibility:public modality:FINAL <> () returnType:kotlin.Float
|
||||
correspondingProperty: PROPERTY name:aInt visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
|
||||
+13
-13
@@ -31,22 +31,22 @@ FILE fqName:<root> fileName:/lambdaInCAO.kt
|
||||
FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Any
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Function0<kotlin.Unit>): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'a: kotlin.Any declared in <root>.test3' type=kotlin.Any origin=null
|
||||
index: 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
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.test3'
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
CALL 'public final fun set (index: kotlin.Function0<kotlin.Unit>, value: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=null
|
||||
$receiver: GET_VAR 'a: kotlin.Any declared in <root>.test3' type=kotlin.Any origin=null
|
||||
index: FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any [val]
|
||||
GET_VAR 'a: kotlin.Any declared in <root>.test3' type=kotlin.Any origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Function0<kotlin.Unit> [val]
|
||||
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
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.test3'
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Function0<kotlin.Unit>): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'val tmp_0: kotlin.Any [val] declared in <root>.test3' type=kotlin.Any origin=null
|
||||
index: GET_VAR 'val tmp_1: kotlin.Function0<kotlin.Unit> [val] declared in <root>.test3' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
CALL 'public final fun set (index: kotlin.Function0<kotlin.Unit>, value: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=null
|
||||
$receiver: GET_VAR 'val tmp_0: kotlin.Any [val] declared in <root>.test3' type=kotlin.Any origin=null
|
||||
index: GET_VAR 'val tmp_1: kotlin.Function0<kotlin.Unit> [val] declared in <root>.test3' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test3' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.test3' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test3' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.test3' type=kotlin.Int origin=null
|
||||
|
||||
+16
-24
@@ -96,38 +96,30 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt
|
||||
FUN name:testArrayAccess visibility:public modality:FINAL <> (nc:test.C?) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:nc index:0 type:test.C?
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in test' type=kotlin.Int origin=null
|
||||
$receiver: BLOCK type=kotlin.Int? origin=SAFE_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:test.C? [val]
|
||||
GET_VAR 'nc: test.C? declared in test.testArrayAccess' type=test.C? origin=null
|
||||
WHEN type=kotlin.Int? 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_5: test.C? [val] declared in test.testArrayAccess' type=test.C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONST Null type=kotlin.Nothing? value=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CALL 'public final fun <get-p> (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY
|
||||
$receiver: GET_VAR 'val tmp_5: test.C? [val] declared in test.testArrayAccess' type=test.C? origin=null
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in test' type=kotlin.Unit origin=null
|
||||
$receiver: BLOCK type=kotlin.Int? origin=SAFE_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:test.C? [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int? [val]
|
||||
BLOCK type=kotlin.Int? origin=SAFE_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:test.C? [val]
|
||||
GET_VAR 'nc: test.C? declared in test.testArrayAccess' type=test.C? origin=null
|
||||
WHEN type=kotlin.Int? 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_6: test.C? [val] declared in test.testArrayAccess' type=test.C? origin=null
|
||||
arg0: GET_VAR 'val tmp_5: test.C? [val] declared in test.testArrayAccess' type=test.C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONST Null type=kotlin.Nothing? value=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CALL 'public final fun <get-p> (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY
|
||||
$receiver: GET_VAR 'val tmp_6: test.C? [val] declared in test.testArrayAccess' type=test.C? origin=null
|
||||
index: CONST Int type=kotlin.Int value=0
|
||||
$receiver: GET_VAR 'val tmp_5: test.C? [val] declared in test.testArrayAccess' type=test.C? origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val]
|
||||
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in test' type=kotlin.Int origin=null
|
||||
$receiver: GET_VAR 'val tmp_4: kotlin.Int? [val] declared in test.testArrayAccess' type=kotlin.Int? origin=null
|
||||
index: GET_VAR 'val tmp_6: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in test' type=kotlin.Unit origin=null
|
||||
$receiver: GET_VAR 'val tmp_4: kotlin.Int? [val] declared in test.testArrayAccess' type=kotlin.Int? origin=null
|
||||
index: GET_VAR 'val tmp_6: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
|
||||
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_7: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
GET_VAR 'val tmp_4: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
|
||||
GET_VAR 'val tmp_7: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
|
||||
|
||||
Reference in New Issue
Block a user