feat: add polyfills insertion for ES Next used features

This commit is contained in:
Artem Kobzar
2022-02-16 10:49:11 +00:00
committed by Space
parent 76ff717091
commit 804eb61bf0
80 changed files with 8769 additions and 6552 deletions
@@ -1434,7 +1434,7 @@ public actual fun CharArray.copyOfRange(fromIndex: Int, toIndex: Int): CharArray
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun <T> Array<T>.fill(element: T, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1450,7 +1450,7 @@ public actual fun <T> Array<T>.fill(element: T, fromIndex: Int = 0, toIndex: Int
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun ByteArray.fill(element: Byte, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1466,7 +1466,7 @@ public actual fun ByteArray.fill(element: Byte, fromIndex: Int = 0, toIndex: Int
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun ShortArray.fill(element: Short, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1482,7 +1482,7 @@ public actual fun ShortArray.fill(element: Short, fromIndex: Int = 0, toIndex: I
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun IntArray.fill(element: Int, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1498,7 +1498,7 @@ public actual fun IntArray.fill(element: Int, fromIndex: Int = 0, toIndex: Int =
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun LongArray.fill(element: Long, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1514,7 +1514,7 @@ public actual fun LongArray.fill(element: Long, fromIndex: Int = 0, toIndex: Int
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun FloatArray.fill(element: Float, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1530,7 +1530,7 @@ public actual fun FloatArray.fill(element: Float, fromIndex: Int = 0, toIndex: I
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun DoubleArray.fill(element: Double, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1546,7 +1546,7 @@ public actual fun DoubleArray.fill(element: Double, fromIndex: Int = 0, toIndex:
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun BooleanArray.fill(element: Boolean, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1562,7 +1562,7 @@ public actual fun BooleanArray.fill(element: Boolean, fromIndex: Int = 0, toInde
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
public actual fun CharArray.fill(element: Char, fromIndex: Int = 0, toIndex: Int = size): Unit {
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
this.asDynamic().fill(element, fromIndex, toIndex);
nativeFill(element, fromIndex, toIndex);
}
/**
@@ -1805,7 +1805,7 @@ public actual inline fun <T> Array<out T>.plusElement(element: T): Array<T> {
* @sample samples.collections.Arrays.Sorting.sortArray
*/
public actual fun IntArray.sort(): Unit {
this.asDynamic().sort()
nativeSort()
}
/**
@@ -1824,7 +1824,7 @@ public actual fun LongArray.sort(): Unit {
* @sample samples.collections.Arrays.Sorting.sortArray
*/
public actual fun ByteArray.sort(): Unit {
this.asDynamic().sort()
nativeSort()
}
/**
@@ -1833,7 +1833,7 @@ public actual fun ByteArray.sort(): Unit {
* @sample samples.collections.Arrays.Sorting.sortArray
*/
public actual fun ShortArray.sort(): Unit {
this.asDynamic().sort()
nativeSort()
}
/**
@@ -1842,7 +1842,7 @@ public actual fun ShortArray.sort(): Unit {
* @sample samples.collections.Arrays.Sorting.sortArray
*/
public actual fun DoubleArray.sort(): Unit {
this.asDynamic().sort()
nativeSort()
}
/**
@@ -1851,7 +1851,7 @@ public actual fun DoubleArray.sort(): Unit {
* @sample samples.collections.Arrays.Sorting.sortArray
*/
public actual fun FloatArray.sort(): Unit {
this.asDynamic().sort()
nativeSort()
}
/**
@@ -1860,7 +1860,7 @@ public actual fun FloatArray.sort(): Unit {
* @sample samples.collections.Arrays.Sorting.sortArray
*/
public actual fun CharArray.sort(): Unit {
this.asDynamic().sort(::primitiveCompareTo)
nativeSort(::primitiveCompareTo)
}
/**
@@ -2043,7 +2043,7 @@ public actual fun CharArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit
@DeprecatedSinceKotlin(warningSince = "1.6")
@kotlin.internal.InlineOnly
public inline fun ByteArray.sort(noinline comparison: (a: Byte, b: Byte) -> Int): Unit {
asDynamic().sort(comparison)
nativeSort(comparison)
}
/**
@@ -2053,7 +2053,7 @@ public inline fun ByteArray.sort(noinline comparison: (a: Byte, b: Byte) -> Int)
@DeprecatedSinceKotlin(warningSince = "1.6")
@kotlin.internal.InlineOnly
public inline fun ShortArray.sort(noinline comparison: (a: Short, b: Short) -> Int): Unit {
asDynamic().sort(comparison)
nativeSort(comparison)
}
/**
@@ -2063,7 +2063,7 @@ public inline fun ShortArray.sort(noinline comparison: (a: Short, b: Short) -> I
@DeprecatedSinceKotlin(warningSince = "1.6")
@kotlin.internal.InlineOnly
public inline fun IntArray.sort(noinline comparison: (a: Int, b: Int) -> Int): Unit {
asDynamic().sort(comparison)
nativeSort(comparison)
}
/**
@@ -2073,7 +2073,7 @@ public inline fun IntArray.sort(noinline comparison: (a: Int, b: Int) -> Int): U
@DeprecatedSinceKotlin(warningSince = "1.6")
@kotlin.internal.InlineOnly
public inline fun LongArray.sort(noinline comparison: (a: Long, b: Long) -> Int): Unit {
asDynamic().sort(comparison)
nativeSort(comparison)
}
/**
@@ -2083,7 +2083,7 @@ public inline fun LongArray.sort(noinline comparison: (a: Long, b: Long) -> Int)
@DeprecatedSinceKotlin(warningSince = "1.6")
@kotlin.internal.InlineOnly
public inline fun FloatArray.sort(noinline comparison: (a: Float, b: Float) -> Int): Unit {
asDynamic().sort(comparison)
nativeSort(comparison)
}
/**
@@ -2093,7 +2093,7 @@ public inline fun FloatArray.sort(noinline comparison: (a: Float, b: Float) -> I
@DeprecatedSinceKotlin(warningSince = "1.6")
@kotlin.internal.InlineOnly
public inline fun DoubleArray.sort(noinline comparison: (a: Double, b: Double) -> Int): Unit {
asDynamic().sort(comparison)
nativeSort(comparison)
}
/**
@@ -2103,7 +2103,7 @@ public inline fun DoubleArray.sort(noinline comparison: (a: Double, b: Double) -
@DeprecatedSinceKotlin(warningSince = "1.6")
@kotlin.internal.InlineOnly
public inline fun CharArray.sort(noinline comparison: (a: Char, b: Char) -> Int): Unit {
asDynamic().sort(comparison)
nativeSort(comparison)
}
/**