Switch to the new stdlib source generation scheme

Remove old generated sources for stdlib-jvm and stdlib-js
This commit is contained in:
Ilya Gorbunov
2017-11-22 07:14:33 +03:00
parent ae62cd6570
commit 69ebb3bfb0
34 changed files with 12985 additions and 44466 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,54 @@
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("CollectionsKt")
@file:kotlin.jvm.JvmVersion
package kotlin.collections
//
// NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns a list containing all elements that are instances of specified class.
*/
public fun <R> Iterable<*>.filterIsInstance(klass: Class<R>): List<R> {
return filterIsInstanceTo(ArrayList<R>(), klass)
}
/**
* Appends all elements that are instances of specified class to the given [destination].
*/
public fun <C : MutableCollection<in R>, R> Iterable<*>.filterIsInstanceTo(destination: C, klass: Class<R>): C {
@Suppress("UNCHECKED_CAST")
for (element in this) if (klass.isInstance(element)) destination.add(element as R)
return destination
}
/**
* Reverses elements in the list in-place.
*/
public actual fun <T> MutableList<T>.reverse(): Unit {
java.util.Collections.reverse(this)
}
/**
* Returns a [SortedSet][java.util.SortedSet] of all elements.
*/
public fun <T: Comparable<T>> Iterable<T>.toSortedSet(): java.util.SortedSet<T> {
return toCollection(java.util.TreeSet<T>())
}
/**
* Returns a [SortedSet][java.util.SortedSet] of all elements.
*
* Elements in the set returned are sorted according to the given [comparator].
*/
public fun <T> Iterable<T>.toSortedSet(comparator: Comparator<in T>): java.util.SortedSet<T> {
return toCollection(java.util.TreeSet<T>(comparator))
}
@@ -0,0 +1,213 @@
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("ComparisonsKt")
@file:kotlin.jvm.JvmVersion
package kotlin.comparisons
//
// NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns the greater of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Byte, b: Byte): Byte {
return Math.max(a.toInt(), b.toInt()).toByte()
}
/**
* Returns the greater of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Short, b: Short): Short {
return Math.max(a.toInt(), b.toInt()).toShort()
}
/**
* Returns the greater of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Int, b: Int): Int {
return Math.max(a, b)
}
/**
* Returns the greater of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Long, b: Long): Long {
return Math.max(a, b)
}
/**
* Returns the greater of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Float, b: Float): Float {
return Math.max(a, b)
}
/**
* Returns the greater of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Double, b: Double): Double {
return Math.max(a, b)
}
/**
* Returns the greater of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Byte, b: Byte, c: Byte): Byte {
return Math.max(a.toInt(), Math.max(b.toInt(), c.toInt())).toByte()
}
/**
* Returns the greater of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Short, b: Short, c: Short): Short {
return Math.max(a.toInt(), Math.max(b.toInt(), c.toInt())).toShort()
}
/**
* Returns the greater of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Int, b: Int, c: Int): Int {
return maxOf(a, maxOf(b, c))
}
/**
* Returns the greater of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Float, b: Float, c: Float): Float {
return maxOf(a, maxOf(b, c))
}
/**
* Returns the greater of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Double, b: Double, c: Double): Double {
return maxOf(a, maxOf(b, c))
}
/**
* Returns the smaller of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Byte, b: Byte): Byte {
return Math.min(a.toInt(), b.toInt()).toByte()
}
/**
* Returns the smaller of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Short, b: Short): Short {
return Math.min(a.toInt(), b.toInt()).toShort()
}
/**
* Returns the smaller of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Int, b: Int): Int {
return Math.min(a, b)
}
/**
* Returns the smaller of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Long, b: Long): Long {
return Math.min(a, b)
}
/**
* Returns the smaller of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Float, b: Float): Float {
return Math.min(a, b)
}
/**
* Returns the smaller of two values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Double, b: Double): Double {
return Math.min(a, b)
}
/**
* Returns the smaller of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Byte, b: Byte, c: Byte): Byte {
return Math.min(a.toInt(), Math.min(b.toInt(), c.toInt())).toByte()
}
/**
* Returns the smaller of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Short, b: Short, c: Short): Short {
return Math.min(a.toInt(), Math.min(b.toInt(), c.toInt())).toShort()
}
/**
* Returns the smaller of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Int, b: Int, c: Int): Int {
return minOf(a, minOf(b, c))
}
/**
* Returns the smaller of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Float, b: Float, c: Float): Float {
return minOf(a, minOf(b, c))
}
/**
* Returns the smaller of three values.
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun minOf(a: Double, b: Double, c: Double): Double {
return minOf(a, minOf(b, c))
}
@@ -0,0 +1,57 @@
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("SequencesKt")
@file:kotlin.jvm.JvmVersion
package kotlin.sequences
//
// NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
import kotlin.coroutines.experimental.*
/**
* Returns a sequence containing all elements that are instances of specified class.
*
* The operation is _intermediate_ and _stateless_.
*/
public fun <R> Sequence<*>.filterIsInstance(klass: Class<R>): Sequence<R> {
@Suppress("UNCHECKED_CAST")
return filter { klass.isInstance(it) } as Sequence<R>
}
/**
* Appends all elements that are instances of specified class to the given [destination].
*
* The operation is _terminal_.
*/
public fun <C : MutableCollection<in R>, R> Sequence<*>.filterIsInstanceTo(destination: C, klass: Class<R>): C {
@Suppress("UNCHECKED_CAST")
for (element in this) if (klass.isInstance(element)) destination.add(element as R)
return destination
}
/**
* Returns a [SortedSet][java.util.SortedSet] of all elements.
*
* The operation is _terminal_.
*/
public fun <T: Comparable<T>> Sequence<T>.toSortedSet(): java.util.SortedSet<T> {
return toCollection(java.util.TreeSet<T>())
}
/**
* Returns a [SortedSet][java.util.SortedSet] of all elements.
*
* Elements in the set returned are sorted according to the given [comparator].
*
* The operation is _terminal_.
*/
public fun <T> Sequence<T>.toSortedSet(comparator: Comparator<in T>): java.util.SortedSet<T> {
return toCollection(java.util.TreeSet<T>(comparator))
}
@@ -0,0 +1,22 @@
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("StringsKt")
@file:kotlin.jvm.JvmVersion
package kotlin.text
//
// NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns a [SortedSet][java.util.SortedSet] of all characters.
*/
public fun CharSequence.toSortedSet(): java.util.SortedSet<Char> {
return toCollection(java.util.TreeSet<Char>())
}