AST: Rename mapTypeIntoContext() => mapTypeIntoEnvironment(), mapTypeOutOfContext() => mapTypeOutOfEnvironment()

This commit is contained in:
Slava Pestov
2025-11-12 13:26:06 -05:00
parent e2287b6312
commit 819738c83e
179 changed files with 674 additions and 674 deletions

View File

@@ -46,7 +46,7 @@ static void forwardParameters(AbstractFunctionDecl *afd,
forwardingParams.push_back(new (C) DeclRefExpr(
ConcreteDeclRef(param), DeclNameLoc(), /*implicit=*/true,
swift::AccessSemantics::Ordinary,
afd->mapTypeIntoContext(param->getInterfaceType())));
afd->mapTypeIntoEnvironment(param->getInterfaceType())));
}
}
@@ -201,7 +201,7 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
UnresolvedDeclRefExpr::createImplicit(C, recordGenericSubstitutionName);
for (auto genParamType : genEnv->getGenericParams()) {
auto tyExpr = TypeExpr::createImplicit(genEnv->mapTypeIntoContext(genParamType), C);
auto tyExpr = TypeExpr::createImplicit(genEnv->mapTypeIntoEnvironment(genParamType), C);
auto subTypeExpr = new (C) DotSelfExpr(
tyExpr,
sloc, sloc, tyExpr->getType());
@@ -258,7 +258,7 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
auto remoteCallArgumentInitDecl =
RCA->getDistributedRemoteCallArgumentInitFunction();
auto boundRCAType = BoundGenericType::get(
RCA, Type(), {thunk->mapTypeIntoContext(param->getInterfaceType())});
RCA, Type(), {thunk->mapTypeIntoEnvironment(param->getInterfaceType())});
auto remoteCallArgumentInitDeclRef =
TypeExpr::createImplicit(boundRCAType, C);
@@ -273,7 +273,7 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
new (C) DeclRefExpr(
ConcreteDeclRef(param), dloc, implicit,
AccessSemantics::Ordinary,
thunk->mapTypeIntoContext(param->getInterfaceType()))
thunk->mapTypeIntoEnvironment(param->getInterfaceType()))
},
C);
@@ -342,7 +342,7 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
// Result.self
// Watch out and always map into thunk context
auto resultType = thunk->mapTypeIntoContext(func->getResultInterfaceType());
auto resultType = thunk->mapTypeIntoEnvironment(func->getResultInterfaceType());
auto *metaTypeRef = TypeExpr::createImplicit(resultType, C);
auto *resultTypeExpr =
new (C) DotSelfExpr(metaTypeRef, sloc, sloc, resultType);
@@ -479,7 +479,7 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
if (!isVoidReturn) {
// Result.self
auto resultType =
func->mapTypeIntoContext(func->getResultInterfaceType());
func->mapTypeIntoEnvironment(func->getResultInterfaceType());
auto *metaTypeRef = TypeExpr::createImplicit(resultType, C);
auto *resultTypeExpr =
new (C) DotSelfExpr(metaTypeRef, sloc, sloc, resultType);