FIR2IR: set GET_PROPERTY origin for property reads

This commit is contained in:
Mikhail Glukhikh
2020-02-26 11:35:01 +03:00
parent e066afc67f
commit db7401d8eb
78 changed files with 214 additions and 395 deletions
@@ -59,7 +59,7 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
VALUE_PARAMETER name:kProp index:1 type:kotlin.Any?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in <root>.Cell'
CALL 'public final fun <get-value> (): kotlin.Int declared in <root>.Cell' type=kotlin.Int origin=null
CALL 'public final fun <get-value> (): kotlin.Int declared in <root>.Cell' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Cell declared in <root>.Cell.getValue' type=<root>.Cell origin=null
FUN name:setValue visibility:public modality:FINAL <> ($this:<root>.Cell, thisRef:kotlin.Any?, kProp:kotlin.Any?, newValue:kotlin.Int) returnType:kotlin.Unit [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Cell
@@ -22,9 +22,9 @@ FILE fqName:<root> fileName:/constValInitializers.kt
EXPRESSION_BODY
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 plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-I0> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
other: CALL 'public final fun <get-I1> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
other: CALL 'public final fun <get-I1> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-I0> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: CALL 'public final fun <get-I1> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: CALL 'public final fun <get-I1> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-I2> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:I2 visibility:public modality:FINAL [const,val]
BLOCK_BODY
@@ -54,8 +54,8 @@ FILE fqName:<root> fileName:/constValInitializers.kt
FIELD PROPERTY_BACKING_FIELD name:STR3 type:kotlin.String visibility:private [final,static]
EXPRESSION_BODY
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null
$this: CALL 'public final fun <get-STR1> (): kotlin.String declared in <root>' type=kotlin.String origin=null
other: CALL 'public final fun <get-STR2> (): kotlin.String declared in <root>' type=kotlin.String origin=null
$this: CALL 'public final fun <get-STR1> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
other: CALL 'public final fun <get-STR2> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-STR3> visibility:public modality:FINAL <> () returnType:kotlin.String
correspondingProperty: PROPERTY name:STR3 visibility:public modality:FINAL [const,val]
BLOCK_BODY
@@ -66,9 +66,9 @@ FILE fqName:<root> fileName:/constValInitializers.kt
EXPRESSION_BODY
STRING_CONCATENATION type=kotlin.String
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
$this: CALL 'public final fun <get-STR1> (): kotlin.String declared in <root>' type=kotlin.String origin=null
$this: CALL 'public final fun <get-STR1> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
$this: CALL 'public final fun <get-STR2> (): kotlin.String declared in <root>' type=kotlin.String origin=null
$this: CALL 'public final fun <get-STR2> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-STR4> visibility:public modality:FINAL <> () returnType:kotlin.String
correspondingProperty: PROPERTY name:STR4 visibility:public modality:FINAL [const,val]
BLOCK_BODY
@@ -36,23 +36,23 @@ FILE fqName:<root> fileName:/dataClassMembers.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): T of <root>.Test declared in <root>.Test'
CALL 'public final fun <get-x> (): T of <root>.Test declared in <root>.Test' type=T of <root>.Test origin=null
CALL 'public final fun <get-x> (): T of <root>.Test declared in <root>.Test' type=T of <root>.Test origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.component1' type=<root>.Test<T of <root>.Test> origin=null
FUN name:component2 visibility:public modality:FINAL <> ($this:<root>.Test<T of <root>.Test>) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String declared in <root>.Test'
CALL 'public final fun <get-y> (): kotlin.String declared in <root>.Test' type=kotlin.String origin=null
CALL 'public final fun <get-y> (): kotlin.String declared in <root>.Test' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.component2' type=<root>.Test<T of <root>.Test> origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.Test<T of <root>.Test>, x:T of <root>.Test, y:kotlin.String) returnType:<root>.Test<T of <root>.Test>
$this: VALUE_PARAMETER name:<this> type:<root>.Test<T of <root>.Test>
VALUE_PARAMETER name:x index:0 type:T of <root>.Test
EXPRESSION_BODY
CALL 'public final fun <get-x> (): T of <root>.Test declared in <root>.Test' type=T of <root>.Test origin=null
CALL 'public final fun <get-x> (): T of <root>.Test declared in <root>.Test' type=T of <root>.Test origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.copy' type=<root>.Test<T of <root>.Test> origin=null
VALUE_PARAMETER name:y index:1 type:kotlin.String
EXPRESSION_BODY
CALL 'public final fun <get-y> (): kotlin.String declared in <root>.Test' type=kotlin.String origin=null
CALL 'public final fun <get-y> (): kotlin.String declared in <root>.Test' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.copy' type=<root>.Test<T of <root>.Test> origin=null
BLOCK_BODY
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
@@ -36,7 +36,7 @@ FILE fqName:<root> fileName:/differentReceivers.kt
VALUE_PARAMETER name:p index:1 type:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in <root>'
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.MyClass' type=kotlin.String origin=null
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.MyClass' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.MyClass declared in <root>.provideDelegate' type=<root>.MyClass origin=null
FUN name:getValue visibility:public modality:FINAL <> ($receiver:kotlin.String, receiver:kotlin.Any?, p:kotlin.Any) returnType:kotlin.String [operator]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
@@ -77,8 +77,8 @@ FILE fqName:<root> fileName:/differentReceivers.kt
FIELD PROPERTY_BACKING_FIELD name:testOK type:kotlin.String visibility:private [final,static]
EXPRESSION_BODY
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null
$this: CALL 'public final fun <get-testO> (): kotlin.String declared in <root>' type=kotlin.String origin=null
other: CALL 'public final fun <get-testK> (): kotlin.String declared in <root>' type=kotlin.String origin=null
$this: CALL 'public final fun <get-testO> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
other: CALL 'public final fun <get-testK> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testOK> visibility:public modality:FINAL <> () returnType:kotlin.String
correspondingProperty: PROPERTY name:testOK visibility:public modality:FINAL [val]
BLOCK_BODY
@@ -23,7 +23,7 @@ FILE fqName:<root> fileName:/local.kt
VALUE_PARAMETER name:property index:1 type:kotlin.Any?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in <root>.Delegate'
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.Delegate' type=kotlin.String origin=null
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.Delegate' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.getValue' type=<root>.Delegate origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -63,7 +63,7 @@ FILE fqName:<root> fileName:/local.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): <root>.Delegate [operator] declared in <root>.DelegateProvider'
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.String) [primary] declared in <root>.Delegate' type=<root>.Delegate origin=null
value: CALL 'public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider' type=kotlin.String origin=null
value: CALL 'public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.DelegateProvider declared in <root>.DelegateProvider.provideDelegate' type=<root>.DelegateProvider origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -36,7 +36,7 @@ FILE fqName:<root> fileName:/localDifferentReceivers.kt
VALUE_PARAMETER name:p index:1 type:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in <root>'
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.MyClass' type=kotlin.String origin=null
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.MyClass' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.MyClass declared in <root>.provideDelegate' type=<root>.MyClass origin=null
FUN name:getValue visibility:public modality:FINAL <> ($receiver:kotlin.String, receiver:kotlin.Any?, p:kotlin.Any) returnType:kotlin.String [operator]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
@@ -23,7 +23,7 @@ FILE fqName:<root> fileName:/member.kt
VALUE_PARAMETER name:property index:1 type:kotlin.Any?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in <root>.Delegate'
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.Delegate' type=kotlin.String origin=null
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.Delegate' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.getValue' type=<root>.Delegate origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -63,7 +63,7 @@ FILE fqName:<root> fileName:/member.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): <root>.Delegate [operator] declared in <root>.DelegateProvider'
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.String) [primary] declared in <root>.Delegate' type=<root>.Delegate origin=null
value: CALL 'public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider' type=kotlin.String origin=null
value: CALL 'public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.DelegateProvider declared in <root>.DelegateProvider.provideDelegate' type=<root>.DelegateProvider origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -31,7 +31,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
RETURN type=kotlin.Nothing from='public final fun getValue (receiver: kotlin.String, p: kotlin.Any): kotlin.String [operator] declared in <root>.Host.StringDelegate'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null
$this: GET_VAR 'receiver: kotlin.String declared in <root>.Host.StringDelegate.getValue' type=kotlin.String origin=null
other: CALL 'public final fun <get-s> (): kotlin.String declared in <root>.Host.StringDelegate' type=kotlin.String origin=null
other: CALL 'public final fun <get-s> (): kotlin.String declared in <root>.Host.StringDelegate' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Host.StringDelegate declared in <root>.Host.StringDelegate.getValue' type=<root>.Host.StringDelegate origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -77,7 +77,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
PROPERTY name:ok visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:ok type:kotlin.String visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun <get-plusK> (): kotlin.String declared in <root>.Host' type=kotlin.String origin=null
CALL 'public final fun <get-plusK> (): kotlin.String declared in <root>.Host' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host' type=<root>.Host origin=null
$receiver: CONST String type=kotlin.String value="O"
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-ok> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.String
@@ -23,7 +23,7 @@ FILE fqName:<root> fileName:/topLevel.kt
VALUE_PARAMETER name:property index:1 type:kotlin.Any?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in <root>.Delegate'
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.Delegate' type=kotlin.String origin=null
CALL 'public final fun <get-value> (): kotlin.String declared in <root>.Delegate' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.getValue' type=<root>.Delegate origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -63,7 +63,7 @@ FILE fqName:<root> fileName:/topLevel.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): <root>.Delegate [operator] declared in <root>.DelegateProvider'
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.String) [primary] declared in <root>.Delegate' type=<root>.Delegate origin=null
value: CALL 'public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider' type=kotlin.String origin=null
value: CALL 'public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.DelegateProvider declared in <root>.DelegateProvider.provideDelegate' type=<root>.DelegateProvider origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden: