Introduce a new representation of polymorphic function types.

Introduces a new kind of function type, GenericFunctionType, that
represents a polymorphic function type with all of its generic
parameters and requirements stored in a more readily canonicalizable
form. It is meant to eventually replace PolymorphicFunctionType, but
for now we build it up in parallel so we can switch over to it
pieacemeal.

Note: this representation is built and then thrown away. We'll start
recording it soon.


Swift SVN r8881
This commit is contained in:
Doug Gregor
2013-10-03 17:59:35 +00:00
parent 781dcf7b11
commit 12e228c0f1
23 changed files with 999 additions and 165 deletions

View File

@@ -1493,6 +1493,10 @@ void Serializer::writeType(Type ty) {
break;
}
case TypeKind::GenericFunction: {
llvm_unreachable("Cannot serialize generic function types yet");
}
case TypeKind::GenericTypeParam: {
auto genericParam = cast<GenericTypeParamType>(ty.getPointer());
unsigned abbrCode = DeclTypeAbbrCodes[GenericTypeParamTypeLayout::Code];