[Wasm] Revert a7ed496a and few fixes to make Kotlin/Wasm compatible with Firefox
Revert changes as soon as the bug is fixed https://bugzilla.mozilla.org/show_bug.cgi?id=1811932
a7ed496a "[WASM] Use wasm bottom types for Nothing?"
#KT-56166 In-Progress
This commit is contained in:
@@ -25,8 +25,6 @@ object WasmFuncRef : WasmType("funcref", -0x10)
|
||||
object WasmExternRef : WasmType("externref", -0x11)
|
||||
object WasmAnyRef : WasmType("anyref", -0x12)
|
||||
object WasmEqRef : WasmType("eqref", -0x13)
|
||||
object WasmRefNullNoneType : WasmType("nullnone", -0x1b)
|
||||
object WasmRefNullExternrefType : WasmType("nullexternref", -0x17)
|
||||
|
||||
data class WasmRefNullType(val heapType: WasmHeapType) : WasmType("ref null", -0x14)
|
||||
data class WasmRefType(val heapType: WasmHeapType) : WasmType("ref", -0x15)
|
||||
@@ -49,9 +47,8 @@ sealed class WasmHeapType {
|
||||
object Extern : Simple("extern", -0x11)
|
||||
object Any : Simple("any", -0x12)
|
||||
object Eq : Simple("eq", -0x13)
|
||||
|
||||
object Data : Simple("data", -0x19)
|
||||
object NullNone : Simple("nullref", -0x1b)
|
||||
object NullNoExtern : Simple("nullexternref", -0x17)
|
||||
|
||||
override fun toString(): String {
|
||||
return "Simple:$name(${code.toString(16)})"
|
||||
@@ -69,8 +66,6 @@ fun WasmType.getHeapType(): WasmHeapType =
|
||||
when (this) {
|
||||
is WasmRefType -> heapType
|
||||
is WasmRefNullType -> heapType
|
||||
is WasmRefNullNoneType -> WasmHeapType.Simple.NullNone
|
||||
is WasmRefNullExternrefType -> WasmHeapType.Simple.NullNoExtern
|
||||
is WasmEqRef -> WasmHeapType.Simple.Eq
|
||||
is WasmAnyRef -> WasmHeapType.Simple.Any
|
||||
is WasmFuncRef -> WasmHeapType.Simple.Func
|
||||
|
||||
Reference in New Issue
Block a user