diff options
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r-- | src/wasm/literal.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 68268d366..43adec6f6 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -137,6 +137,7 @@ void Literal::getBits(uint8_t (&buf)[16]) const { case Type::v128: memcpy(buf, &v128, sizeof(v128)); break; + case Type::anyref: // anyref type is opaque case Type::exnref: // exnref type is opaque case Type::none: case Type::unreachable: @@ -272,6 +273,7 @@ std::ostream& operator<<(std::ostream& o, Literal literal) { o << "i32x4 "; literal.printVec128(o, literal.getv128()); break; + case Type::anyref: // anyref type is opaque case Type::exnref: // exnref type is opaque case Type::unreachable: WASM_UNREACHABLE(); @@ -475,6 +477,7 @@ Literal Literal::eqz() const { case Type::f64: return eq(Literal(double(0))); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: @@ -494,6 +497,7 @@ Literal Literal::neg() const { case Type::f64: return Literal(int64_t(i64 ^ 0x8000000000000000ULL)).castToF64(); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: @@ -513,6 +517,7 @@ Literal Literal::abs() const { case Type::f64: return Literal(int64_t(i64 & 0x7fffffffffffffffULL)).castToF64(); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: @@ -615,6 +620,7 @@ Literal Literal::add(const Literal& other) const { case Type::f64: return Literal(getf64() + other.getf64()); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: @@ -634,6 +640,7 @@ Literal Literal::sub(const Literal& other) const { case Type::f64: return Literal(getf64() - other.getf64()); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: @@ -724,6 +731,7 @@ Literal Literal::mul(const Literal& other) const { case Type::f64: return Literal(getf64() * other.getf64()); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: @@ -942,6 +950,7 @@ Literal Literal::eq(const Literal& other) const { case Type::f64: return Literal(getf64() == other.getf64()); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: @@ -961,6 +970,7 @@ Literal Literal::ne(const Literal& other) const { case Type::f64: return Literal(getf64() != other.getf64()); case Type::v128: + case Type::anyref: case Type::exnref: case Type::none: case Type::unreachable: |