IR API: Make IrEnumEntry.initializerExpression IrExpressionBody

All non-declarations should be inside IrBody's now
This commit is contained in:
Anton Bannykh
2020-01-22 13:02:40 +03:00
parent 3ec671d727
commit 0bcde9dffc
22 changed files with 125 additions and 82 deletions
@@ -19,7 +19,8 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test0 declared in <root>.Test0.<get-x>' type=<root>.Test0 origin=null
ENUM_ENTRY name:ZERO
init: ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.Test0'
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.Test0'
CONSTRUCTOR visibility:private <> () returnType:<root>.Test0
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test0'
@@ -91,10 +92,12 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.<get-x>' type=<root>.Test1 origin=null
ENUM_ENTRY name:ZERO
init: ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.Test1'
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.Test1'
ENUM_ENTRY name:ONE
init: ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
x: CONST Int type=kotlin.Int value=1
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
x: CONST Int type=kotlin.Int value=1
CONSTRUCTOR visibility:private <> () returnType:<root>.Test1
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
@@ -166,7 +169,8 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-x>' type=<root>.Test2 origin=null
ENUM_ENTRY name:ZERO
init: ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Test2.ZERO'
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Test2.ZERO'
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:public superTypes:[<root>.Test2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2.ZERO
CONSTRUCTOR visibility:private <> () returnType:<root>.Test2.ZERO [primary]
@@ -230,7 +234,8 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
public open fun toString (): kotlin.String [fake_override] declared in <root>.Test2
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<<root>.Test2>
ENUM_ENTRY name:ONE
init: ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Test2.ONE'
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Test2.ONE'
class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:public superTypes:[<root>.Test2]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2.ONE
CONSTRUCTOR visibility:private <> () returnType:<root>.Test2.ONE [primary]