[JS BE] Extract backend specific code from shared stdlib sources
This commit is contained in:
@@ -14,7 +14,7 @@ internal fun <T> Array<out T>.contentDeepHashCodeImpl(): Int {
|
||||
for (element in this) {
|
||||
val elementHash = when {
|
||||
element == null -> 0
|
||||
js("Kotlin").isArrayish(element) -> (element.unsafeCast<Array<*>>()).contentDeepHashCodeImpl()
|
||||
isArrayish(element) -> (element.unsafeCast<Array<*>>()).contentDeepHashCodeImpl()
|
||||
|
||||
element is UByteArray -> element.contentHashCode()
|
||||
element is UShortArray -> element.contentHashCode()
|
||||
|
||||
@@ -38,7 +38,7 @@ public operator fun dynamic.iterator(): Iterator<dynamic> {
|
||||
return when {
|
||||
this["iterator"] != null ->
|
||||
this["iterator"]()
|
||||
js("Kotlin").isArrayish(r) ->
|
||||
isArrayish(r) ->
|
||||
r.unsafeCast<Array<*>>().iterator()
|
||||
|
||||
else ->
|
||||
|
||||
Reference in New Issue
Block a user