[FIR2IR] Get rid of all usages of IrSymbol.owner from AdapterGenerator

^KT-60924
This commit is contained in:
Dmitriy Novozhilov
2023-08-18 16:59:56 +03:00
committed by Space Team
parent 39195146a9
commit 5355f0f705
6 changed files with 45 additions and 121 deletions
@@ -1,94 +0,0 @@
FILE fqName:<root> fileName:/kt46069.kt
CLASS CLASS name:ObjectAssert modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>
TYPE_PARAMETER name:ACTUAL index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> () returnType:<root>.ObjectAssert<ACTUAL of <root>.ObjectAssert> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ObjectAssert modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:describedAs visibility:public modality:FINAL <> ($this:<root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>, description:kotlin.String?, args:kotlin.Array<out kotlin.Any?>) returnType:<root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>?
$this: VALUE_PARAMETER name:<this> type:<root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>
VALUE_PARAMETER name:description index:0 type:kotlin.String?
VALUE_PARAMETER name:args index:1 type:kotlin.Array<out kotlin.Any?> varargElementType:kotlin.Any? [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun describedAs (description: kotlin.String?, vararg args: kotlin.Any?): <root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>? declared in <root>.ObjectAssert'
CONST Null type=kotlin.Nothing? value=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:Assertions modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Assertions
CONSTRUCTOR visibility:private <> () returnType:<root>.Assertions [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Assertions modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:assertThat visibility:public modality:FINAL <S> ($this:<root>.Assertions, actual:S of <root>.Assertions.assertThat) returnType:<root>.ObjectAssert<S of <root>.Assertions.assertThat>
TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] reified:false
$this: VALUE_PARAMETER name:<this> type:<root>.Assertions
VALUE_PARAMETER name:actual index:0 type:S of <root>.Assertions.assertThat
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun assertThat <S> (actual: S of <root>.Assertions.assertThat): <root>.ObjectAssert<S of <root>.Assertions.assertThat> declared in <root>.Assertions'
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.ObjectAssert' type=<root>.ObjectAssert<S of <root>.Assertions.assertThat> origin=null
<class: ACTUAL>: S of <root>.Assertions.assertThat
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:assertNotNull visibility:public modality:FINAL <T> ($receiver:T of <root>.assertNotNull?, description:kotlin.String?) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] reified:false
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.assertNotNull?
VALUE_PARAMETER name:description index:0 type:kotlin.String?
EXPRESSION_BODY
CONST Null type=kotlin.Nothing? value=null
BLOCK_BODY
VAR name:assert type:<root>.ObjectAssert<T of <root>.assertNotNull?> [val]
CALL 'public final fun assertThat <S> (actual: S of <root>.Assertions.assertThat): <root>.ObjectAssert<S of <root>.Assertions.assertThat> declared in <root>.Assertions' type=<root>.ObjectAssert<T of <root>.assertNotNull?> origin=null
<S>: T of <root>.assertNotNull?
$this: GET_OBJECT 'CLASS OBJECT name:Assertions modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Assertions
actual: GET_VAR '<this>: T of <root>.assertNotNull? declared in <root>.assertNotNull' type=T of <root>.assertNotNull? origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=<root>.ObjectAssert<T of <root>.assertNotNull?>? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String? [val]
GET_VAR 'description: kotlin.String? declared in <root>.assertNotNull' type=kotlin.String? origin=null
WHEN type=<root>.ObjectAssert<T of <root>.assertNotNull?>? origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: kotlin.String? declared in <root>.assertNotNull' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun let <T, R> (block: kotlin.Function1<T of kotlin.let, R of kotlin.let>): R of kotlin.let declared in kotlin' type=<root>.ObjectAssert<T of <root>.assertNotNull?>? origin=null
<T>: kotlin.String
<R>: <root>.ObjectAssert<T of <root>.assertNotNull?>?
$receiver: GET_VAR 'val tmp_0: kotlin.String? declared in <root>.assertNotNull' type=kotlin.String? origin=null
block: BLOCK type=kotlin.Function1<kotlin.String?, <root>.ObjectAssert<T of <root>.assertNotNull?>?> origin=ADAPTED_FUNCTION_REFERENCE
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:describedAs visibility:local modality:FINAL <> ($receiver:<root>.ObjectAssert<T of <root>.assertNotNull?>, p0:kotlin.String?) returnType:<root>.ObjectAssert<T of <root>.assertNotNull?>?
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:receiver type:<root>.ObjectAssert<T of <root>.assertNotNull?>
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.String?
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun describedAs (p0: kotlin.String?): <root>.ObjectAssert<T of <root>.assertNotNull?>? declared in <root>.assertNotNull'
CALL 'public final fun describedAs (description: kotlin.String?, vararg args: kotlin.Any?): <root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>? declared in <root>.ObjectAssert' type=<root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>? origin=null
$this: GET_VAR 'receiver: <root>.ObjectAssert<T of <root>.assertNotNull?> declared in <root>.assertNotNull.describedAs' type=<root>.ObjectAssert<T of <root>.assertNotNull?> origin=ADAPTED_FUNCTION_REFERENCE
description: GET_VAR 'p0: kotlin.String? declared in <root>.assertNotNull.describedAs' type=kotlin.String? origin=null
FUNCTION_REFERENCE 'local final fun describedAs (p0: kotlin.String?): <root>.ObjectAssert<T of <root>.assertNotNull?>? declared in <root>.assertNotNull' type=kotlin.Function1<kotlin.String?, <root>.ObjectAssert<T of <root>.assertNotNull?>?> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun describedAs (description: kotlin.String?, vararg args: kotlin.Any?): <root>.ObjectAssert<ACTUAL of <root>.ObjectAssert>? declared in <root>.ObjectAssert
$receiver: GET_VAR 'val assert: <root>.ObjectAssert<T of <root>.assertNotNull?> declared in <root>.assertNotNull' type=<root>.ObjectAssert<T of <root>.assertNotNull?> origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// SKIP_KT_DUMP
class ObjectAssert<ACTUAL> {
fun describedAs(description: String?, vararg args: Any?): ObjectAssert<ACTUAL>? = null