JVM_IR fix 'remove' in inline class implementing MutableCollection
This commit is contained in:
+99
@@ -0,0 +1,99 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: javaCollectionWithRemovePrimitiveInt.kt
|
||||
|
||||
fun box(): String {
|
||||
val j = JIntCollection(arrayListOf(1, 2, 3))
|
||||
j.remove(1) // remove(int)
|
||||
if (j.removed != 1) throw AssertionError("${j.removed}")
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: JIntCollection.java
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class JIntCollection implements Collection<Integer> {
|
||||
private final Collection<Integer> collection;
|
||||
public int removed = 0;
|
||||
|
||||
public JIntCollection(Collection<Integer> collection) {
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return collection.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return collection.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(Object o) {
|
||||
return collection.contains(o);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Iterator<Integer> iterator() {
|
||||
return collection.iterator();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return collection.toArray();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public <T> T[] toArray(@NotNull T[] a) {
|
||||
return collection.toArray(a);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean add(Integer integer) {
|
||||
return collection.add(integer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Object o) {
|
||||
return collection.remove(o);
|
||||
}
|
||||
|
||||
public boolean remove(int x) {
|
||||
removed = x;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAll(@NotNull Collection<?> c) {
|
||||
return collection.containsAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(@NotNull Collection<? extends Integer> c) {
|
||||
return collection.addAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeAll(@NotNull Collection<?> c) {
|
||||
return collection.removeAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAll(@NotNull Collection<?> c) {
|
||||
return collection.retainAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
collection.clear();
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
inline class Z2(val x: Z)
|
||||
|
||||
fun z2(x: Int) = Z2(Z(x))
|
||||
|
||||
inline class ZMutableCollection(private val ms: MutableCollection<Z>) : MutableCollection<Z> {
|
||||
override fun add(element: Z): Boolean = ms.add(element)
|
||||
override fun addAll(elements: Collection<Z>): Boolean = ms.addAll(elements)
|
||||
override fun clear() { ms.clear() }
|
||||
override fun iterator(): MutableIterator<Z> = ms.iterator()
|
||||
override fun remove(element: Z): Boolean = ms.remove(element)
|
||||
override fun removeAll(elements: Collection<Z>): Boolean = ms.removeAll(elements)
|
||||
override fun retainAll(elements: Collection<Z>): Boolean = ms.retainAll(elements)
|
||||
override val size: Int get() = ms.size
|
||||
override fun contains(element: Z): Boolean = ms.contains(element)
|
||||
override fun containsAll(elements: Collection<Z>): Boolean = ms.containsAll(elements)
|
||||
override fun isEmpty(): Boolean = ms.isEmpty()
|
||||
}
|
||||
|
||||
inline class Z2MutableCollection(private val ms: MutableCollection<Z2>) : MutableCollection<Z2> {
|
||||
override fun add(element: Z2): Boolean = ms.add(element)
|
||||
override fun addAll(elements: Collection<Z2>): Boolean = ms.addAll(elements)
|
||||
override fun clear() { ms.clear() }
|
||||
override fun iterator(): MutableIterator<Z2> = ms.iterator()
|
||||
override fun remove(element: Z2): Boolean = ms.remove(element)
|
||||
override fun removeAll(elements: Collection<Z2>): Boolean = ms.removeAll(elements)
|
||||
override fun retainAll(elements: Collection<Z2>): Boolean = ms.retainAll(elements)
|
||||
override val size: Int get() = ms.size
|
||||
override fun contains(element: Z2): Boolean = ms.contains(element)
|
||||
override fun containsAll(elements: Collection<Z2>): Boolean = ms.containsAll(elements)
|
||||
override fun isEmpty(): Boolean = ms.isEmpty()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val zc1 = ZMutableCollection(mutableListOf(Z(1), Z(2), Z(3)))
|
||||
zc1.remove(Z(1))
|
||||
if (Z(1) in zc1) throw AssertionError("Z(1) in zc1")
|
||||
|
||||
val zc2 = Z2MutableCollection(mutableListOf(z2(1), z2(2), z2(3)))
|
||||
zc2.remove(z2(1))
|
||||
if (z2(1) in zc2) throw AssertionError("z2(1) in zc2")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
-5
@@ -1,11 +1,6 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TODO KT-42067 JVM_IR generates extra bridges:
|
||||
// public bridge final method entrySet(): MyMap$MySet
|
||||
// public bridge final method keySet(): MyMap$MySet
|
||||
// public bridge final method values(): java.util.ArrayList
|
||||
class MyMap<K, V> : Map<K, V> {
|
||||
|
||||
class MySet<E> : Set<E> {
|
||||
|
||||
Vendored
+46
@@ -0,0 +1,46 @@
|
||||
@kotlin.Metadata
|
||||
public final class MyMap$MySet {
|
||||
// source: 'noStubsForMapImplementations.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public final inner class MyMap$MySet
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyMap {
|
||||
// source: 'noStubsForMapImplementations.kt'
|
||||
public method <init>(): void
|
||||
public method clear(): void
|
||||
public method containsKey(p0: java.lang.Object): boolean
|
||||
public method containsValue(p0: java.lang.Object): boolean
|
||||
public bridge final method entrySet(): MyMap$MySet
|
||||
public synthetic bridge method entrySet(): java.util.Set
|
||||
public method get(p0: java.lang.Object): java.lang.Object
|
||||
public @org.jetbrains.annotations.NotNull method getEntries(): MyMap$MySet
|
||||
public @org.jetbrains.annotations.NotNull method getKeys(): MyMap$MySet
|
||||
public method getSize(): int
|
||||
public @org.jetbrains.annotations.NotNull method getValues(): java.util.ArrayList
|
||||
public method isEmpty(): boolean
|
||||
public bridge final method keySet(): MyMap$MySet
|
||||
public synthetic bridge method keySet(): java.util.Set
|
||||
public method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object
|
||||
public method putAll(p0: java.util.Map): void
|
||||
public method remove(p0: java.lang.Object): java.lang.Object
|
||||
public bridge final method size(): int
|
||||
public bridge final method values(): java.util.ArrayList
|
||||
public synthetic bridge method values(): java.util.Collection
|
||||
public final inner class MyMap$MySet
|
||||
}
|
||||
Vendored
+1
@@ -68,6 +68,7 @@ public final class InlineMap {
|
||||
public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object
|
||||
public method put-pjrbk2k(p0: int, p1: double): IV
|
||||
public method putAll(p0: java.util.Map): void
|
||||
public bridge final method remove(p0: java.lang.Object): IV
|
||||
public synthetic bridge method remove(p0: java.lang.Object): java.lang.Object
|
||||
public method remove-i7hxwoc(p0: java.lang.Object): IV
|
||||
public synthetic bridge method size(): int
|
||||
|
||||
-2
@@ -1,6 +1,4 @@
|
||||
// IGNORE_ANNOTATIONS
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// ^ TODO: special bridges <-> inline classes interaction
|
||||
|
||||
inline class IT(val x: Int)
|
||||
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
public final class IT {
|
||||
// source: 'mutableCollection.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): IT
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
public final class InlineMutableCollection {
|
||||
// source: 'mutableCollection.kt'
|
||||
private final field mc: java.util.Collection
|
||||
private synthetic method <init>(p0: java.util.Collection): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add-jHY5zpA(p0: int): boolean
|
||||
public static method add-jHY5zpA(p0: java.util.Collection, p1: int): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public static method addAll-impl(p0: java.util.Collection, p1: java.util.Collection): boolean
|
||||
public synthetic final static method box-impl(p0: java.util.Collection): InlineMutableCollection
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Collection): void
|
||||
public static method constructor-impl(p0: java.util.Collection): java.util.Collection
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public method contains-jHY5zpA(p0: int): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.Collection, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
public static method containsAll-impl(p0: java.util.Collection, p1: java.util.Collection): boolean
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.util.Collection, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.util.Collection, p1: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public static method getSize-impl(p0: java.util.Collection): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.util.Collection): int
|
||||
public method isEmpty(): boolean
|
||||
public static method isEmpty-impl(p0: java.util.Collection): boolean
|
||||
public method iterator(): java.util.Iterator
|
||||
public static method iterator-impl(p0: java.util.Collection): java.util.Iterator
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method remove-jHY5zpA(p0: IT): boolean
|
||||
public static method remove-jHY5zpA(p0: java.util.Collection, p1: IT): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public static method removeAll-impl(p0: java.util.Collection, p1: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public static method retainAll-impl(p0: java.util.Collection, p1: java.util.Collection): boolean
|
||||
public synthetic bridge method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.util.Collection): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.util.Collection
|
||||
}
|
||||
+1
-1
@@ -64,7 +64,7 @@ public final class InlineMutableList {
|
||||
public static method listIterator-impl(p0: java.util.List, p1: int): java.util.ListIterator
|
||||
public synthetic bridge method remove(p0: int): java.lang.Object
|
||||
public bridge final method remove(p0: int): long
|
||||
public synthetic bridge method remove(p0: java.lang.Object): boolean
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public static method remove-jHY5zpA(p0: java.util.List, p1: long): boolean
|
||||
public method remove-jHY5zpA(p0: long): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ public final class InlineMutableMap {
|
||||
public static method put-pjrbk2k(p0: java.util.Map, p1: int, p2: double): IV
|
||||
public method putAll(p0: java.util.Map): void
|
||||
public static method putAll-impl(p0: java.util.Map, p1: java.util.Map): void
|
||||
public bridge final method remove(p0: java.lang.Object): IV
|
||||
public synthetic bridge method remove(p0: java.lang.Object): java.lang.Object
|
||||
public method remove-FSIWiWE(p0: int): IV
|
||||
public static method remove-FSIWiWE(p0: java.util.Map, p1: int): IV
|
||||
|
||||
Vendored
-2
@@ -1,6 +1,4 @@
|
||||
// IGNORE_ANNOTATIONS
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// ^ TODO: special bridges <-> inline classes interaction
|
||||
|
||||
inline class IT(val x: Int)
|
||||
|
||||
|
||||
compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet2.kt
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// IGNORE_ANNOTATIONS
|
||||
|
||||
inline class IT(val x: Int)
|
||||
|
||||
inline class IT2(val x: IT)
|
||||
|
||||
inline class InlineMutableSet2(private val ms: MutableSet<IT2>) : MutableSet<IT2> {
|
||||
override val size: Int get() = ms.size
|
||||
override fun contains(element: IT2): Boolean = ms.contains(element)
|
||||
override fun containsAll(elements: Collection<IT2>): Boolean = ms.containsAll(elements)
|
||||
override fun isEmpty(): Boolean = ms.isEmpty()
|
||||
override fun add(element: IT2): Boolean = ms.add(element)
|
||||
override fun addAll(elements: Collection<IT2>): Boolean = ms.addAll(elements)
|
||||
override fun clear() { ms.clear() }
|
||||
override fun iterator(): MutableIterator<IT2> = ms.iterator()
|
||||
override fun remove(element: IT2): Boolean = ms.remove(element)
|
||||
override fun removeAll(elements: Collection<IT2>): Boolean = ms.removeAll(elements)
|
||||
override fun retainAll(elements: Collection<IT2>): Boolean = ms.retainAll(elements)
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
public final class IT {
|
||||
// source: 'mutableSet2.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): IT
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
public final class IT2 {
|
||||
// source: 'mutableSet2.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): IT2
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX-XAcLw3A(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
public final class InlineMutableSet2 {
|
||||
// source: 'mutableSet2.kt'
|
||||
private final field ms: java.util.Set
|
||||
private synthetic method <init>(p0: java.util.Set): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add-C2ZI6mw(p0: int): boolean
|
||||
public static method add-C2ZI6mw(p0: java.util.Set, p1: int): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public static method addAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public synthetic final static method box-impl(p0: java.util.Set): InlineMutableSet2
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Set): void
|
||||
public static method constructor-impl(p0: java.util.Set): java.util.Set
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-C2ZI6mw(p0: int): boolean
|
||||
public static method contains-C2ZI6mw(p0: java.util.Set, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
public static method containsAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.util.Set, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.util.Set, p1: java.util.Set): boolean
|
||||
public method getSize(): int
|
||||
public static method getSize-impl(p0: java.util.Set): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.util.Set): int
|
||||
public method isEmpty(): boolean
|
||||
public static method isEmpty-impl(p0: java.util.Set): boolean
|
||||
public method iterator(): java.util.Iterator
|
||||
public static method iterator-impl(p0: java.util.Set): java.util.Iterator
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method remove-C2ZI6mw(p0: IT2): boolean
|
||||
public static method remove-C2ZI6mw(p0: java.util.Set, p1: IT2): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public static method removeAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public static method retainAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.util.Set): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.util.Set
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
public final class IT {
|
||||
// source: 'mutableSet2.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): IT
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
public final class IT2 {
|
||||
// source: 'mutableSet2.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): IT2
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX-XAcLw3A(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
public final class InlineMutableSet2 {
|
||||
// source: 'mutableSet2.kt'
|
||||
private final field ms: java.util.Set
|
||||
private synthetic method <init>(p0: java.util.Set): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add-C2ZI6mw(p0: int): boolean
|
||||
public static method add-C2ZI6mw(p0: java.util.Set, p1: int): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public static method addAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public synthetic final static method box-impl(p0: java.util.Set): InlineMutableSet2
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Set): void
|
||||
public static method constructor-impl(p0: java.util.Set): java.util.Set
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public method contains-C2ZI6mw(p0: int): boolean
|
||||
public static method contains-C2ZI6mw(p0: java.util.Set, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
public static method containsAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.util.Set, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.util.Set, p1: java.util.Set): boolean
|
||||
public method getSize(): int
|
||||
public static method getSize-impl(p0: java.util.Set): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.util.Set): int
|
||||
public method isEmpty(): boolean
|
||||
public static method isEmpty-impl(p0: java.util.Set): boolean
|
||||
public method iterator(): java.util.Iterator
|
||||
public static method iterator-impl(p0: java.util.Set): java.util.Iterator
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method remove-C2ZI6mw(p0: IT2): boolean
|
||||
public static method remove-C2ZI6mw(p0: java.util.Set, p1: IT2): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public static method removeAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public static method retainAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public synthetic bridge method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.util.Set): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.util.Set
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
public final class IT {
|
||||
// source: 'mutableSet.kt'
|
||||
private final field x: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): IT
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getX(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
public final class InlineMutableSet {
|
||||
// source: 'mutableSet.kt'
|
||||
private final field ms: java.util.Set
|
||||
private synthetic method <init>(p0: java.util.Set): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add-jHY5zpA(p0: int): boolean
|
||||
public static method add-jHY5zpA(p0: java.util.Set, p1: int): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public static method addAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public synthetic final static method box-impl(p0: java.util.Set): InlineMutableSet
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Set): void
|
||||
public static method constructor-impl(p0: java.util.Set): java.util.Set
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public method contains-jHY5zpA(p0: int): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.Set, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
public static method containsAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.util.Set, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.util.Set, p1: java.util.Set): boolean
|
||||
public method getSize(): int
|
||||
public static method getSize-impl(p0: java.util.Set): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.util.Set): int
|
||||
public method isEmpty(): boolean
|
||||
public static method isEmpty-impl(p0: java.util.Set): boolean
|
||||
public method iterator(): java.util.Iterator
|
||||
public static method iterator-impl(p0: java.util.Set): java.util.Iterator
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method remove-jHY5zpA(p0: IT): boolean
|
||||
public static method remove-jHY5zpA(p0: java.util.Set, p1: IT): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public static method removeAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public static method retainAll-impl(p0: java.util.Set, p1: java.util.Collection): boolean
|
||||
public synthetic bridge method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: java.util.Set): java.lang.String
|
||||
public synthetic final method unbox-impl(): java.util.Set
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
class IntMutableCollection(private val mc: MutableCollection<Int>) : MutableCollection<Int> {
|
||||
override val size: Int get() = mc.size
|
||||
override fun contains(element: Int): Boolean = mc.contains(element)
|
||||
override fun containsAll(elements: Collection<Int>): Boolean = mc.containsAll(elements)
|
||||
override fun isEmpty(): Boolean = mc.isEmpty()
|
||||
override fun add(element: Int): Boolean = mc.add(element)
|
||||
override fun addAll(elements: Collection<Int>): Boolean = mc.addAll(elements)
|
||||
override fun clear() { mc.clear() }
|
||||
override fun iterator(): MutableIterator<Int> = mc.iterator()
|
||||
override fun remove(element: Int): Boolean = mc.remove(element)
|
||||
override fun removeAll(elements: Collection<Int>): Boolean = mc.removeAll(elements)
|
||||
override fun retainAll(elements: Collection<Int>): Boolean = mc.retainAll(elements)
|
||||
}
|
||||
|
||||
class LongMutableCollection(private val mc: MutableCollection<Long>) : MutableCollection<Long> {
|
||||
override val size: Int get() = mc.size
|
||||
override fun contains(element: Long): Boolean = mc.contains(element)
|
||||
override fun containsAll(elements: Collection<Long>): Boolean = mc.containsAll(elements)
|
||||
override fun isEmpty(): Boolean = mc.isEmpty()
|
||||
override fun add(element: Long): Boolean = mc.add(element)
|
||||
override fun addAll(elements: Collection<Long>): Boolean = mc.addAll(elements)
|
||||
override fun clear() { mc.clear() }
|
||||
override fun iterator(): MutableIterator<Long> = mc.iterator()
|
||||
override fun remove(element: Long): Boolean = mc.remove(element)
|
||||
override fun removeAll(elements: Collection<Long>): Boolean = mc.removeAll(elements)
|
||||
override fun retainAll(elements: Collection<Long>): Boolean = mc.retainAll(elements)
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
@kotlin.Metadata
|
||||
public final class IntMutableCollection {
|
||||
// source: 'mutableCollectionOfPrimitive.kt'
|
||||
private final field mc: java.util.Collection
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.Collection): void
|
||||
public method add(p0: int): boolean
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method addAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: int): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public method remove(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): boolean
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method retainAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class LongMutableCollection {
|
||||
// source: 'mutableCollectionOfPrimitive.kt'
|
||||
private final field mc: java.util.Collection
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.Collection): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: long): boolean
|
||||
public method addAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains(p0: long): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method remove(p0: long): boolean
|
||||
public method removeAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method retainAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
@kotlin.Metadata
|
||||
public final class IntMutableCollection {
|
||||
// source: 'mutableCollectionOfPrimitive.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field mc: java.util.Collection
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.Collection): void
|
||||
public method add(p0: int): boolean
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method addAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: int): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public method remove(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): boolean
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method retainAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class LongMutableCollection {
|
||||
// source: 'mutableCollectionOfPrimitive.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field mc: java.util.Collection
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.Collection): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: long): boolean
|
||||
public method addAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains(p0: long): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public bridge final method remove(p0: java.lang.Object): boolean
|
||||
public method remove(p0: long): boolean
|
||||
public method removeAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method retainAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
Reference in New Issue
Block a user