Psi2ir: do not sort descriptors for fake override generation

Descriptors are already supposed to be sorted in scopes. The problem is
that rendering descriptors for sorting takes a lot of time (~1.5% of
total compilation time of intellij with JVM IR), and simple heuristics,
like comparing by names first, don't fully help with it.

 #KT-48233
This commit is contained in:
Alexander Udalov
2021-08-26 00:11:00 +02:00
parent cc52832943
commit ffe0d9de70
59 changed files with 2205 additions and 2242 deletions
@@ -1,5 +1,5 @@
interface IBase<A : Any?> {
abstract fun <B : Any?> foo(a: A, b: B)
abstract fun <B : Any?> foo(a: A, b: B)
abstract val <C : Any?> C.id: Map<A, C>?
abstract get
@@ -17,10 +17,6 @@ class Test1<E : Any?> : IBase<E> {
}
private /* final field */ val $$delegate_0: IBase<E> = i
override fun <B : Any?> foo(a: E, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
override val <C : Any?> C.id: Map<E, C>?
override get(): Map<E, C>? {
return (<this>.#$$delegate_0, <this>).<get-id><C>()
@@ -34,6 +30,10 @@ class Test1<E : Any?> : IBase<E> {
(<this>.#$$delegate_0, <this>).<set-x><D>(<set-?> = <set-?>)
}
override fun <B : Any?> foo(a: E, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
}
class Test2 : IBase<String> {
@@ -49,10 +49,6 @@ class Test2 : IBase<String> {
set
private /* final field */ val $$delegate_0: IBase<String> = j
override fun <B : Any?> foo(a: String, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
override val <C : Any?> C.id: Map<String, C>?
override get(): Map<String, C>? {
return (<this>.#$$delegate_0, <this>).<get-id><C>()
@@ -66,5 +62,8 @@ class Test2 : IBase<String> {
(<this>.#$$delegate_0, <this>).<set-x><D>(<set-?> = <set-?>)
}
}
override fun <B : Any?> foo(a: String, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
}