[Wasm] stdlib NFC: Fix or suppress remaining warnings
This commit is contained in:
@@ -16,7 +16,7 @@ internal fun <T> getContinuation(): Continuation<T> =
|
||||
|
||||
@PublishedApi
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
internal suspend fun <T> returnIfSuspended(@Suppress("UNUSED_PARAMETER") argument: Any?): T =
|
||||
internal suspend fun <T> returnIfSuspended(argument: Any?): T =
|
||||
argument as T
|
||||
|
||||
@PublishedApi
|
||||
@@ -33,6 +33,7 @@ internal suspend fun getCoroutineContext(): CoroutineContext = getContinuation<A
|
||||
internal suspend fun <T> suspendCoroutineUninterceptedOrReturn(block: (Continuation<T>) -> Any?): T =
|
||||
returnIfSuspended<T>(block(getContinuation<T>()))
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ExcludedFromCodegen
|
||||
@PublishedApi
|
||||
internal fun <T> startCoroutineUninterceptedOrReturnIntrinsic0(
|
||||
@@ -42,6 +43,7 @@ internal fun <T> startCoroutineUninterceptedOrReturnIntrinsic0(
|
||||
implementedAsIntrinsic
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ExcludedFromCodegen
|
||||
@PublishedApi
|
||||
internal fun <R, T> startCoroutineUninterceptedOrReturnIntrinsic1(
|
||||
@@ -52,6 +54,7 @@ internal fun <R, T> startCoroutineUninterceptedOrReturnIntrinsic1(
|
||||
implementedAsIntrinsic
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ExcludedFromCodegen
|
||||
@PublishedApi
|
||||
internal fun <R, P, T> startCoroutineUninterceptedOrReturnIntrinsic2(
|
||||
|
||||
@@ -14,11 +14,10 @@ package kotlin.wasm.internal
|
||||
throw error;
|
||||
}"""
|
||||
)
|
||||
private external fun throwJsError(message: String?, wasmTypeName: String?, stack: String)
|
||||
private external fun throwJsError(message: String?, wasmTypeName: String?, stack: String): Nothing
|
||||
|
||||
internal fun throwAsJsException(t: Throwable): Nothing {
|
||||
throwJsError(t.message, t::class.simpleName, t.stackTraceToString())
|
||||
return error("Unreachable")
|
||||
}
|
||||
|
||||
internal var isNotFirstWasmExportCall: Boolean = false
|
||||
@@ -3,6 +3,8 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("UNUSED_PARAMETER") // File contains many intrinsics
|
||||
|
||||
package kotlin.wasm.internal
|
||||
|
||||
internal const val CHAR_SIZE_BYTES = 2
|
||||
@@ -115,5 +117,6 @@ internal fun stringGetPoolSize(): Int =
|
||||
implementedAsIntrinsic
|
||||
|
||||
// This initializer is a special case in FieldInitializersLowering
|
||||
@Suppress("DEPRECATION")
|
||||
@EagerInitialization
|
||||
internal val stringPool: Array<String?> = arrayOfNulls(stringGetPoolSize())
|
||||
@@ -51,6 +51,7 @@ internal fun isInterfaceById(obj: Any, interfaceId: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ExcludedFromCodegen
|
||||
internal fun <T> wasmIsInterface(obj: Any): Boolean =
|
||||
implementedAsIntrinsic
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
@file:ExcludedFromCodegen
|
||||
@file:Suppress("unused", "NON_ABSTRACT_FUNCTION_WITH_NO_BODY", "INLINE_CLASS_IN_EXTERNAL_DECLARATION")
|
||||
@file:Suppress("unused", "NON_ABSTRACT_FUNCTION_WITH_NO_BODY", "INLINE_CLASS_IN_EXTERNAL_DECLARATION", "UNUSED_PARAMETER")
|
||||
|
||||
|
||||
package kotlin.wasm.internal
|
||||
|
||||
Reference in New Issue
Block a user