diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-03-22 11:02:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 11:02:34 -0700 |
commit | 1ffea5761c4a9ddbdb2b1e6dc35d5346f2956b9c (patch) | |
tree | bc541f84a01c4c96feedde2ba503cd4df41f332c | |
parent | 343a796102cbdc373c98dc77f322de0fade48ebc (diff) | |
download | binaryen-1ffea5761c4a9ddbdb2b1e6dc35d5346f2956b9c.tar.gz binaryen-1ffea5761c4a9ddbdb2b1e6dc35d5346f2956b9c.tar.bz2 binaryen-1ffea5761c4a9ddbdb2b1e6dc35d5346f2956b9c.zip |
Remove nearly unused {Heap}Type::isCompound (#4541)
-rw-r--r-- | src/wasm-type.h | 4 | ||||
-rw-r--r-- | src/wasm/wasm-type.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h index 29e5114b7..05deeef15 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -35,7 +35,7 @@ // prepare for this change, the following macro marks affected code locations. #define TODO_SINGLE_COMPOUND(type) \ assert(!type.isTuple() && "Unexpected tuple type"); \ - assert(!type.isCompound() && "TODO: handle compound types"); + assert(type.isBasic() && "TODO: handle compound types"); namespace wasm { @@ -162,7 +162,6 @@ public: // │ Rtt ║ │ x │ x │ x │ │ // └─────────────╨───┴───┴───┴───┴───────┘ constexpr bool isBasic() const { return id <= _last_basic_type; } - constexpr bool isCompound() const { return id > _last_basic_type; } constexpr bool isConcrete() const { return id >= i32; } constexpr bool isInteger() const { return id == i32 || id == i64; } constexpr bool isFloat() const { return id == f32 || id == f64; } @@ -366,7 +365,6 @@ public: HeapType(Array array); constexpr bool isBasic() const { return id <= _last_basic_type; } - constexpr bool isCompound() const { return id > _last_basic_type; } bool isFunction() const; bool isData() const; bool isSignature() const; diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index d7ba224c8..ea4e43efe 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -530,12 +530,12 @@ namespace wasm { namespace { TypeInfo* getTypeInfo(Type type) { - assert(type.isCompound()); + assert(!type.isBasic()); return (TypeInfo*)type.getID(); } HeapTypeInfo* getHeapTypeInfo(HeapType ht) { - assert(ht.isCompound()); + assert(!ht.isBasic()); return (HeapTypeInfo*)ht.getID(); } |