[WASM] Refactoring wasm array copy functions
This commit is contained in:
@@ -919,6 +919,17 @@ object ArrayOps : TemplateGroupBase() {
|
||||
"""
|
||||
}
|
||||
}
|
||||
on(Backend.Wasm) {
|
||||
body {
|
||||
"""
|
||||
AbstractList.checkRangeIndexes(startIndex, endIndex, this.size)
|
||||
val rangeSize = endIndex - startIndex
|
||||
AbstractList.checkRangeIndexes(destinationOffset, destinationOffset + rangeSize, destination.size)
|
||||
kotlin.wasm.internal.copyWasmArray(this.storage, destination.storage, startIndex, destinationOffset, rangeSize)
|
||||
return destination
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user