mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization/AST] Lazily construct generic environments for generic types.
When deserializing the generic environment for a generic type, only immediately deserialize the generic signature. The generic environment will be deserialized later, when it's needed.
This commit is contained in:
@@ -449,6 +449,13 @@ private:
|
||||
void readGenericRequirements(SmallVectorImpl<Requirement> &requirements,
|
||||
llvm::BitstreamCursor &Cursor);
|
||||
|
||||
/// Allocate a lazy generic environment map for use with lazily deserialized
|
||||
/// generic environments.
|
||||
uint64_t allocateLazyGenericEnvironmentMap(TypeSubstitutionMap &&map);
|
||||
|
||||
/// Set up a lazy generic environment for the given type.
|
||||
void readLazyGenericEnvironment(GenericTypeDecl *type);
|
||||
|
||||
/// Read the generic signature and type substitution map for a
|
||||
/// generic environment from \c Cursor.
|
||||
std::pair<GenericSignature *, TypeSubstitutionMap>
|
||||
|
||||
Reference in New Issue
Block a user