Generate references to overridden declarations as a separate pass

NB currently it relies on overriddenDescriptors in a FunctionDescriptor,
thus maybe incorrect for transformed declarations.
This commit is contained in:
Dmitry Petrov
2018-01-19 10:08:18 +03:00
parent 9570b64953
commit e5295d0f78
110 changed files with 1864 additions and 5 deletions
@@ -209,6 +209,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
floatArray: GET_VAR 'value-parameter floatArray: FloatArray = ...' type=kotlin.FloatArray origin=null
doubleArray: GET_VAR 'value-parameter doubleArray: DoubleArray = ...' type=kotlin.DoubleArray origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:Test1) returnType:String flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags:
$this: VALUE_PARAMETER name:<this> type:Test1 flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='toString(): String'
@@ -260,6 +262,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
CONST String type=kotlin.String value=)
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test1) returnType:Int flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> () returnType:Int flags:
$this: VALUE_PARAMETER name:<this> type:Test1 flags:
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp0_result type:kotlin.Int flags:var
@@ -335,6 +339,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:Test1, other:kotlin.Any?) returnType:Boolean flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> (other:kotlin.Any?) returnType:Boolean flags:
$this: VALUE_PARAMETER name:<this> type:Test1 flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
BLOCK_BODY
@@ -482,6 +488,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
<T>: null
genericArray: GET_VAR 'value-parameter genericArray: Array<T> = ...' type=kotlin.Array<T> origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:Test2<T>) returnType:String flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags:
$this: VALUE_PARAMETER name:<this> type:Test2<T> flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='toString(): String'
@@ -493,6 +501,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
$this: GET_VAR 'this@Test2: Test2<T>' type=Test2<T> origin=null
CONST String type=kotlin.String value=)
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test2<T>) returnType:Int flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> () returnType:Int flags:
$this: VALUE_PARAMETER name:<this> type:Test2<T> flags:
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp0_result type:kotlin.Int flags:var
@@ -504,6 +514,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:Test2<T>, other:kotlin.Any?) returnType:Boolean flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> (other:kotlin.Any?) returnType:Boolean flags:
$this: VALUE_PARAMETER name:<this> type:Test2<T> flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
BLOCK_BODY
@@ -569,6 +581,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
CALL 'constructor Test3(Array<Any>?)' type=Test3 origin=null
anyArrayN: GET_VAR 'value-parameter anyArrayN: Array<Any>? = ...' type=kotlin.Array<kotlin.Any>? origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:Test3) returnType:String flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> () returnType:String flags:
$this: VALUE_PARAMETER name:<this> type:Test3 flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='toString(): String'
@@ -580,6 +594,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
$this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null
CONST String type=kotlin.String value=)
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test3) returnType:Int flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> () returnType:Int flags:
$this: VALUE_PARAMETER name:<this> type:Test3 flags:
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp0_result type:kotlin.Int flags:var
@@ -602,6 +618,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:Test3, other:kotlin.Any?) returnType:Boolean flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> (other:kotlin.Any?) returnType:Boolean flags:
$this: VALUE_PARAMETER name:<this> type:Test3 flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
BLOCK_BODY