mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Give SILFunctionTypes parallel generic signature and interface types.
For now, derive the generic signature from the contextual generic parameter list, so we can incrementally move producers and consumers of SILFunctionTypes to the new model independently. We derive the generic signature, but we can't yet derive the interface parameter and result types in all cases due to bugs in how we lower nested generic SILFunctionTypes. NFC yet. Swift SVN r11722
This commit is contained in:
@@ -52,6 +52,7 @@ namespace swift {
|
||||
class FuncDecl;
|
||||
class BraceStmt;
|
||||
class DeclAttributes;
|
||||
class GenericSignature;
|
||||
class GenericTypeParamDecl;
|
||||
class GenericTypeParamType;
|
||||
class Module;
|
||||
@@ -650,6 +651,11 @@ class GenericParamList {
|
||||
MutableArrayRef<RequirementRepr> Requirements,
|
||||
SourceLoc RAngleLoc);
|
||||
|
||||
void getAsGenericSignatureElements(ASTContext &C,
|
||||
llvm::DenseMap<ArchetypeType*, Type> &archetypeMap,
|
||||
SmallVectorImpl<GenericTypeParamType*> &genericParams,
|
||||
SmallVectorImpl<Requirement> &requirements) const;
|
||||
|
||||
public:
|
||||
/// create - Create a new generic parameter list within the given AST context.
|
||||
///
|
||||
@@ -806,6 +812,16 @@ public:
|
||||
return depth;
|
||||
}
|
||||
|
||||
/// Get the generic parameter list as a GenericSignature in which the generic
|
||||
/// parameters have been canonicalized.
|
||||
///
|
||||
/// \param archetypeMap This DenseMap is populated with a mapping of
|
||||
/// context primary archetypes to dependent generic
|
||||
/// types.
|
||||
GenericSignature *getAsCanonicalGenericSignature(
|
||||
llvm::DenseMap<ArchetypeType*, Type> &archetypeMap,
|
||||
ASTContext &C) const;
|
||||
|
||||
void print(raw_ostream &OS);
|
||||
void dump();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user