Skip to content

Commit 42c2833

Browse files
committed
[K/JS] Delete unused internal fillFrom function
As a follow up to the copyOf(newSize) optimization, the fillFrom function is now unused and can be deleted. ^KT-77646 Fixed
1 parent 64c9778 commit 42c2833

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

libraries/stdlib/js/src/kotlin/kotlin.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@ public actual fun <T> lazy(mode: LazyThreadSafetyMode, initializer: () -> T): La
3232
@DeprecatedSinceKotlin(warningSince = "1.9", errorSince = "2.1")
3333
public actual fun <T> lazy(lock: Any?, initializer: () -> T): Lazy<T> = UnsafeLazyImpl(initializer)
3434

35-
36-
internal fun fillFrom(src: dynamic, dst: dynamic): dynamic {
37-
val srcLen: Int = src.length
38-
val dstLen: Int = dst.length
39-
var index: Int = 0
40-
val arr = dst.unsafeCast<Array<Any?>>()
41-
while (index < srcLen && index < dstLen) arr[index] = src[index++]
42-
return dst
43-
}
44-
45-
4635
internal fun arrayCopyResize(source: dynamic, newSize: Int, defaultValue: Any?): dynamic {
4736
val result = source.slice(0, newSize).unsafeCast<Array<Any?>>()
4837
copyArrayType(source, result)

0 commit comments

Comments
 (0)