@@ -95,13 +95,13 @@ class HeapType {
95
95
// should also be passed by value.
96
96
uintptr_t id;
97
97
98
- static constexpr int TypeBits = 3 ;
98
+ static constexpr int TypeBits = 2 ;
99
99
static constexpr int UsedBits = TypeBits + 1 ;
100
100
static constexpr int SharedMask = 1 << TypeBits;
101
101
102
102
public:
103
- // Bits 0-2 are used by the Type representation, so need to be left free.
104
- // Bit 3 determines whether the basic heap type is shared (1) or unshared (0).
103
+ // Bits 0-1 are used by the Type representation, so need to be left free.
104
+ // Bit 2 determines whether the basic heap type is shared (1) or unshared (0).
105
105
enum BasicHeapType : uint32_t {
106
106
ext = 1 << UsedBits,
107
107
func = 2 << UsedBits,
@@ -278,7 +278,7 @@ class Type {
278
278
// bit 0 set. When that bit is masked off, they are pointers to the underlying
279
279
// vectors of types. Otherwise, the type is a reference type, and is
280
280
// represented as a heap type with bit 1 set iff the reference type is
281
- // nullable and bit 2 set iff the reference type is exact .
281
+ // nullable.
282
282
//
283
283
// Since `Type` is really just a single integer, it should be passed by value.
284
284
// This is a uintptr_t rather than a TypeID (uint64_t) to save memory on
@@ -287,7 +287,6 @@ class Type {
287
287
288
288
static constexpr int TupleMask = 1 << 0 ;
289
289
static constexpr int NullMask = 1 << 1 ;
290
- static constexpr int ExactMask = 1 << 2 ;
291
290
292
291
public:
293
292
enum BasicType : uint32_t {
@@ -320,8 +319,7 @@ class Type {
320
319
// Signature, Struct or Array via implicit conversion to HeapType.
321
320
Type (HeapType heapType, Nullability nullable)
322
321
: Type(heapType.getID() | (nullable == Nullable ? NullMask : 0 )) {
323
- assert (heapType.isBasic () ||
324
- !(heapType.getID () & (TupleMask | NullMask | ExactMask)));
322
+ assert (heapType.isBasic () || !(heapType.getID () & (TupleMask | NullMask)));
325
323
}
326
324
327
325
// Predicates
@@ -372,7 +370,7 @@ class Type {
372
370
bool isNonNullable () const { return isRef () && !(id & NullMask); }
373
371
HeapType getHeapType () const {
374
372
assert (isRef ());
375
- return HeapType (id & ~( NullMask | ExactMask) );
373
+ return HeapType (id & ~NullMask);
376
374
}
377
375
378
376
bool isFunction () const { return isRef () && getHeapType ().isFunction (); }
0 commit comments