[Wasm] Remove wasm_ref_cast and use wasm_ref_cast_null inside the compiler

This commit is contained in:
Zalim Bashorov
2022-11-17 18:54:14 +01:00
parent e7d0e451e7
commit 5f140dac21
6 changed files with 14 additions and 19 deletions
@@ -19,15 +19,12 @@ import kotlin.wasm.internal.ExternalInterfaceType
internal fun wasm_unreachable(): Nothing =
implementedAsIntrinsic
internal fun <To> wasm_ref_cast(a: Any?): To =
implementedAsIntrinsic
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")
@WasmOp(WasmOp.REF_CAST_NULL)
internal fun <reified To> wasm_ref_cast_null(a: Any?): To =
implementedAsIntrinsic
internal fun <To> wasm_ref_test(a: Any?): Boolean =
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")
internal fun <reified To> wasm_ref_test(a: Any?): Boolean =
implementedAsIntrinsic
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")