K1: Change how Kotlin sees some of the new JDK 21 collections members

- Make addFirst/Last and removeFirst/removeLast as members
- Leave getFirst/getLast unprocessed, thus visible for K1, but marked
as deprecated

Though the implementations of getFirst/getLast and synthetic property
access to them are expected to be deprecated as well, it's expected
to be fixed in later commits.

^KT-60659 In Progress
^KT-60769 In Progress
This commit is contained in:
Denis.Zharkov
2023-07-28 13:58:52 +02:00
committed by Space Team
parent d99f8ac9b4
commit 1e86a82ee1
8 changed files with 216 additions and 28 deletions
@@ -27,12 +27,6 @@ object JvmBuiltInsSignatures {
"List",
"sort(Ljava/util/Comparator;)V",
// From JDK 21
"addFirst(Ljava/lang/Object;)V",
"addLast(Ljava/lang/Object;)V",
"getFirst()Ljava/lang/Object;",
"getLast()Ljava/lang/Object;",
"removeFirst()Ljava/lang/Object;",
"removeLast()Ljava/lang/Object;",
"reversed()Ljava/util/List;",
) +
@@ -108,7 +102,12 @@ object JvmBuiltInsSignatures {
inJavaUtil(
"List",
"replaceAll(Ljava/util/function/UnaryOperator;)V"
"replaceAll(Ljava/util/function/UnaryOperator;)V",
// From JDK 21
"addFirst(Ljava/lang/Object;)V",
"addLast(Ljava/lang/Object;)V",
"removeFirst()Ljava/lang/Object;",
"removeLast()Ljava/lang/Object;",
) +
inJavaUtil(