convenience functions to check for aggregate types

This commit is contained in:
Vern Paxson 2021-02-27 08:30:24 -08:00
parent 743f5cfef6
commit d9b67edf52

View file

@ -840,6 +840,14 @@ inline bool IsAggr(TypeTag tag)
{
return tag == TYPE_VECTOR || tag == TYPE_TABLE || tag == TYPE_RECORD;
}
inline bool IsAggr(const Type* t)
{
return IsAggr(t->Tag());
}
inline bool IsAggr(const TypePtr& t)
{
return IsAggr(t->Tag());
}
// True if the given type tag corresponds to the error type.
inline bool IsErrorType(TypeTag t) { return (t == TYPE_ERROR); }