From bdc55d3781e55f7d51d2e21751e07f9ec6161c27 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 9 Dec 2020 14:28:48 -0800 Subject: Small RTT cleanups (#3434) --- src/wasm-type.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/wasm-type.h') diff --git a/src/wasm-type.h b/src/wasm-type.h index f600f2e79..11980642b 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -174,10 +174,12 @@ public: // Returns the feature set required to use this type. FeatureSet getFeatures() const; - // Gets the heap type corresponding to this type + // Gets the heap type corresponding to this type, assuming that it is a + // reference or Rtt type. HeapType getHeapType() const; - const struct Rtt& getRtt() const; + // Gets the Rtt for this type, assuming that it is an Rtt type. + Rtt getRtt() const; // Returns a number type based on its size in bytes and whether it is a float // type. @@ -432,10 +434,8 @@ struct Array { }; struct Rtt { - enum { - // An Rtt can have no depth specified - NoDepth = -1 - }; + // An Rtt can have no depth specified + static constexpr uint32_t NoDepth = -1; uint32_t depth; HeapType heapType; Rtt(HeapType heapType) : depth(NoDepth), heapType(heapType) {} -- cgit v1.2.3