JVM_IR fix inline class <-> collection stubs issues

Move collectionStubMethodLowering before jvmInlineClassPhase, and make
them interact properly.

Note that some issues still remain in inline class <-> special bridges
interaction.

KT-40187 KT-42469
This commit is contained in:
Dmitry Petrov
2020-10-06 15:06:20 +03:00
parent 2573eaa77f
commit b1bd138afb
49 changed files with 1941 additions and 26 deletions
@@ -0,0 +1,15 @@
inline class IT(val x: Int)
inline class InlineMutableSet(private val ms: MutableSet<IT>) : MutableSet<IT> {
override val size: Int get() = ms.size
override fun contains(element: IT): Boolean = ms.contains(element)
override fun containsAll(elements: Collection<IT>): Boolean = ms.containsAll(elements)
override fun isEmpty(): Boolean = ms.isEmpty()
override fun add(element: IT): Boolean = ms.add(element)
override fun addAll(elements: Collection<IT>): Boolean = ms.addAll(elements)
override fun clear() { ms.clear() }
override fun iterator(): MutableIterator<IT> = ms.iterator()
override fun remove(element: IT): Boolean = ms.remove(element)
override fun removeAll(elements: Collection<IT>): Boolean = ms.removeAll(elements)
override fun retainAll(elements: Collection<IT>): Boolean = ms.retainAll(elements)
}