@@ -2224,7 +2224,7 @@ class ParameterTypeFlags {
22242224 Isolated = 1 << 7 ,
22252225 CompileTimeConst = 1 << 8 ,
22262226 ResultDependsOn = 1 << 9 ,
2227- Transferring = 1 << 10 ,
2227+ Sending = 1 << 10 ,
22282228 NumBits = 11
22292229 };
22302230 OptionSet<ParameterFlags> value;
@@ -2241,21 +2241,21 @@ class ParameterTypeFlags {
22412241 ParameterTypeFlags (bool variadic, bool autoclosure, bool nonEphemeral,
22422242 ParamSpecifier specifier, bool isolated, bool noDerivative,
22432243 bool compileTimeConst, bool hasResultDependsOn,
2244- bool isTransferring )
2244+ bool isSending )
22452245 : value((variadic ? Variadic : 0 ) | (autoclosure ? AutoClosure : 0 ) |
22462246 (nonEphemeral ? NonEphemeral : 0 ) |
22472247 uint8_t (specifier) << SpecifierShift | (isolated ? Isolated : 0 ) |
22482248 (noDerivative ? NoDerivative : 0 ) |
22492249 (compileTimeConst ? CompileTimeConst : 0 ) |
22502250 (hasResultDependsOn ? ResultDependsOn : 0 ) |
2251- (isTransferring ? Transferring : 0 )) {}
2251+ (isSending ? Sending : 0 )) {}
22522252
22532253 // / Create one from what's present in the parameter type
22542254 inline static ParameterTypeFlags
22552255 fromParameterType (Type paramTy, bool isVariadic, bool isAutoClosure,
22562256 bool isNonEphemeral, ParamSpecifier ownership,
22572257 bool isolated, bool isNoDerivative, bool compileTimeConst,
2258- bool hasResultDependsOn, bool isTransferring );
2258+ bool hasResultDependsOn, bool isSending );
22592259
22602260 bool isNone () const { return !value; }
22612261 bool isVariadic () const { return value.contains (Variadic); }
@@ -2268,7 +2268,7 @@ class ParameterTypeFlags {
22682268 bool isCompileTimeConst () const { return value.contains (CompileTimeConst); }
22692269 bool isNoDerivative () const { return value.contains (NoDerivative); }
22702270 bool hasResultDependsOn () const { return value.contains (ResultDependsOn); }
2271- bool isTransferring () const { return value.contains (Transferring ); }
2271+ bool isSending () const { return value.contains (Sending ); }
22722272
22732273 // / Get the spelling of the parameter specifier used on the parameter.
22742274 ParamSpecifier getOwnershipSpecifier () const {
@@ -2331,10 +2331,10 @@ class ParameterTypeFlags {
23312331 : value - ParameterTypeFlags::NoDerivative);
23322332 }
23332333
2334- ParameterTypeFlags withTransferring (bool withTransferring ) const {
2335- return ParameterTypeFlags (withTransferring
2336- ? value | ParameterTypeFlags::Transferring
2337- : value - ParameterTypeFlags::Transferring );
2334+ ParameterTypeFlags withSending (bool withSending ) const {
2335+ return ParameterTypeFlags (withSending
2336+ ? value | ParameterTypeFlags::Sending
2337+ : value - ParameterTypeFlags::Sending );
23382338 }
23392339
23402340 bool operator ==(const ParameterTypeFlags &other) const {
@@ -3646,9 +3646,7 @@ class AnyFunctionType : public TypeBase {
36463646
36473647 bool isThrowing () const { return getExtInfo ().isThrowing (); }
36483648
3649- bool hasTransferringResult () const {
3650- return getExtInfo ().hasTransferringResult ();
3651- }
3649+ bool hasSendingResult () const { return getExtInfo ().hasSendingResult (); }
36523650
36533651 bool hasEffect (EffectKind kind) const ;
36543652
@@ -4218,8 +4216,8 @@ class SILParameterInfo {
42184216 // / differentiable with respect to this parameter.
42194217 NotDifferentiable = 0x1 ,
42204218
4221- // / Set if the given parameter is transferring .
4222- Transferring = 0x2 ,
4219+ // / Set if the given parameter is sending .
4220+ Sending = 0x2 ,
42234221
42244222 // / Set if the given parameter is isolated.
42254223 Isolated = 0x4 ,
@@ -4488,10 +4486,10 @@ class SILResultInfo {
44884486 // / differentiable with respect to this result.
44894487 NotDifferentiable = 0x1 ,
44904488
4491- // / Set if a return type is transferring . This means that the returned value
4489+ // / Set if a return type is sending . This means that the returned value
44924490 // / must be disconnected and not in any strongly structured regions like an
44934491 // / actor or a task isolated variable.
4494- IsTransferring = 0x2 ,
4492+ IsSending = 0x2 ,
44954493 };
44964494
44974495 using Options = OptionSet<Flag>;
@@ -4940,12 +4938,12 @@ class SILFunctionType final
49404938 return getExtInfo ().getIsolation ();
49414939 }
49424940
4943- // / Return true if all
4944- bool hasTransferringResult () const {
4945- // For now all functions either have all transferring results or no
4946- // transferring results. This is validated with a SILVerifier check.
4941+ // / Return true if all results are 'sending'.
4942+ bool hasSendingResult () const {
4943+ // For now all functions either have all sending results or no
4944+ // sending results. This is validated with a SILVerifier check.
49474945 return getNumResults () &&
4948- getResults ().front ().hasOption (SILResultInfo::IsTransferring );
4946+ getResults ().front ().hasOption (SILResultInfo::IsSending );
49494947 }
49504948
49514949 // / Return the array of all the yields.
@@ -7768,7 +7766,7 @@ inline TupleTypeElt TupleTypeElt::getWithType(Type T) const {
77687766inline ParameterTypeFlags ParameterTypeFlags::fromParameterType (
77697767 Type paramTy, bool isVariadic, bool isAutoClosure, bool isNonEphemeral,
77707768 ParamSpecifier ownership, bool isolated, bool isNoDerivative,
7771- bool compileTimeConst, bool hasResultDependsOn, bool isTransferring ) {
7769+ bool compileTimeConst, bool hasResultDependsOn, bool isSending ) {
77727770 // FIXME(Remove InOut): The last caller that needs this is argument
77737771 // decomposition. Start by enabling the assertion there and fixing up those
77747772 // callers, then remove this, then remove
@@ -7780,7 +7778,7 @@ inline ParameterTypeFlags ParameterTypeFlags::fromParameterType(
77807778 }
77817779 return {isVariadic, isAutoClosure, isNonEphemeral,
77827780 ownership, isolated, isNoDerivative,
7783- compileTimeConst, hasResultDependsOn, isTransferring };
7781+ compileTimeConst, hasResultDependsOn, isSending };
77847782}
77857783
77867784inline const Type *BoundGenericType::getTrailingObjectsPointer () const {
0 commit comments