[Wasm] stdlib NFC: Suppress warnings in _WasmArrays.kt
This commit is contained in:
@@ -92,6 +92,7 @@ fun wasmArrayForType(
|
|||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
return """
|
return """
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf($klass::class, isNullable = $isNullable)
|
@WasmArrayOf($klass::class, isNullable = $isNullable)
|
||||||
internal class $name(size: Int) {
|
internal class $name(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET${getSuffix})
|
@WasmOp(WasmOp.ARRAY_GET${getSuffix})
|
||||||
@@ -107,6 +108,7 @@ fun wasmArrayForType(
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: $name, destination: $name, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: $name, destination: $name, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<$name>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<$name>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -118,6 +120,7 @@ fun wasmArrayForType(
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ package kotlin.wasm.internal
|
|||||||
// NOTE: THIS FILE IS AUTO-GENERATED by the generators/wasm/WasmIntrinsicGenerator.kt
|
// NOTE: THIS FILE IS AUTO-GENERATED by the generators/wasm/WasmIntrinsicGenerator.kt
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Any::class, isNullable = true)
|
@WasmArrayOf(Any::class, isNullable = true)
|
||||||
internal class WasmAnyArray(size: Int) {
|
internal class WasmAnyArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET)
|
@WasmOp(WasmOp.ARRAY_GET)
|
||||||
@@ -24,6 +25,7 @@ internal class WasmAnyArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmAnyArray, destination: WasmAnyArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmAnyArray, destination: WasmAnyArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmAnyArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmAnyArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -35,6 +37,8 @@ internal inline fun WasmAnyArray.fill(size: Int, init: (Int) -> Any?) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Byte::class, isNullable = false)
|
@WasmArrayOf(Byte::class, isNullable = false)
|
||||||
internal class WasmByteArray(size: Int) {
|
internal class WasmByteArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET_S)
|
@WasmOp(WasmOp.ARRAY_GET_S)
|
||||||
@@ -50,6 +54,7 @@ internal class WasmByteArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmByteArray, destination: WasmByteArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmByteArray, destination: WasmByteArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmByteArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmByteArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -61,6 +66,8 @@ internal inline fun WasmByteArray.fill(size: Int, init: (Int) -> Byte) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Char::class, isNullable = false)
|
@WasmArrayOf(Char::class, isNullable = false)
|
||||||
internal class WasmCharArray(size: Int) {
|
internal class WasmCharArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET_U)
|
@WasmOp(WasmOp.ARRAY_GET_U)
|
||||||
@@ -76,6 +83,7 @@ internal class WasmCharArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmCharArray, destination: WasmCharArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmCharArray, destination: WasmCharArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmCharArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmCharArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -87,6 +95,8 @@ internal inline fun WasmCharArray.fill(size: Int, init: (Int) -> Char) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Short::class, isNullable = false)
|
@WasmArrayOf(Short::class, isNullable = false)
|
||||||
internal class WasmShortArray(size: Int) {
|
internal class WasmShortArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET_S)
|
@WasmOp(WasmOp.ARRAY_GET_S)
|
||||||
@@ -102,6 +112,7 @@ internal class WasmShortArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmShortArray, destination: WasmShortArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmShortArray, destination: WasmShortArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmShortArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmShortArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -113,6 +124,8 @@ internal inline fun WasmShortArray.fill(size: Int, init: (Int) -> Short) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Int::class, isNullable = false)
|
@WasmArrayOf(Int::class, isNullable = false)
|
||||||
internal class WasmIntArray(size: Int) {
|
internal class WasmIntArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET)
|
@WasmOp(WasmOp.ARRAY_GET)
|
||||||
@@ -128,6 +141,7 @@ internal class WasmIntArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmIntArray, destination: WasmIntArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmIntArray, destination: WasmIntArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmIntArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmIntArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -139,6 +153,8 @@ internal inline fun WasmIntArray.fill(size: Int, init: (Int) -> Int) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Long::class, isNullable = false)
|
@WasmArrayOf(Long::class, isNullable = false)
|
||||||
internal class WasmLongArray(size: Int) {
|
internal class WasmLongArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET)
|
@WasmOp(WasmOp.ARRAY_GET)
|
||||||
@@ -154,6 +170,7 @@ internal class WasmLongArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmLongArray, destination: WasmLongArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmLongArray, destination: WasmLongArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmLongArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmLongArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -165,6 +182,8 @@ internal inline fun WasmLongArray.fill(size: Int, init: (Int) -> Long) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Float::class, isNullable = false)
|
@WasmArrayOf(Float::class, isNullable = false)
|
||||||
internal class WasmFloatArray(size: Int) {
|
internal class WasmFloatArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET)
|
@WasmOp(WasmOp.ARRAY_GET)
|
||||||
@@ -180,6 +199,7 @@ internal class WasmFloatArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmFloatArray, destination: WasmFloatArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmFloatArray, destination: WasmFloatArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmFloatArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmFloatArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -191,6 +211,8 @@ internal inline fun WasmFloatArray.fill(size: Int, init: (Int) -> Float) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
@WasmArrayOf(Double::class, isNullable = false)
|
@WasmArrayOf(Double::class, isNullable = false)
|
||||||
internal class WasmDoubleArray(size: Int) {
|
internal class WasmDoubleArray(size: Int) {
|
||||||
@WasmOp(WasmOp.ARRAY_GET)
|
@WasmOp(WasmOp.ARRAY_GET)
|
||||||
@@ -206,6 +228,7 @@ internal class WasmDoubleArray(size: Int) {
|
|||||||
implementedAsIntrinsic
|
implementedAsIntrinsic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
internal inline fun copyWasmArray(source: WasmDoubleArray, destination: WasmDoubleArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
internal inline fun copyWasmArray(source: WasmDoubleArray, destination: WasmDoubleArray, sourceIndex: Int, destinationIndex: Int, length: Int) {
|
||||||
wasm_array_copy<WasmDoubleArray>(destination, destinationIndex, source, sourceIndex, length)
|
wasm_array_copy<WasmDoubleArray>(destination, destinationIndex, source, sourceIndex, length)
|
||||||
}
|
}
|
||||||
@@ -217,3 +240,4 @@ internal inline fun WasmDoubleArray.fill(size: Int, init: (Int) -> Double) {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user