diff options
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r-- | src/wasm/literal.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 6d870ec55..dc6d90ef9 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -114,8 +114,8 @@ Literal::Literal(const Literal& other) : type(other.type) { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: WASM_UNREACHABLE("invalid type"); } } @@ -331,8 +331,8 @@ void Literal::getBits(uint8_t (&buf)[16]) const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: WASM_UNREACHABLE("invalid type"); } } @@ -370,8 +370,8 @@ bool Literal::operator==(const Literal& other) const { case Type::funcref: case Type::externref: case Type::anyref: - case Type::dataref: case Type::eqref: + case Type::dataref: return compareRef(); case Type::unreachable: break; @@ -510,8 +510,8 @@ std::ostream& operator<<(std::ostream& o, Literal literal) { case HeapType::i31: o << "i31ref(" << literal.geti31() << ")"; break; - case HeapType::data: case HeapType::func: + case HeapType::data: WASM_UNREACHABLE("type should have been handled above"); } } @@ -547,8 +547,8 @@ std::ostream& operator<<(std::ostream& o, Literal literal) { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); } @@ -771,8 +771,8 @@ Literal Literal::eqz() const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); @@ -795,8 +795,8 @@ Literal Literal::neg() const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); @@ -819,8 +819,8 @@ Literal Literal::abs() const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); @@ -960,8 +960,8 @@ Literal Literal::add(const Literal& other) const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); @@ -984,8 +984,8 @@ Literal Literal::sub(const Literal& other) const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); @@ -1079,8 +1079,8 @@ Literal Literal::mul(const Literal& other) const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); @@ -1315,8 +1315,8 @@ Literal Literal::eq(const Literal& other) const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); @@ -1339,8 +1339,8 @@ Literal Literal::ne(const Literal& other) const { case Type::externref: case Type::anyref: case Type::eqref: - case Type::dataref: case Type::i31ref: + case Type::dataref: case Type::none: case Type::unreachable: WASM_UNREACHABLE("unexpected type"); |