Represent class instance initialization "as from resolve".

This commit is contained in:
Dmitry Petrov
2016-09-01 18:32:07 +03:00
committed by Dmitry Petrov
parent c3c758c7cc
commit 1b5dd50359
43 changed files with 322 additions and 164 deletions
+16 -16
View File
@@ -4,30 +4,31 @@ FILE /initVar.kt
BLOCK_BODY
SET_BACKING_FIELD x type=kotlin.Unit operator=null
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarFromParameter
PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY
GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS CLASS TestInitVarInClass
CONSTRUCTOR public constructor TestInitVarInClass()
BLOCK_BODY
SET_BACKING_FIELD x type=kotlin.Unit operator=null
CONST Int type=kotlin.Int value='0'
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInClass
PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
CLASS CLASS TestInitVarInInitBlock
CONSTRUCTOR public constructor TestInitVarInInitBlock()
BLOCK_BODY
BLOCK type=kotlin.Unit operator=null
CALL .<set-x> type=kotlin.Unit operator=EQ
$this: THIS public final class TestInitVarInInitBlock type=TestInitVarInInitBlock
<set-?>: CONST Int type=kotlin.Int value='0'
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInInitBlock
PROPERTY public final var x: kotlin.Int
ANONYMOUS_INITIALIZER TestInitVarInInitBlock
BLOCK_BODY
CALL .<set-x> type=kotlin.Unit operator=EQ
$this: THIS public final class TestInitVarInInitBlock type=TestInitVarInInitBlock
<set-?>: CONST Int type=kotlin.Int value='0'
CLASS CLASS TestInitVarWithCustomSetter
CONSTRUCTOR public constructor TestInitVarWithCustomSetter()
BLOCK_BODY
SET_BACKING_FIELD x type=kotlin.Unit operator=null
CONST Int type=kotlin.Int value='0'
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetter
PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
@@ -36,22 +37,21 @@ FILE /initVar.kt
SET_BACKING_FIELD x type=kotlin.Unit operator=EQ
GET_VAR value type=kotlin.Int operator=null
CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor
nestedInitializers: BLOCK_BODY
BLOCK type=kotlin.Unit operator=null
CALL .<set-x> type=kotlin.Unit operator=EQ
$this: THIS public final class TestInitVarWithCustomSetterWithExplicitCtor type=TestInitVarWithCustomSetterWithExplicitCtor
value: CONST Int type=kotlin.Int value='0'
PROPERTY public final var x: kotlin.Int
PROPERTY_SETTER public final fun <set-x>(/*0*/ value: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD x type=kotlin.Unit operator=EQ
GET_VAR value type=kotlin.Int operator=null
ANONYMOUS_INITIALIZER TestInitVarWithCustomSetterWithExplicitCtor
BLOCK_BODY
CALL .<set-x> type=kotlin.Unit operator=EQ
$this: THIS public final class TestInitVarWithCustomSetterWithExplicitCtor type=TestInitVarWithCustomSetterWithExplicitCtor
value: CONST Int type=kotlin.Int value='0'
CONSTRUCTOR public constructor TestInitVarWithCustomSetterWithExplicitCtor()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
NESTED_INITIALIZERS_CALL classDescriptor=TestInitVarWithCustomSetterWithExplicitCtor
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetterWithExplicitCtor
CLASS CLASS TestInitVarWithCustomSetterInCtor
nestedInitializers: BLOCK_BODY
PROPERTY public final var x: kotlin.Int
PROPERTY_SETTER public final fun <set-x>(/*0*/ value: kotlin.Int): kotlin.Unit
BLOCK_BODY
@@ -60,7 +60,7 @@ FILE /initVar.kt
CONSTRUCTOR public constructor TestInitVarWithCustomSetterInCtor()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL Any
NESTED_INITIALIZERS_CALL classDescriptor=TestInitVarWithCustomSetterInCtor
INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetterInCtor
CALL .<set-x> type=kotlin.Unit operator=EQ
$this: THIS public final class TestInitVarWithCustomSetterInCtor type=TestInitVarWithCustomSetterInCtor
value: CONST Int type=kotlin.Int value='42'