Introduce IrGetValue as a replacement for IrThisReference / IrGetExtensionReceiver / IrGetVariable.

This commit is contained in:
Dmitry Petrov
2016-09-30 17:45:41 +03:00
parent 8efe326904
commit a51efaacc9
82 changed files with 409 additions and 457 deletions
@@ -12,7 +12,7 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Base' type=Base
receiver: GET_VAR '<receiver: Base>' type=Base origin=null
PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY
@@ -21,7 +21,7 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Base' type=Base
receiver: GET_VAR '<receiver: Base>' type=Base origin=null
CLASS CLASS Test1
CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int)
BLOCK_BODY
+7 -7
View File
@@ -14,7 +14,7 @@ FILE /classMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C
receiver: GET_VAR '<receiver: C>' type=C origin=null
PROPERTY public final var z: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var z: kotlin.Int
EXPRESSION_BODY
@@ -23,11 +23,11 @@ FILE /classMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Int'
GET_FIELD 'z: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C
receiver: GET_VAR '<receiver: C>' type=C origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-z>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'z: Int' type=kotlin.Unit origin=null
receiver: THIS of 'C' type=C
receiver: GET_VAR '<receiver: C>' type=C origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CONSTRUCTOR public constructor C()
BLOCK_BODY
@@ -43,7 +43,7 @@ FILE /classMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-property>(): Int'
GET_FIELD 'property: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C
receiver: GET_VAR '<receiver: C>' type=C origin=null
PROPERTY public final val propertyWithGet: kotlin.Int
FUN public final fun <get-propertyWithGet>(): kotlin.Int
BLOCK_BODY
@@ -54,11 +54,11 @@ FILE /classMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-propertyWithGetAndSet>(): Int'
CALL '<get-z>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'C' type=C
$this: GET_VAR '<receiver: C>' type=C origin=null
FUN public final fun <set-propertyWithGetAndSet>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY
CALL '<set-z>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'C' type=C
$this: GET_VAR '<receiver: C>' type=C origin=null
<set-?>: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
FUN public final fun function(): kotlin.Unit
BLOCK_BODY
@@ -87,7 +87,7 @@ FILE /classMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='bar(): Unit'
CALL 'foo(): Unit' type=kotlin.Unit origin=null
$this: THIS of 'NestedInterface' type=C.NestedInterface
$this: GET_VAR '<receiver: NestedInterface>' type=C.NestedInterface origin=null
CLASS OBJECT companion object of C
CONSTRUCTOR private constructor Companion()
BLOCK_BODY
+16 -16
View File
@@ -12,7 +12,7 @@ FILE /dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
PROPERTY public final val y: kotlin.String
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String
EXPRESSION_BODY
@@ -21,7 +21,7 @@ FILE /dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): String'
GET_FIELD 'y: String' type=kotlin.String origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
PROPERTY public final val z: kotlin.Any
FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Any
EXPRESSION_BODY
@@ -30,22 +30,22 @@ FILE /dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Any'
GET_FIELD 'z: Any' type=kotlin.Any origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='component1(): Int'
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='component2(): String'
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='component3(): Any'
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='copy(Int = ..., String = ..., Any = ...): Test1'
@@ -60,15 +60,15 @@ FILE /dataClasses.kt
CONST String type=kotlin.String value='Test1('
CONST String type=kotlin.String value='x='
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='y='
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='z='
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
CONST String type=kotlin.String value=')'
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
BLOCK_BODY
@@ -77,7 +77,7 @@ FILE /dataClasses.kt
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int origin=null
@@ -85,7 +85,7 @@ FILE /dataClasses.kt
other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int origin=null
@@ -93,7 +93,7 @@ FILE /dataClasses.kt
other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
@@ -101,7 +101,7 @@ FILE /dataClasses.kt
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
arg0: THIS of 'Test1' type=Test1
arg0: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='true'
@@ -119,7 +119,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -129,7 +129,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -139,7 +139,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg1: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -22,34 +22,34 @@ FILE /delegatedImplementation.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): String'
GET_FIELD 'x: String' type=kotlin.String origin=null
receiver: THIS of 'IOther' type=IOther
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
PROPERTY public abstract var y: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-y>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'IOther' type=IOther
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'y: Int' type=kotlin.Unit origin=null
receiver: THIS of 'IOther' type=IOther
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public abstract val kotlin.Byte.z1: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<get-z1>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
GET_FIELD 'z1: Int on Byte' type=kotlin.Int origin=null
receiver: THIS of 'IOther' type=IOther
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
PROPERTY public abstract var kotlin.Byte.z2: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<get-z2>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
GET_FIELD 'z2: Int on Byte' type=kotlin.Int origin=null
receiver: THIS of 'IOther' type=IOther
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'z2: Int on Byte' type=kotlin.Unit origin=null
receiver: THIS of 'IOther' type=IOther
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
FUN public fun otherImpl(x0: kotlin.String, y0: kotlin.Int): IOther
BLOCK_BODY
@@ -68,7 +68,7 @@ FILE /delegatedImplementation.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): String'
GET_FIELD 'x: String' type=kotlin.String origin=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
receiver: GET_VAR '<receiver: <no name provided>>' type=otherImpl.<no name provided> origin=null
PROPERTY public open override var y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public open override var y: kotlin.Int
EXPRESSION_BODY
@@ -77,11 +77,11 @@ FILE /delegatedImplementation.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
receiver: GET_VAR '<receiver: <no name provided>>' type=otherImpl.<no name provided> origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'y: Int' type=kotlin.Unit origin=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
receiver: GET_VAR '<receiver: <no name provided>>' type=otherImpl.<no name provided> origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public open override val kotlin.Byte.z1: kotlin.Int
FUN public open override fun kotlin.Byte.<get-z1>(): kotlin.Int
@@ -119,7 +119,7 @@ FILE /delegatedImplementation.kt
BLOCK_BODY
CALL 'qux() on String: Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
$receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String
$receiver: GET_VAR '<receiver: qux() on String: Unit>' type=kotlin.String origin=null
CLASS CLASS Test2
CONSTRUCTOR public constructor Test2()
BLOCK_BODY
@@ -143,7 +143,7 @@ FILE /delegatedImplementation.kt
BLOCK_BODY
CALL 'qux() on String: Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
$receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String
$receiver: GET_VAR '<receiver: qux() on String: Unit>' type=kotlin.String origin=null
FIELD DELEGATE val `Test2$IOther$delegate`: IOther
EXPRESSION_BODY
CALL 'otherImpl(String, Int): IOther' type=IOther origin=null
@@ -155,7 +155,7 @@ FILE /delegatedImplementation.kt
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
CALL '<get-z1>() on Byte: Int' type=kotlin.Int origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
$receiver: $RECEIVER of 'z1: Int on Byte' type=kotlin.Byte
$receiver: GET_VAR '<receiver: z1: Int on Byte>' type=kotlin.Byte origin=null
PROPERTY DELEGATED_MEMBER public open override val x: kotlin.String
FUN DELEGATED_MEMBER public open override fun <get-x>(): kotlin.String
BLOCK_BODY
@@ -168,12 +168,12 @@ FILE /delegatedImplementation.kt
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
CALL '<get-z2>() on Byte: Int' type=kotlin.Int origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
$receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte
$receiver: GET_VAR '<receiver: z2: Int on Byte>' type=kotlin.Byte origin=null
FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
CALL '<set-z2>(Int) on Byte: Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
$receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte
$receiver: GET_VAR '<receiver: z2: Int on Byte>' type=kotlin.Byte origin=null
<set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY DELEGATED_MEMBER public open override var y: kotlin.Int
FUN DELEGATED_MEMBER public open override fun <get-y>(): kotlin.Int
+5 -5
View File
@@ -25,7 +25,7 @@ FILE /enum.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestEnum2' type=TestEnum2
receiver: GET_VAR '<receiver: TestEnum2>' type=TestEnum2 origin=null
ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)'
x: CONST Int type=kotlin.Int value='1'
@@ -73,7 +73,7 @@ FILE /enum.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestEnum4' type=TestEnum4
receiver: GET_VAR '<receiver: TestEnum4>' type=TestEnum4 origin=null
ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TEST1()'
class: CLASS ENUM_ENTRY TEST1
@@ -100,13 +100,13 @@ FILE /enum.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Int'
GET_FIELD 'z: Int' type=kotlin.Int origin=null
receiver: THIS of 'TEST2' type=TestEnum4.TEST2
receiver: GET_VAR '<receiver: TEST2>' type=TestEnum4.TEST2 origin=null
ANONYMOUS_INITIALIZER TEST2
BLOCK_BODY
SET_FIELD 'z: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TEST2' type=TestEnum4.TEST2
receiver: GET_VAR '<receiver: TEST2>' type=TestEnum4.TEST2 origin=null
value: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'TEST2' type=TestEnum4.TEST2
$this: GET_VAR '<receiver: TEST2>' type=TestEnum4.TEST2 origin=null
FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
@@ -12,7 +12,7 @@ FILE /enumWithSecondaryCtor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test0' type=Test0
receiver: GET_VAR '<receiver: Test0>' type=Test0 origin=null
ENUM_ENTRY enum entry ZERO
init: ENUM_CONSTRUCTOR_CALL 'constructor Test0()'
CONSTRUCTOR private constructor Test0()
@@ -36,7 +36,7 @@ FILE /enumWithSecondaryCtor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
ENUM_ENTRY enum entry ZERO
init: ENUM_CONSTRUCTOR_CALL 'constructor Test1()'
ENUM_ENTRY enum entry ONE
@@ -63,7 +63,7 @@ FILE /enumWithSecondaryCtor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test2' type=Test2
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
ENUM_ENTRY enum entry ZERO
init: ENUM_CONSTRUCTOR_CALL 'constructor ZERO()'
class: CLASS ENUM_ENTRY ZERO
+1 -1
View File
@@ -20,7 +20,7 @@ FILE /initBlock.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test2' type=Test2
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
ANONYMOUS_INITIALIZER Test2
BLOCK_BODY
CALL 'println(): Unit' type=kotlin.Unit origin=null
+4 -4
View File
@@ -12,7 +12,7 @@ FILE /initVal.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitValFromParameter' type=TestInitValFromParameter
receiver: GET_VAR '<receiver: TestInitValFromParameter>' type=TestInitValFromParameter origin=null
CLASS CLASS TestInitValInClass
CONSTRUCTOR public constructor TestInitValInClass()
BLOCK_BODY
@@ -26,7 +26,7 @@ FILE /initVal.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitValInClass' type=TestInitValInClass
receiver: GET_VAR '<receiver: TestInitValInClass>' type=TestInitValInClass origin=null
CLASS CLASS TestInitValInInitBlock
CONSTRUCTOR public constructor TestInitValInInitBlock()
BLOCK_BODY
@@ -38,9 +38,9 @@ FILE /initVal.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock
receiver: GET_VAR '<receiver: TestInitValInInitBlock>' type=TestInitValInInitBlock origin=null
ANONYMOUS_INITIALIZER TestInitValInInitBlock
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock
receiver: GET_VAR '<receiver: TestInitValInInitBlock>' type=TestInitValInInitBlock origin=null
value: CONST Int type=kotlin.Int value='0'
+12 -12
View File
@@ -12,11 +12,11 @@ FILE /initVar.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter
receiver: GET_VAR '<receiver: TestInitVarFromParameter>' type=TestInitVarFromParameter origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter
receiver: GET_VAR '<receiver: TestInitVarFromParameter>' type=TestInitVarFromParameter origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CLASS CLASS TestInitVarInClass
CONSTRUCTOR public constructor TestInitVarInClass()
@@ -31,11 +31,11 @@ FILE /initVar.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass
receiver: GET_VAR '<receiver: TestInitVarInClass>' type=TestInitVarInClass origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass
receiver: GET_VAR '<receiver: TestInitVarInClass>' type=TestInitVarInClass origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CLASS CLASS TestInitVarInInitBlock
CONSTRUCTOR public constructor TestInitVarInInitBlock()
@@ -48,16 +48,16 @@ FILE /initVar.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
receiver: GET_VAR '<receiver: TestInitVarInInitBlock>' type=TestInitVarInInitBlock origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
receiver: GET_VAR '<receiver: TestInitVarInInitBlock>' type=TestInitVarInInitBlock origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
ANONYMOUS_INITIALIZER TestInitVarInInitBlock
BLOCK_BODY
CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
$this: GET_VAR '<receiver: TestInitVarInInitBlock>' type=TestInitVarInInitBlock origin=null
<set-?>: CONST Int type=kotlin.Int value='0'
CLASS CLASS TestInitVarWithCustomSetter
CONSTRUCTOR public constructor TestInitVarWithCustomSetter()
@@ -72,7 +72,7 @@ FILE /initVar.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarWithCustomSetter' type=TestInitVarWithCustomSetter
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetter>' type=TestInitVarWithCustomSetter origin=null
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=EQ
@@ -84,7 +84,7 @@ FILE /initVar.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetterWithExplicitCtor>' type=TestInitVarWithCustomSetterWithExplicitCtor origin=null
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=EQ
@@ -92,7 +92,7 @@ FILE /initVar.kt
ANONYMOUS_INITIALIZER TestInitVarWithCustomSetterWithExplicitCtor
BLOCK_BODY
CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor
$this: GET_VAR '<receiver: TestInitVarWithCustomSetterWithExplicitCtor>' type=TestInitVarWithCustomSetterWithExplicitCtor origin=null
value: CONST Int type=kotlin.Int value='0'
CONSTRUCTOR public constructor TestInitVarWithCustomSetterWithExplicitCtor()
BLOCK_BODY
@@ -105,7 +105,7 @@ FILE /initVar.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetterInCtor>' type=TestInitVarWithCustomSetterInCtor origin=null
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=EQ
@@ -115,5 +115,5 @@ FILE /initVar.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterInCtor'
CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor
$this: GET_VAR '<receiver: TestInitVarWithCustomSetterInCtor>' type=TestInitVarWithCustomSetterInCtor origin=null
value: CONST Int type=kotlin.Int value='42'
+1 -1
View File
@@ -13,5 +13,5 @@ FILE /innerClass.kt
CONSTRUCTOR public constructor DerivedInnerClass()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor TestInnerClass()'
$this: THIS of 'Outer' type=Outer
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='DerivedInnerClass'
@@ -51,7 +51,7 @@ FILE /objectLiteralExpressions.kt
CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Inner()'
$this: THIS of 'Outer' type=Outer
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY
@@ -66,7 +66,7 @@ FILE /objectLiteralExpressions.kt
CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Inner()'
$this: $RECEIVER of 'test4() on Outer: Outer.Inner' type=Outer
$this: GET_VAR '<receiver: test4() on Outer: Outer.Inner>' type=Outer origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY
@@ -17,17 +17,17 @@ FILE /objectWithInitializers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test' type=Test
receiver: GET_VAR '<receiver: Test>' type=Test origin=null
PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test' type=Test
receiver: GET_VAR '<receiver: Test>' type=Test origin=null
ANONYMOUS_INITIALIZER Test
BLOCK_BODY
SET_FIELD 'y: Int' type=kotlin.Unit origin=null
receiver: THIS of 'Test' type=Test
receiver: GET_VAR '<receiver: Test>' type=Test origin=null
value: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test' type=Test
$this: GET_VAR '<receiver: Test>' type=Test origin=null
+20
View File
@@ -0,0 +1,20 @@
class Outer {
fun foo() {}
inner class Inner {
fun test() {
foo()
}
inner class Inner2 {
fun test2() {
test()
foo()
}
fun Outer.test3() {
foo()
}
}
}
}
@@ -0,0 +1,32 @@
FILE /outerClassAccess.kt
CLASS CLASS Outer
CONSTRUCTOR public constructor Outer()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Outer'
FUN public final fun foo(): kotlin.Unit
BLOCK_BODY
CLASS CLASS Inner
CONSTRUCTOR public constructor Inner()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Inner'
FUN public final fun test(): kotlin.Unit
BLOCK_BODY
CALL 'foo(): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
CLASS CLASS Inner2
CONSTRUCTOR public constructor Inner2()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Inner2'
FUN public final fun test2(): kotlin.Unit
BLOCK_BODY
CALL 'test(): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '<receiver: Inner>' type=Outer.Inner origin=null
CALL 'foo(): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
FUN public final fun Outer.test3(): kotlin.Unit
BLOCK_BODY
CALL 'foo(): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '<receiver: test3() on Outer: Unit>' type=Outer origin=null
+7 -7
View File
@@ -12,7 +12,7 @@ FILE /primaryConstructor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY
@@ -21,7 +21,7 @@ FILE /primaryConstructor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
CLASS CLASS Test2
CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int)
BLOCK_BODY
@@ -35,7 +35,7 @@ FILE /primaryConstructor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test2' type=Test2
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY
@@ -44,7 +44,7 @@ FILE /primaryConstructor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test2' type=Test2
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
CLASS CLASS Test3
CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int)
BLOCK_BODY
@@ -58,16 +58,16 @@ FILE /primaryConstructor.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test3' type=Test3
receiver: GET_VAR '<receiver: Test3>' type=Test3 origin=null
PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test3' type=Test3
receiver: GET_VAR '<receiver: Test3>' type=Test3 origin=null
ANONYMOUS_INITIALIZER Test3
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'Test3' type=Test3
receiver: GET_VAR '<receiver: Test3>' type=Test3 origin=null
value: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
@@ -27,7 +27,7 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor
receiver: GET_VAR '<receiver: TestWithDelegatingConstructor>' type=TestWithDelegatingConstructor origin=null
PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY
@@ -36,7 +36,7 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor
receiver: GET_VAR '<receiver: TestWithDelegatingConstructor>' type=TestWithDelegatingConstructor origin=null
CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int)
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)'
@@ -23,15 +23,15 @@ FILE /qualifiedSuperCalls.kt
FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY
CALL 'foo(): Unit' superQualifier=ILeft type=kotlin.Unit origin=null
$this: THIS of 'CBoth' type=ILeft
$this: GET_VAR '<receiver: CBoth>' type=CBoth origin=null
CALL 'foo(): Unit' superQualifier=IRight type=kotlin.Unit origin=null
$this: THIS of 'CBoth' type=IRight
$this: GET_VAR '<receiver: CBoth>' type=CBoth origin=null
PROPERTY public open override val bar: kotlin.Int
FUN public open override fun <get-bar>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
$this: CALL '<get-bar>(): Int' superQualifier=ILeft type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'CBoth' type=ILeft
$this: GET_VAR '<receiver: CBoth>' type=CBoth origin=null
other: CALL '<get-bar>(): Int' superQualifier=IRight type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'CBoth' type=IRight
$this: GET_VAR '<receiver: CBoth>' type=CBoth origin=null
+3 -3
View File
@@ -17,7 +17,7 @@ FILE /sealedClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-number>(): Double'
GET_FIELD 'number: Double' type=kotlin.Double origin=null
receiver: THIS of 'Const' type=Expr.Const
receiver: GET_VAR '<receiver: Const>' type=Expr.Const origin=null
CLASS CLASS Sum
CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr)
BLOCK_BODY
@@ -31,7 +31,7 @@ FILE /sealedClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-e1>(): Expr'
GET_FIELD 'e1: Expr' type=Expr origin=null
receiver: THIS of 'Sum' type=Expr.Sum
receiver: GET_VAR '<receiver: Sum>' type=Expr.Sum origin=null
PROPERTY public final val e2: Expr
FIELD PROPERTY_BACKING_FIELD public final val e2: Expr
EXPRESSION_BODY
@@ -40,7 +40,7 @@ FILE /sealedClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-e2>(): Expr'
GET_FIELD 'e2: Expr' type=Expr origin=null
receiver: THIS of 'Sum' type=Expr.Sum
receiver: GET_VAR '<receiver: Sum>' type=Expr.Sum origin=null
CLASS OBJECT NotANumber
CONSTRUCTOR private constructor NotANumber()
BLOCK_BODY
@@ -13,7 +13,7 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestProperty' type=TestProperty
receiver: GET_VAR '<receiver: TestProperty>' type=TestProperty origin=null
CONSTRUCTOR public constructor TestProperty()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
@@ -25,11 +25,11 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitBlock' type=TestInitBlock
receiver: GET_VAR '<receiver: TestInitBlock>' type=TestInitBlock origin=null
ANONYMOUS_INITIALIZER TestInitBlock
BLOCK_BODY
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitBlock' type=TestInitBlock
receiver: GET_VAR '<receiver: TestInitBlock>' type=TestInitBlock origin=null
value: CONST Int type=kotlin.Int value='0'
CONSTRUCTOR public constructor TestInitBlock()
BLOCK_BODY
+3 -3
View File
@@ -14,7 +14,7 @@ FILE /superCalls.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): String'
GET_FIELD 'bar: String' type=kotlin.String origin=null
receiver: THIS of 'Base' type=Base
receiver: GET_VAR '<receiver: Base>' type=Base origin=null
CLASS CLASS Derived
CONSTRUCTOR public constructor Derived()
BLOCK_BODY
@@ -23,10 +23,10 @@ FILE /superCalls.kt
FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY
CALL 'foo(): Unit' superQualifier=Base type=kotlin.Unit origin=null
$this: THIS of 'Derived' type=Base
$this: GET_VAR '<receiver: Derived>' type=Derived origin=null
PROPERTY public open override val bar: kotlin.String
FUN public open override fun <get-bar>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): String'
CALL '<get-bar>(): String' superQualifier=Base type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Derived' type=Base
$this: GET_VAR '<receiver: Derived>' type=Derived origin=null