[IR] Don't use the GET_PROPERTY origin on IrGetField expressions.

This origin was set somewhat arbitrarily.
It actually only makes sense for `IrCall`s to property getters.
There were no places in lowerings that checked `IrGetField` expressions
for this origin value.

^KT-62500 Fixed
This commit is contained in:
Sergej Jaskiewicz
2024-01-10 18:45:11 +01:00
committed by Space Team
parent f9ea353b60
commit ad9f7bf90e
49 changed files with 75 additions and 75 deletions
@@ -40,11 +40,11 @@ FILE fqName:<root> fileName:/explicitBackingFieldType.kt
BRANCH
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
arg0: CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:invertedTypes type:kotlin.Number visibility:private' type=kotlin.Number origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:invertedTypes type:kotlin.Number visibility:private' type=kotlin.Number origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-invertedTypes>' type=<root>.A origin=null
arg1: CONST Int type=kotlin.Int value=10
then: CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:invertedTypes type:kotlin.Number visibility:private' type=kotlin.Number origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:invertedTypes type:kotlin.Number visibility:private' type=kotlin.Number origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-invertedTypes>' type=<root>.A origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
@@ -66,7 +66,7 @@ FILE fqName:<root> fileName:/explicitBackingFieldType.kt
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=GET_PROPERTY
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-p>' type=<root>.A origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -16,7 +16,7 @@ FILE fqName:<root> fileName:/independentBackingFieldType.kt
RETURN type=kotlin.Nothing from='public final fun <get-it> (): kotlin.Int declared in <root>.A'
CALL 'public open fun toInt (): kotlin.Int declared in kotlin.Double' type=kotlin.Int origin=null
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Double declared in kotlin.Double' type=kotlin.Double origin=PLUS
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:it type:kotlin.Double visibility:private' type=kotlin.Double origin=GET_PROPERTY
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:it type:kotlin.Double visibility:private' type=kotlin.Double origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-it>' type=<root>.A origin=null
other: CONST Int type=kotlin.Int value=10
FUN name:<set-it> visibility:public modality:FINAL <> ($this:<root>.A, value:kotlin.Int) returnType:kotlin.Unit
@@ -33,7 +33,7 @@ FILE fqName:<root> fileName:/propertyTypeNarrowing.kt
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=GET_PROPERTY
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-p>' type=<root>.A origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden: