LibWasm: Remove Wasm::ValueType::Kind::Null* variants

As far as I know, they're not in the spec and don't serve any purposes
in the internals of LibWasm.
This commit is contained in:
Diego 2024-07-07 19:01:28 -07:00 committed by Ali Mohammad Pur
commit 5382fbb617
Notes: sideshowbarker 2024-07-17 20:58:35 +09:00
4 changed files with 4 additions and 29 deletions

View file

@ -108,14 +108,6 @@ public:
case ValueType::Kind::F64:
m_value = bit_cast<double>(raw_value);
break;
case ValueType::Kind::NullFunctionReference:
VERIFY(raw_value == 0);
m_value = Reference { Reference::Null { ValueType(ValueType::Kind::FunctionReference) } };
break;
case ValueType::Kind::NullExternReference:
VERIFY(raw_value == 0);
m_value = Reference { Reference::Null { ValueType(ValueType::Kind::ExternReference) } };
break;
case ValueType::Kind::V128:
m_value = u128(0ull, bit_cast<u64>(raw_value));
break;
@ -184,7 +176,7 @@ public:
return type.ref().visit(
[](Reference::Func const&) { return ValueType::Kind::FunctionReference; },
[](Reference::Null const& null_type) {
return null_type.type.kind() == ValueType::ExternReference ? ValueType::Kind::NullExternReference : ValueType::Kind::NullFunctionReference;
return null_type.type.kind();
},
[](Reference::Extern const&) { return ValueType::Kind::ExternReference; });
}));