Index: src/types.h |
diff --git a/src/types.h b/src/types.h |
index e7b306e4fa6568fe13ac52777fc6a9d7f1e662ce..99a809dc10d06ae5108e2c64667982c867018d0a 100644 |
--- a/src/types.h |
+++ b/src/types.h |
@@ -243,6 +243,10 @@ class TypeImpl : public Config::Base { |
return t; |
} |
+ template<class OtherTypeImpl> |
+ static TypeHandle Convert( |
+ typename OtherTypeImpl::TypeHandle type, Region* region); |
+ |
#ifdef OBJECT_PRINT |
void TypePrint(); |
void TypePrint(FILE* out); |
@@ -250,6 +254,7 @@ class TypeImpl : public Config::Base { |
private: |
template<class> friend class Iterator; |
+ template<class> friend class TypeImpl; |
// A union is a fixed array containing types. Invariants: |
// - its length is at least 2 |
@@ -272,6 +277,13 @@ class TypeImpl : public Config::Base { |
int AsBitset() { return Config::as_bitset(this); } |
UnionedHandle AsUnion() { return Config::as_union(this); } |
+ static int UnionLength(UnionedHandle unioned) { |
+ return Config::union_length(unioned); |
+ } |
+ static TypeHandle UnionGet(UnionedHandle unioned, int i) { |
+ return Config::union_get(unioned, i); |
+ } |
+ |
bool SlowIs(TypeImpl* that); |
int LubBitset(); // least upper bound that's a bitset |