diff options
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r-- | src/wasm-type.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h index 0e159b3a9..f600f2e79 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -177,6 +177,8 @@ public: // Gets the heap type corresponding to this type HeapType getHeapType() const; + const struct Rtt& getRtt() const; + // Returns a number type based on its size in bytes and whether it is a float // type. static Type get(unsigned byteSize, bool float_); @@ -430,14 +432,20 @@ struct Array { }; struct Rtt { + enum { + // An Rtt can have no depth specified + NoDepth = -1 + }; uint32_t depth; HeapType heapType; + Rtt(HeapType heapType) : depth(NoDepth), heapType(heapType) {} Rtt(uint32_t depth, HeapType heapType) : depth(depth), heapType(heapType) {} bool operator==(const Rtt& other) const { return depth == other.depth && heapType == other.heapType; } bool operator!=(const Rtt& other) const { return !(*this == other); } bool operator<(const Rtt& other) const; + bool hasDepth() { return depth != uint32_t(NoDepth); } std::string toString() const; }; |