[JS IR] IC invalidation refactoring

- Huge refactoring for IC
  - Update hash combination logic
  - Introduce value class for IC hashes
  - Calc md5 directly by function IR
  - Split IC logic by classes
  - Move JsIrLinkerLoader into separate file
  - CacheUpdateStatus is a sealed class
  - Render TYPE_PARAMETER reified flag

^KT-51081 Fixed
^KT-51084 Fixed
This commit is contained in:
Alexander Korepanov
2022-03-15 05:34:19 +00:00
committed by Space
parent c38dd1c004
commit 69295f2cf0
246 changed files with 1724 additions and 2048 deletions
@@ -16,14 +16,14 @@ FILE fqName:<root> fileName:/integerCoercionToT.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:reinterpret visibility:public modality:FINAL <T> ($receiver:<root>.CPointed) returnType:T of <root>.reinterpret [inline]
TYPE_PARAMETER name:T index:0 variance: superTypes:[<root>.CPointed]
TYPE_PARAMETER name:T index:0 variance: superTypes:[<root>.CPointed] reified:true
$receiver: VALUE_PARAMETER name:<this> type:<root>.CPointed
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun reinterpret <T> (): T of <root>.reinterpret [inline] declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
CLASS CLASS name:CInt32VarX modality:FINAL visibility:public superTypes:[<root>.CPointed]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CInt32VarX<T of <root>.CInt32VarX>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> () returnType:<root>.CInt32VarX<T of <root>.CInt32VarX> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
@@ -44,14 +44,14 @@ FILE fqName:<root> fileName:/integerCoercionToT.kt
PROPERTY name:value visibility:public modality:FINAL [var]
FUN name:<get-value> visibility:public modality:FINAL <T_INT> ($receiver:<root>.CInt32VarX<T_INT of <root>.<get-value>>) returnType:T_INT of <root>.<get-value>
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CInt32VarX<T_INT of <root>.<get-value>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> <T_INT> (): T_INT of <root>.<get-value> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
FUN name:<set-value> visibility:public modality:FINAL <T_INT> ($receiver:<root>.CInt32VarX<T_INT of <root>.<set-value>>, value:T_INT of <root>.<get-value>) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CInt32VarX<T_INT of <root>.<set-value>>
VALUE_PARAMETER name:value index:0 type:T_INT of <root>.<get-value>
BLOCK_BODY
@@ -15,14 +15,14 @@ FILE fqName:<root> fileName:/integerCoercionToT.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:reinterpret visibility:public modality:FINAL <T> ($receiver:<root>.CPointed) returnType:T of <root>.reinterpret [inline]
TYPE_PARAMETER name:T index:0 variance: superTypes:[<root>.CPointed]
TYPE_PARAMETER name:T index:0 variance: superTypes:[<root>.CPointed] reified:true
$receiver: VALUE_PARAMETER name:<this> type:<root>.CPointed
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun reinterpret <T> (): T of <root>.reinterpret [inline] declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
CLASS CLASS name:CInt32VarX modality:FINAL visibility:public superTypes:[<root>.CPointed]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CInt32VarX<T of <root>.CInt32VarX>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> () returnType:<root>.CInt32VarX<T of <root>.CInt32VarX> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
@@ -44,14 +44,14 @@ FILE fqName:<root> fileName:/integerCoercionToT.kt
PROPERTY name:value visibility:public modality:FINAL [var]
FUN name:<get-value> visibility:public modality:FINAL <T_INT> ($receiver:<root>.CInt32VarX<T_INT of <root>.<get-value>>) returnType:T_INT of <root>.<get-value>
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CInt32VarX<T_INT of <root>.<get-value>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> <T_INT> (): T_INT of <root>.<get-value> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
FUN name:<set-value> visibility:public modality:FINAL <T_INT> ($receiver:<root>.CInt32VarX<T_INT of <root>.<set-value>>, value:T_INT of <root>.<set-value>) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CInt32VarX<T_INT of <root>.<set-value>>
VALUE_PARAMETER name:value index:0 type:T_INT of <root>.<set-value>
BLOCK_BODY
+4 -4
View File
@@ -3,7 +3,7 @@ FILE fqName:<root> fileName:/kt45236.kt
sealedSubclasses:
CLASS CLASS name:Error modality:FINAL visibility:public [data] superTypes:[<root>.NetRequestStatus<T of <root>.NetRequestStatus.Error>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.NetRequestStatus<T of <root>.NetRequestStatus>
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any] reified:false
CONSTRUCTOR visibility:protected <> () returnType:<root>.NetRequestStatus<T of <root>.NetRequestStatus> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
@@ -14,7 +14,7 @@ FILE fqName:<root> fileName:/kt45236.kt
$this: VALUE_PARAMETER name:<this> type:<root>.NetRequestStatus<T of <root>.NetRequestStatus>
CLASS CLASS name:Error modality:FINAL visibility:public [data] superTypes:[<root>.NetRequestStatus<T of <root>.NetRequestStatus.Error>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error>
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any] reified:false
CONSTRUCTOR visibility:public <> (error:kotlin.Throwable, value:T of <root>.NetRequestStatus.Error?) returnType:<root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error> [primary]
VALUE_PARAMETER name:error index:0 type:kotlin.Throwable
VALUE_PARAMETER name:value index:1 type:T of <root>.NetRequestStatus.Error?
@@ -182,14 +182,14 @@ FILE fqName:<root> fileName:/kt45236.kt
FUN name:isError visibility:public modality:FINAL <T> ($receiver:<root>.NetRequestStatus<T of <root>.isError>) returnType:kotlin.Boolean
annotations:
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalContracts modality:FINAL visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.contracts.ExperimentalContracts>])
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.NetRequestStatus<T of <root>.isError>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun isError <T> (): kotlin.Boolean declared in <root>'
TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.NetRequestStatus.Error<T of <root>.isError>
GET_VAR '<this>: <root>.NetRequestStatus<T of <root>.isError> declared in <root>.isError' type=<root>.NetRequestStatus<T of <root>.isError> origin=null
FUN name:successOrThrow visibility:public modality:FINAL <T> () returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] reified:false
BLOCK_BODY
VAR name:nextTerminal type:<root>.NetRequestStatus<T of <root>.successOrThrow> [val]
CONSTRUCTOR_CALL 'public constructor <init> (error: kotlin.Throwable, value: T of <root>.NetRequestStatus.Error?) [primary] declared in <root>.NetRequestStatus.Error' type=<root>.NetRequestStatus.Error<T of <root>.successOrThrow> origin=null
+4 -4
View File
@@ -3,7 +3,7 @@ FILE fqName:<root> fileName:/kt45236.kt
sealedSubclasses:
CLASS CLASS name:Error modality:FINAL visibility:public [data] superTypes:[<root>.NetRequestStatus<T of <root>.NetRequestStatus.Error>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.NetRequestStatus<T of <root>.NetRequestStatus>
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any] reified:false
CONSTRUCTOR visibility:protected <> () returnType:<root>.NetRequestStatus<T of <root>.NetRequestStatus> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
@@ -14,7 +14,7 @@ FILE fqName:<root> fileName:/kt45236.kt
$this: VALUE_PARAMETER name:<this> type:<root>.NetRequestStatus<T of <root>.NetRequestStatus>
CLASS CLASS name:Error modality:FINAL visibility:public [data] superTypes:[<root>.NetRequestStatus<T of <root>.NetRequestStatus.Error>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error>
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any] reified:false
CONSTRUCTOR visibility:public <> (error:kotlin.Throwable, value:T of <root>.NetRequestStatus.Error?) returnType:<root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error> [primary]
VALUE_PARAMETER name:error index:0 type:kotlin.Throwable
VALUE_PARAMETER name:value index:1 type:T of <root>.NetRequestStatus.Error?
@@ -182,7 +182,7 @@ FILE fqName:<root> fileName:/kt45236.kt
FUN name:isError visibility:public modality:FINAL <T> ($receiver:<root>.NetRequestStatus<T of <root>.isError>) returnType:kotlin.Boolean
annotations:
OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalContracts modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<kotlin.contracts.ExperimentalContracts>])
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.NetRequestStatus<T of <root>.isError>
BLOCK_BODY
CALL 'public final fun contract (builder: @[ExtensionFunctionType] kotlin.Function1<kotlin.contracts.ContractBuilder, kotlin.Unit>): kotlin.Unit [inline] declared in kotlin.contracts.ContractBuilderKt' type=kotlin.Unit origin=null
@@ -201,7 +201,7 @@ FILE fqName:<root> fileName:/kt45236.kt
TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.NetRequestStatus.Error<T of <root>.isError>
GET_VAR '<this>: <root>.NetRequestStatus<T of <root>.isError> declared in <root>.isError' type=<root>.NetRequestStatus<T of <root>.isError> origin=null
FUN name:successOrThrow visibility:public modality:FINAL <T> () returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] reified:false
BLOCK_BODY
VAR name:nextTerminal type:<root>.NetRequestStatus<T of <root>.successOrThrow> [val]
CONSTRUCTOR_CALL 'public constructor <init> (error: kotlin.Throwable, value: T of <root>.NetRequestStatus.Error?) [primary] declared in <root>.NetRequestStatus.Error' type=<root>.NetRequestStatus.Error<T of <root>.successOrThrow> origin=null
@@ -1,14 +1,14 @@
FILE fqName:<root> fileName:/newInferenceFixationOrder1.kt
FUN name:foo visibility:public modality:FINAL <X, Y> () returnType:kotlin.Function1<X of <root>.foo, Y of <root>.foo>
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:Y index:1 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:Y index:1 variance: superTypes:[kotlin.Any?] reified:false
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo <X, Y> (): kotlin.Function1<X of <root>.foo, Y of <root>.foo> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
CLASS INTERFACE name:Inv2 modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Inv2<A of <root>.Inv2, B of <root>.Inv2>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
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 [operator] declared in kotlin.Any
@@ -23,8 +23,8 @@ FILE fqName:<root> fileName:/newInferenceFixationOrder1.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:check visibility:public modality:FINAL <T, R> (x:T of <root>.check, y:R of <root>.check, f:kotlin.Function1<T of <root>.check, R of <root>.check>) returnType:<root>.Inv2<T of <root>.check, R of <root>.check>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:R index:1 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:R index:1 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:x index:0 type:T of <root>.check
VALUE_PARAMETER name:y index:1 type:R of <root>.check
VALUE_PARAMETER name:f index:2 type:kotlin.Function1<T of <root>.check, R of <root>.check>
@@ -1,11 +1,11 @@
FILE fqName:<root> fileName:/typeAliasCtorForGenericClass.kt
TYPEALIAS name:B visibility:public expandedType:<root>.A<X of <root>.B>
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:B2 visibility:public expandedType:<root>.A<<root>.A<T of <root>.B2>>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<Q of <root>.A>
TYPE_PARAMETER name:Q index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:Q index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (q:Q of <root>.A) returnType:<root>.A<Q of <root>.A> [primary]
VALUE_PARAMETER name:q index:0 type:Q of <root>.A
BLOCK_BODY
@@ -1,7 +1,7 @@
FILE fqName:<root> fileName:/typeAliasCtorForGenericClass.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<Q of <root>.A>
TYPE_PARAMETER name:Q index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:Q index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (q:Q of <root>.A) returnType:<root>.A<Q of <root>.A> [primary]
VALUE_PARAMETER name:q index:0 type:Q of <root>.A
BLOCK_BODY
@@ -32,9 +32,9 @@ FILE fqName:<root> fileName:/typeAliasCtorForGenericClass.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:B visibility:public expandedType:<root>.A<X of <root>.B>
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:B2 visibility:public expandedType:<root>.A<<root>.A<T of <root>.B2>>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:b type:<root>.A<kotlin.Int>{ <root>.B<kotlin.Int> } [val]
@@ -1,6 +1,6 @@
FILE fqName:<root> fileName:/typeParametersInImplicitCast.kt
FUN name:problematic visibility:public modality:FINAL <T> (lss:kotlin.collections.List<kotlin.collections.List<T of <root>.problematic>>) returnType:kotlin.collections.List<T of <root>.problematic>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:lss index:0 type:kotlin.collections.List<kotlin.collections.List<T of <root>.problematic>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun problematic <T> (lss: kotlin.collections.List<kotlin.collections.List<T of <root>.problematic>>): kotlin.collections.List<T of <root>.problematic> declared in <root>'
@@ -1,6 +1,6 @@
FILE fqName:<root> fileName:/typeParametersInImplicitCast.kt
FUN name:problematic visibility:public modality:FINAL <T> (lss:kotlin.collections.List<kotlin.collections.List<T of <root>.problematic>>) returnType:kotlin.collections.List<T of <root>.problematic>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
VALUE_PARAMETER name:lss index:0 type:kotlin.collections.List<kotlin.collections.List<T of <root>.problematic>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun problematic <T> (lss: kotlin.collections.List<kotlin.collections.List<T of <root>.problematic>>): kotlin.collections.List<T of <root>.problematic> declared in <root>'