Translates polymorphic function to a single instance

This commit is contained in:
2017-05-09 23:41:36 -04:00
parent 871af918ad
commit 192b99f21d
12 changed files with 142 additions and 110 deletions

4
type.h
View File

@@ -244,6 +244,8 @@ public:
the same (ignoring const-ness of the type), false otherwise. */
static bool EqualIgnoringConst(const Type *a, const Type *b);
static bool EqualForReplacement(const Type *a, const Type *b);
/** Given two types, returns the least general Type that is more general
than both of them. (i.e. that can represent their values without
any loss of data.) If there is no such Type, return NULL.
@@ -415,6 +417,8 @@ public:
static const Type * ReplaceType(const Type *from, const Type *to);
static bool Less(const Type *a, const Type *b);
static const PolyType *UniformInteger, *VaryingInteger;
static const PolyType *UniformFloating, *VaryingFloating;