[WASM] Refactoring wasm array copy functions

This commit is contained in:
Igor Yakovlev
2022-07-07 16:19:27 +02:00
committed by teamcity
parent 39844af876
commit a0a66ffb96
8 changed files with 84 additions and 125 deletions
+3 -3
View File
@@ -104,11 +104,11 @@ fun wasmArrayForType(
@WasmOp(WasmOp.ARRAY_LEN)
fun len(): Int =
implementedAsIntrinsic
implementedAsIntrinsic
}
internal inline fun $name.copyTo(destination: $name, sourceIndex: Int, destinationIndex: Int, length: Int) {
wasm_array_copy<$name>(destination, destinationIndex, this, sourceIndex, length)
internal inline fun copyWasmArray(source: $name, destination: $name, sourceIndex: Int, destinationIndex: Int, length: Int) {
wasm_array_copy<$name>(destination, destinationIndex, source, sourceIndex, length)
}
internal inline fun $name.fill(size: Int, init: (Int) -> $type) {