mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: GenericContexts store a GenericSignature instead of a GenericEnvironment
This eliminates the entire 'lazy generic environment' concept; essentially, all generic environments are now lazy, and since each signature has exactly one environment, their construction no longer needs to be co-ordinated with deserialization.
This commit is contained in:
@@ -175,17 +175,6 @@ GenericEnvironment *DeclContext::getGenericEnvironmentOfContext() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool DeclContext::contextHasLazyGenericEnvironment() const {
|
||||
auto dc = this;
|
||||
do {
|
||||
if (auto decl = dc->getAsDecl())
|
||||
if (auto GC = decl->getAsGenericContext())
|
||||
return GC->hasLazyGenericEnvironment();
|
||||
} while ((dc = dc->getParent()));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Type DeclContext::mapTypeIntoContext(Type type) const {
|
||||
return GenericEnvironment::mapTypeIntoContext(
|
||||
getGenericEnvironmentOfContext(), type);
|
||||
|
||||
Reference in New Issue
Block a user