FIR2IR: generate specific sources for property accessors

Related to KT-60111
This commit is contained in:
Mikhail Glukhikh
2023-10-02 12:08:08 +02:00
committed by Space Team
parent f38b8fd8cb
commit 0fb4c9b4fe
27 changed files with 99 additions and 142 deletions
@@ -49,30 +49,30 @@
@19:4..20:18 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@19:4..20:18 GET_VAR '<this>: test.Test declared in test.Test.<get-test3>' type=test.Test origin=null
@23:4..24 PROPERTY name:test4 visibility:public modality:FINAL [val]
@23:4..24 FUN name:<get-test4> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
@23:4..24 VALUE_PARAMETER name:<this> type:test.Test
@23:14..24 FUN name:<get-test4> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
@23:14..24 VALUE_PARAMETER name:<this> type:test.Test
@23:22..24 BLOCK_BODY
@23:24..24 RETURN type=kotlin.Nothing from='public final fun <get-test4> (): kotlin.Int declared in test.Test'
@23:22..24 CONST Int type=kotlin.Int value=42
@26:4..27:18 PROPERTY name:test5 visibility:public modality:FINAL [val]
@26:4..27:18 FUN name:<get-test5> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
@26:4..27:18 VALUE_PARAMETER name:<this> type:test.Test
@27:8..18 FUN name:<get-test5> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
@27:8..18 VALUE_PARAMETER name:<this> type:test.Test
@27:16..18 BLOCK_BODY
@27:18..18 RETURN type=kotlin.Nothing from='public final fun <get-test5> (): kotlin.Int declared in test.Test'
@27:16..18 CONST Int type=kotlin.Int value=42
@30:4..34:18 PROPERTY name:test6 visibility:public modality:FINAL [val]
@30:4..34:18 FUN name:<get-test6> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
@30:4..34:18 VALUE_PARAMETER name:<this> type:test.Test
@34:8..18 FUN name:<get-test6> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
@34:8..18 VALUE_PARAMETER name:<this> type:test.Test
@34:16..18 BLOCK_BODY
@34:18..18 RETURN type=kotlin.Nothing from='public final fun <get-test6> (): kotlin.Int declared in test.Test'
@34:16..18 CONST Int type=kotlin.Int value=42
@37:4..41:18 PROPERTY name:test7 visibility:public modality:FINAL [val]
@37:4..41:18 FUN name:<get-test7> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
@38:8..41:18 FUN name:<get-test7> visibility:public modality:FINAL <> ($this:test.Test) returnType:kotlin.Int
annotations:
@38:8..40:9 CONSTRUCTOR_CALL 'public constructor <init> (vararg names: kotlin.String) [primary] declared in kotlin.Suppress' type=kotlin.Suppress origin=null
@39:12..29 VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
@39:12..29 CONST String type=kotlin.String value="UNUSED_VARIABLE"
@37:4..41:18 VALUE_PARAMETER name:<this> type:test.Test
@38:8..41:18 VALUE_PARAMETER name:<this> type:test.Test
@41:16..18 BLOCK_BODY
@41:18..18 RETURN type=kotlin.Nothing from='public final fun <get-test7> (): kotlin.Int declared in test.Test'
@41:16..18 CONST Int type=kotlin.Int value=42
@@ -103,13 +103,13 @@
@47:4..31 RETURN type=kotlin.Nothing from='public final fun <get-test9> (): kotlin.Int declared in test.Test'
@47:4..31 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Int visibility:private' type=kotlin.Int origin=null
@47:4..31 GET_VAR '<this>: test.Test declared in test.Test.<get-test9>' type=test.Test origin=null
@47:4..31 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test9> visibility:private modality:FINAL <> ($this:test.Test, <set-?>:kotlin.Int) returnType:kotlin.Unit
@47:4..31 VALUE_PARAMETER name:<this> type:test.Test
@47:4..31 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@47:4..31 BLOCK_BODY
@47:4..31 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
@47:4..31 GET_VAR '<this>: test.Test declared in test.Test.<set-test9>' type=test.Test origin=null
@47:4..31 GET_VAR '<set-?>: kotlin.Int declared in test.Test.<set-test9>' type=kotlin.Int origin=null
@47:20..31 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test9> visibility:private modality:FINAL <> ($this:test.Test, <set-?>:kotlin.Int) returnType:kotlin.Unit
@47:20..31 VALUE_PARAMETER name:<this> type:test.Test
@47:20..31 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@47:20..31 BLOCK_BODY
@47:20..31 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
@47:20..31 GET_VAR '<this>: test.Test declared in test.Test.<set-test9>' type=test.Test origin=null
@47:20..31 GET_VAR '<set-?>: kotlin.Int declared in test.Test.<set-test9>' type=kotlin.Int origin=null
@50:4..51:19 PROPERTY name:test10 visibility:public modality:FINAL [var]
@50:4..51:19 FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private
@50:17..19 EXPRESSION_BODY
@@ -120,13 +120,13 @@
@50:4..51:19 RETURN type=kotlin.Nothing from='public final fun <get-test10> (): kotlin.Int declared in test.Test'
@50:4..51:19 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private' type=kotlin.Int origin=null
@50:4..51:19 GET_VAR '<this>: test.Test declared in test.Test.<get-test10>' type=test.Test origin=null
@50:4..51:19 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test10> visibility:private modality:FINAL <> ($this:test.Test, <set-?>:kotlin.Int) returnType:kotlin.Unit
@50:4..51:19 VALUE_PARAMETER name:<this> type:test.Test
@50:4..51:19 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@50:4..51:19 BLOCK_BODY
@50:4..51:19 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
@50:4..51:19 GET_VAR '<this>: test.Test declared in test.Test.<set-test10>' type=test.Test origin=null
@50:4..51:19 GET_VAR '<set-?>: kotlin.Int declared in test.Test.<set-test10>' type=kotlin.Int origin=null
@51:8..19 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test10> visibility:private modality:FINAL <> ($this:test.Test, <set-?>:kotlin.Int) returnType:kotlin.Unit
@51:8..19 VALUE_PARAMETER name:<this> type:test.Test
@51:8..19 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@51:8..19 BLOCK_BODY
@51:8..19 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
@51:8..19 GET_VAR '<this>: test.Test declared in test.Test.<set-test10>' type=test.Test origin=null
@51:8..19 GET_VAR '<set-?>: kotlin.Int declared in test.Test.<set-test10>' type=kotlin.Int origin=null
@54:4..57:9 PROPERTY name:test11 visibility:public modality:FINAL [var]
@54:4..57:9 FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Int visibility:private
@54:17..19 EXPRESSION_BODY
@@ -137,8 +137,8 @@
@54:4..57:9 RETURN type=kotlin.Nothing from='public final fun <get-test11> (): kotlin.Int declared in test.Test'
@54:4..57:9 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Int visibility:private' type=kotlin.Int origin=null
@54:4..57:9 GET_VAR '<this>: test.Test declared in test.Test.<get-test11>' type=test.Test origin=null
@54:4..57:9 FUN name:<set-test11> visibility:public modality:FINAL <> ($this:test.Test, value:kotlin.Int) returnType:kotlin.Unit
@54:4..57:9 VALUE_PARAMETER name:<this> type:test.Test
@55:8..57:9 FUN name:<set-test11> visibility:public modality:FINAL <> ($this:test.Test, value:kotlin.Int) returnType:kotlin.Unit
@55:8..57:9 VALUE_PARAMETER name:<this> type:test.Test
@55:12..17 VALUE_PARAMETER name:value index:0 type:kotlin.Int
@55:19..57:9 BLOCK_BODY
@56:12..25 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Int visibility:private' type=kotlin.Unit origin=EQ
@@ -154,8 +154,8 @@
@60:4..66:9 RETURN type=kotlin.Nothing from='public final fun <get-test12> (): kotlin.Int declared in test.Test'
@60:4..66:9 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test12 type:kotlin.Int visibility:private' type=kotlin.Int origin=null
@60:4..66:9 GET_VAR '<this>: test.Test declared in test.Test.<get-test12>' type=test.Test origin=null
@60:4..66:9 FUN name:<set-test12> visibility:public modality:FINAL <> ($this:test.Test, value:kotlin.Int) returnType:kotlin.Unit
@60:4..66:9 VALUE_PARAMETER name:<this> type:test.Test
@64:8..66:9 FUN name:<set-test12> visibility:public modality:FINAL <> ($this:test.Test, value:kotlin.Int) returnType:kotlin.Unit
@64:8..66:9 VALUE_PARAMETER name:<this> type:test.Test
@64:12..17 VALUE_PARAMETER name:value index:0 type:kotlin.Int
@64:19..66:9 BLOCK_BODY
@65:12..25 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test12 type:kotlin.Int visibility:private' type=kotlin.Unit origin=EQ
@@ -171,12 +171,12 @@
@69:4..75:9 RETURN type=kotlin.Nothing from='public final fun <get-test13> (): kotlin.Int declared in test.Test'
@69:4..75:9 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test13 type:kotlin.Int visibility:private' type=kotlin.Int origin=null
@69:4..75:9 GET_VAR '<this>: test.Test declared in test.Test.<get-test13>' type=test.Test origin=null
@69:4..75:9 FUN name:<set-test13> visibility:public modality:FINAL <> ($this:test.Test, value:kotlin.Int) returnType:kotlin.Unit
@70:8..75:9 FUN name:<set-test13> visibility:public modality:FINAL <> ($this:test.Test, value:kotlin.Int) returnType:kotlin.Unit
annotations:
@70:8..72:9 CONSTRUCTOR_CALL 'public constructor <init> (vararg names: kotlin.String) [primary] declared in kotlin.Suppress' type=kotlin.Suppress origin=null
@71:12..29 VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
@71:12..29 CONST String type=kotlin.String value="UNUSED_VARIABLE"
@69:4..75:9 VALUE_PARAMETER name:<this> type:test.Test
@70:8..75:9 VALUE_PARAMETER name:<this> type:test.Test
@73:12..17 VALUE_PARAMETER name:value index:0 type:kotlin.Int
@73:19..75:9 BLOCK_BODY
@74:12..25 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test13 type:kotlin.Int visibility:private' type=kotlin.Unit origin=EQ
@@ -36,22 +36,22 @@
@18:0..19:14 RETURN type=kotlin.Nothing from='private final fun <get-test3> (): kotlin.Int declared in test'
@18:0..19:14 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Int visibility:private [final,static]' type=kotlin.Int origin=null
@22:0..20 PROPERTY name:test4 visibility:public modality:FINAL [val]
@22:0..20 FUN name:<get-test4> visibility:public modality:FINAL <> () returnType:kotlin.Int
@22:10..20 FUN name:<get-test4> visibility:public modality:FINAL <> () returnType:kotlin.Int
@22:18..20 BLOCK_BODY
@22:20..20 RETURN type=kotlin.Nothing from='public final fun <get-test4> (): kotlin.Int declared in test'
@22:18..20 CONST Int type=kotlin.Int value=42
@25:0..26:14 PROPERTY name:test5 visibility:public modality:FINAL [val]
@25:0..26:14 FUN name:<get-test5> visibility:public modality:FINAL <> () returnType:kotlin.Int
@26:4..14 FUN name:<get-test5> visibility:public modality:FINAL <> () returnType:kotlin.Int
@26:12..14 BLOCK_BODY
@26:14..14 RETURN type=kotlin.Nothing from='public final fun <get-test5> (): kotlin.Int declared in test'
@26:12..14 CONST Int type=kotlin.Int value=42
@29:0..33:14 PROPERTY name:test6 visibility:public modality:FINAL [val]
@29:0..33:14 FUN name:<get-test6> visibility:public modality:FINAL <> () returnType:kotlin.Int
@33:4..14 FUN name:<get-test6> visibility:public modality:FINAL <> () returnType:kotlin.Int
@33:12..14 BLOCK_BODY
@33:14..14 RETURN type=kotlin.Nothing from='public final fun <get-test6> (): kotlin.Int declared in test'
@33:12..14 CONST Int type=kotlin.Int value=42
@36:0..40:14 PROPERTY name:test7 visibility:public modality:FINAL [val]
@36:0..40:14 FUN name:<get-test7> visibility:public modality:FINAL <> () returnType:kotlin.Int
@37:4..40:14 FUN name:<get-test7> visibility:public modality:FINAL <> () returnType:kotlin.Int
annotations:
@37:4..39:5 CONSTRUCTOR_CALL 'public constructor <init> (vararg names: kotlin.String) [primary] declared in kotlin.Suppress' type=kotlin.Suppress origin=null
@38:8..25 VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
@@ -80,11 +80,11 @@
@46:0..27 BLOCK_BODY
@46:0..27 RETURN type=kotlin.Nothing from='public final fun <get-test9> (): kotlin.Int declared in test'
@46:0..27 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
@46:0..27 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test9> visibility:private modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
@46:0..27 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@46:0..27 BLOCK_BODY
@46:0..27 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
@46:0..27 GET_VAR '<set-?>: kotlin.Int declared in test.<set-test9>' type=kotlin.Int origin=null
@46:16..27 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test9> visibility:private modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
@46:16..27 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@46:16..27 BLOCK_BODY
@46:16..27 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
@46:16..27 GET_VAR '<set-?>: kotlin.Int declared in test.<set-test9>' type=kotlin.Int origin=null
@49:0..50:15 PROPERTY name:test10 visibility:public modality:FINAL [var]
@49:0..50:15 FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private [static]
@49:13..15 EXPRESSION_BODY
@@ -93,11 +93,11 @@
@49:0..50:15 BLOCK_BODY
@49:0..50:15 RETURN type=kotlin.Nothing from='public final fun <get-test10> (): kotlin.Int declared in test'
@49:0..50:15 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
@49:0..50:15 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test10> visibility:private modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
@49:0..50:15 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@49:0..50:15 BLOCK_BODY
@49:0..50:15 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
@49:0..50:15 GET_VAR '<set-?>: kotlin.Int declared in test.<set-test10>' type=kotlin.Int origin=null
@50:4..15 FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test10> visibility:private modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
@50:4..15 VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
@50:4..15 BLOCK_BODY
@50:4..15 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test10 type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
@50:4..15 GET_VAR '<set-?>: kotlin.Int declared in test.<set-test10>' type=kotlin.Int origin=null
@53:0..54:32 PROPERTY name:test11 visibility:public modality:FINAL [var]
@53:0..54:32 FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Int visibility:private [static]
@53:13..15 EXPRESSION_BODY
@@ -106,7 +106,7 @@
@53:0..54:32 BLOCK_BODY
@53:0..54:32 RETURN type=kotlin.Nothing from='public final fun <get-test11> (): kotlin.Int declared in test'
@53:0..54:32 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
@53:0..54:32 FUN name:<set-test11> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
@54:4..32 FUN name:<set-test11> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
@54:8..13 VALUE_PARAMETER name:value index:0 type:kotlin.Int
@54:15..32 BLOCK_BODY
@54:17..30 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test11 type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=EQ
@@ -119,7 +119,7 @@
@57:0..61:32 BLOCK_BODY
@57:0..61:32 RETURN type=kotlin.Nothing from='public final fun <get-test12> (): kotlin.Int declared in test'
@57:0..61:32 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test12 type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
@57:0..61:32 FUN name:<set-test12> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
@61:4..32 FUN name:<set-test12> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
@61:8..13 VALUE_PARAMETER name:value index:0 type:kotlin.Int
@61:15..32 BLOCK_BODY
@61:17..30 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test12 type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=EQ
@@ -132,7 +132,7 @@
@64:0..68:32 BLOCK_BODY
@64:0..68:32 RETURN type=kotlin.Nothing from='public final fun <get-test13> (): kotlin.Int declared in test'
@64:0..68:32 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test13 type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
@64:0..68:32 FUN name:<set-test13> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
@65:4..68:32 FUN name:<set-test13> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
annotations:
@65:4..67:5 CONSTRUCTOR_CALL 'public constructor <init> (vararg names: kotlin.String) [primary] declared in kotlin.Suppress' type=kotlin.Suppress origin=null
@66:8..25 VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String