Fix IrFunction.isEmptyArray implementation

The previous one was incorrect for K1 since parent of top-level function
is `IrClass`, not `IrPackageFragment`.

The change is non-functional, K1 still worked correctly, but had to do
some extra work when inlining `emptyArray` calls and produces less
performant bytecode.
This commit is contained in:
vladislav.grechko
2024-02-21 14:04:07 +01:00
committed by Space Team
parent 224a4e1e3c
commit f32367d2c2
26 changed files with 70 additions and 219 deletions
@@ -7,54 +7,3 @@ MODULE main
<set-?>: kotlin/Int
K2
value: kotlin/Int
Annotation: class.invisibleAnnotations
K1
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
arrayDequeRemoveAll.kt
Kotlin
*S Kotlin
*F
+ 1 arrayDequeRemoveAll.kt
ArrayDeque
+ 2 ArraysJVM.kt
kotlin/collections/ArraysKt__ArraysJVMKt
+ 3 ArrayIntrinsics.kt
kotlin/ArrayIntrinsicsKt
*L
1#1,114:1
53#1,48:117
37#2,2:115
26#3:165
*S KotlinDebug
*F
+ 1 arrayDequeRemoveAll.kt
ArrayDeque
*L
50#1:117,48
13#1:115,2
104#1:165
*E
} )
K2
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
arrayDequeRemoveAll.kt
Kotlin
*S Kotlin
*F
+ 1 arrayDequeRemoveAll.kt
ArrayDeque
+ 2 ArraysJVM.kt
kotlin/collections/ArraysKt__ArraysJVMKt
*L
1#1,114:1
53#1,48:117
37#2,2:115
*S KotlinDebug
*F
+ 1 arrayDequeRemoveAll.kt
ArrayDeque
*L
50#1:117,48
13#1:115,2
*E
} )
@@ -1,5 +1,5 @@
// WITH_STDLIB
// JVM_ABI_K1_K2_DIFF: KT-62464, KT-63984
// JVM_ABI_K1_K2_DIFF: KT-63984
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
class ArrayDeque<E> : AbstractMutableList<E> {