Add JVM ABI K1/K2 consistency tests
This commit is contained in:
committed by
Space Team
parent
5a1fb78fcd
commit
34bac48541
+27
@@ -0,0 +1,27 @@
|
||||
MODULE main
|
||||
CLASS ListSet.class
|
||||
CLASS METADATA
|
||||
FUNCTION contains(Ljava/lang/Object;)Z
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(element: T#0)
|
||||
K2
|
||||
(element: @kotlin/UnsafeVariance T#0)
|
||||
FUNCTION containsAll(Ljava/util/Collection;)Z
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(elements: kotlin/collections/Collection<T#0>)
|
||||
K2
|
||||
(elements: kotlin/collections/Collection<@kotlin/UnsafeVariance T#0>)
|
||||
FUNCTION indexOf(Ljava/lang/Object;)I
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(element: T#0)
|
||||
K2
|
||||
(element: @kotlin/UnsafeVariance T#0)
|
||||
FUNCTION lastIndexOf(Ljava/lang/Object;)I
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(element: T#0)
|
||||
K2
|
||||
(element: @kotlin/UnsafeVariance T#0)
|
||||
@@ -1,6 +1,8 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63858
|
||||
|
||||
import java.util.*
|
||||
|
||||
class ListSet<out E : Any> : List<E>, Set<E> {
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
MODULE main
|
||||
CLASS DStringCollection.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DStringSet.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DStringList.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DStringMap.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
---
|
||||
K2
|
||||
entries
|
||||
K1
|
||||
getEntries()Ljava/util/Set;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getKeys()Ljava/util/Set;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getValues()Ljava/util/Collection;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
keys
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
K1
|
||||
---
|
||||
K2
|
||||
values
|
||||
CLASS DStringMapEntry.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getKey()Ljava/lang/String;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getValue()Ljava/lang/Number;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
key
|
||||
K1
|
||||
---
|
||||
K2
|
||||
value
|
||||
CLASS DStringCollectionBySet.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DStringCollectionByList.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63828
|
||||
class DStringIterator(d: Iterator<String>) : Iterator<String> by d
|
||||
|
||||
class DStringListIterator(d: ListIterator<String>) : ListIterator<String> by d
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
MODULE main
|
||||
CLASS DIntCollection.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DIntSet.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DIntList.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DIntMap.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
---
|
||||
K2
|
||||
entries
|
||||
K1
|
||||
getEntries()Ljava/util/Set;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getKeys()Ljava/util/Set;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getValues()Ljava/util/Collection;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
keys
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
K1
|
||||
---
|
||||
K2
|
||||
values
|
||||
CLASS DIntMapEntry.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getKey()Ljava/lang/Integer;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getValue()Ljava/lang/Double;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
key
|
||||
K1
|
||||
---
|
||||
K2
|
||||
value
|
||||
CLASS DIntCollectionBySet.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DIntCollectionByList.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// FULL_JDK
|
||||
// See also: https://youtrack.jetbrains.com/issue/KT-42330
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63828
|
||||
|
||||
class DIntIterator(d: Iterator<Int>) : Iterator<Int> by d
|
||||
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
MODULE main
|
||||
CLASS DGenericCollection.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DGenericSet.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DGenericList.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DGenericMap.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
---
|
||||
K2
|
||||
entries
|
||||
K1
|
||||
getEntries()Ljava/util/Set;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getKeys()Ljava/util/Set;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getValues()Ljava/util/Collection;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
keys
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
K1
|
||||
---
|
||||
K2
|
||||
values
|
||||
CLASS DGenericMapEntry.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getKey()Ljava/lang/Object;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
getValue()Ljava/lang/Object;
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
key
|
||||
K1
|
||||
---
|
||||
K2
|
||||
value
|
||||
CLASS DGenericCollectionBySet.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS DGenericCollectionByList.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// FULL_JDK
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63828
|
||||
|
||||
class DGenericIterator<T>(d: Iterator<T>) : Iterator<T> by d
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS MyList.class
|
||||
CLASS METADATA
|
||||
PROPERTY getElements()Ljava/util/ArrayList;
|
||||
Property: class.metadata.property.returnType
|
||||
K1
|
||||
java/util/ArrayList<T#0> /* = kotlin/collections/ArrayList^<T#0> */
|
||||
K2
|
||||
java/util/ArrayList<T#0>
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63864
|
||||
|
||||
class MyList<E> : List<E> {
|
||||
val elements = ArrayList<E>()
|
||||
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS MyList.class
|
||||
CLASS METADATA
|
||||
PROPERTY getElements()Ljava/util/ArrayList;
|
||||
Property: class.metadata.property.returnType
|
||||
K1
|
||||
java/util/ArrayList<T#0> /* = kotlin/collections/ArrayList^<T#0> */
|
||||
K2
|
||||
java/util/ArrayList<T#0>
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63864
|
||||
class MyList<E> : MutableList<E> {
|
||||
val elements = ArrayList<E>()
|
||||
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
MODULE main
|
||||
CLASS InternalToArray.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS PrivateToArray.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
CLASS PublicToArray.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63828
|
||||
class InternalToArray(d: Collection<Any>): Collection<Any> by d {
|
||||
internal fun toArray(): Array<Int> = null!!
|
||||
}
|
||||
|
||||
compiler/testData/codegen/bytecodeListing/collectionStubs/toArray/internalGenericToArray.jvm_abi.txt
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
MODULE main
|
||||
CLASS InternalGenericToArray.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
getSize()I
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
size
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63828
|
||||
class InternalGenericToArray<T>(d: Collection<T>): Collection<T> by d {
|
||||
internal fun <T> toArray(arr: Array<T>): Array<T> = null!!
|
||||
}
|
||||
Reference in New Issue
Block a user