[FIR2IR] Remove GET_PROPERTY origin from delegate field reads

This commit is contained in:
Mikhail Glukhikh
2020-03-31 16:17:02 +03:00
parent 94749855b9
commit 5f8fadb220
13 changed files with 26 additions and 22 deletions
@@ -33,6 +33,6 @@ FILE fqName:<root> fileName:/delegateFieldWithAnnotations.kt
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
CALL 'public final fun getValue <T> (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null
<T>: kotlin.Int
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun <get-test1> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
@@ -95,7 +95,7 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in <root>.Cell' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static]' type=<root>.Cell origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static]' type=<root>.Cell origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun <get-test1> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test2 visibility:public modality:FINAL [delegated,var]
@@ -112,7 +112,7 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Int declared in <root>'
CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in <root>.Cell' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static]' type=<root>.Cell origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static]' type=<root>.Cell origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun <get-test2> (): kotlin.Int declared in <root>' setter='public final fun <set-test2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KProperty<*> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-test2> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
@@ -120,7 +120,7 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>.Cell' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static]' type=<root>.Cell origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static]' type=<root>.Cell origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun <get-test2> (): kotlin.Int declared in <root>' setter='public final fun <set-test2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KProperty<*> origin=null
newValue: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-test2>' type=kotlin.Int origin=null
@@ -108,7 +108,7 @@ FILE fqName:<root> fileName:/classLevelProperties.kt
RETURN type=kotlin.Nothing from='public final fun <get-test7> (): kotlin.Int declared in <root>.C'
CALL 'public final fun getValue <T> (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null
<T>: kotlin.Int
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final]' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final]' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun <get-test7> (): kotlin.Int declared in <root>.C' setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
@@ -15,7 +15,7 @@ FILE fqName:<root> fileName:/delegatedProperties.kt
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
CALL 'public final fun getValue <T> (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null
<T>: kotlin.Int
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun <get-test1> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
@@ -53,7 +53,7 @@ FILE fqName:<root> fileName:/delegatedProperties.kt
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Int declared in <root>.C'
CALL 'public final fun getValue <T> (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null
<T>: kotlin.Int
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final]' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final]' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field=null getter='public final fun <get-test2> (): kotlin.Int declared in <root>.C' setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test3 visibility:public modality:FINAL [delegated,var]
@@ -84,7 +84,7 @@ FILE fqName:<root> fileName:/packageLevelProperties.kt
RETURN type=kotlin.Nothing from='public final fun <get-test7> (): kotlin.Int declared in <root>'
CALL 'public final fun getValue <T> (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null
<T>: kotlin.Int
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun <get-test7> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
@@ -58,7 +58,7 @@ FILE fqName:<root> fileName:/differentReceivers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testO> (): kotlin.String declared in <root>'
CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in <root>' type=kotlin.String origin=null
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=GET_PROPERTY
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
receiver: CONST Null type=kotlin.Nothing? value=null
p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field=null getter='public final fun <get-testO> (): kotlin.String declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:testK visibility:public modality:FINAL [delegated,val]
@@ -70,7 +70,7 @@ FILE fqName:<root> fileName:/differentReceivers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testK> (): kotlin.String declared in <root>'
CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in <root>' type=kotlin.String origin=null
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=GET_PROPERTY
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
receiver: CONST Null type=kotlin.Nothing? value=null
p: PROPERTY_REFERENCE 'public final testK: kotlin.String [delegated,val]' field=null getter='public final fun <get-testK> (): kotlin.String declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:testOK visibility:public modality:FINAL [val]
@@ -98,7 +98,7 @@ FILE fqName:<root> fileName:/member.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testMember> (): kotlin.String declared in <root>.Host'
CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in <root>.Delegate' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testMember$delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testMember$delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
thisRef: GET_VAR '<this>: <root>.Host declared in <root>.Host' type=<root>.Host origin=null
property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field=null getter='public final fun <get-testMember> (): kotlin.String declared in <root>.Host' setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
@@ -72,7 +72,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-plusK> (): kotlin.String declared in <root>.Host'
CALL 'public final fun getValue (receiver: kotlin.String, p: kotlin.Any): kotlin.String [operator] declared in <root>.Host.StringDelegate' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:plusK$delegate type:<root>.Host.StringDelegate visibility:private [final]' type=<root>.Host.StringDelegate origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:plusK$delegate type:<root>.Host.StringDelegate visibility:private [final]' type=<root>.Host.StringDelegate origin=null
receiver: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
receiver: ERROR_CALL 'Unresolved reference: this@R|/Host.plusK|' type=kotlin.String
p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field=null getter='public final fun <get-plusK> (): kotlin.String declared in <root>.Host' setter=null type=kotlin.reflect.KProperty<*> origin=null
@@ -91,6 +91,6 @@ FILE fqName:<root> fileName:/topLevel.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testTopLevel> (): kotlin.String declared in <root>'
CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in <root>.Delegate' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:<root>.Delegate visibility:private [final,static]' type=<root>.Delegate origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:<root>.Delegate visibility:private [final,static]' type=<root>.Delegate origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field=null getter='public final fun <get-testTopLevel> (): kotlin.String declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null