[WASM] Add array copy intrinsic
This commit is contained in:
@@ -104,7 +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 $name.fill(size: Int, init: (Int) -> $type) {
|
||||
@@ -113,8 +117,7 @@ fun wasmArrayForType(
|
||||
set(i, init(i))
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
""".trimIndent()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user