@@ -1291,7 +1291,6 @@ namespace {
12911291 SILDeclRef Accessor;
12921292 bool IsSuper;
12931293 bool IsDirectAccessorUse;
1294- bool IsDistributedAccessor;
12951294 bool IsOnSelfParameter;
12961295 SubstitutionMap Substitutions;
12971296 Optional<ActorIsolation> ActorIso;
@@ -1301,7 +1300,6 @@ namespace {
13011300 AbstractStorageDecl *decl, SILDeclRef accessor,
13021301 bool isSuper,
13031302 bool isDirectAccessorUse,
1304- bool isDistributedAccessor,
13051303 SubstitutionMap substitutions,
13061304 CanType baseFormalType, LValueTypeData typeData,
13071305 ArgumentList *argListForDiagnostics,
@@ -1312,7 +1310,6 @@ namespace {
13121310 std::move (indices)),
13131311 Accessor(accessor), IsSuper(isSuper),
13141312 IsDirectAccessorUse(isDirectAccessorUse),
1315- IsDistributedAccessor(isDistributedAccessor),
13161313 IsOnSelfParameter(isOnSelfParameter),
13171314 Substitutions(substitutions),
13181315 ActorIso(actorIso) {}
@@ -1324,7 +1321,6 @@ namespace {
13241321 Accessor(copied.Accessor),
13251322 IsSuper(copied.IsSuper),
13261323 IsDirectAccessorUse(copied.IsDirectAccessorUse),
1327- IsDistributedAccessor(copied.IsDistributedAccessor),
13281324 IsOnSelfParameter(copied.IsOnSelfParameter),
13291325 Substitutions(copied.Substitutions),
13301326 ActorIso(copied.ActorIso) {}
@@ -1342,7 +1338,6 @@ namespace {
13421338 SILDeclRef accessor,
13431339 bool isSuper,
13441340 bool isDirectAccessorUse,
1345- bool isDistributedAccessor,
13461341 SubstitutionMap substitutions,
13471342 CanType baseFormalType,
13481343 LValueTypeData typeData,
@@ -1351,8 +1346,7 @@ namespace {
13511346 bool isOnSelfParameter,
13521347 Optional<ActorIsolation> actorIso)
13531348 : AccessorBasedComponent(GetterSetterKind, decl, accessor, isSuper,
1354- isDirectAccessorUse, isDistributedAccessor,
1355- substitutions,
1349+ isDirectAccessorUse, substitutions,
13561350 baseFormalType, typeData, subscriptArgList,
13571351 std::move (indices), isOnSelfParameter,
13581352 actorIso)
@@ -1467,7 +1461,6 @@ namespace {
14671461 ArgumentSource &&value, ManagedValue base) && override {
14681462 assert (getAccessorDecl ()->isSetter ());
14691463 assert (!ActorIso && " no support for cross-actor set operations" );
1470- assert (!IsDistributedAccessor && " setters cannot be 'distributed'" );
14711464 SILDeclRef setter = Accessor;
14721465
14731466 if (canRewriteSetAsPropertyWrapperInit (SGF) &&
@@ -1661,7 +1654,7 @@ namespace {
16611654
16621655 rvalue = SGF.emitGetAccessor (
16631656 loc, getter, Substitutions, std::move (args.base ), IsSuper,
1664- IsDirectAccessorUse, IsDistributedAccessor, std::move (args.Indices ), c,
1657+ IsDirectAccessorUse, std::move (args.Indices ), c,
16651658 IsOnSelfParameter);
16661659
16671660 } // End the evaluation scope before any hop back to the current executor.
@@ -1806,14 +1799,13 @@ namespace {
18061799 AddressorComponent (AbstractStorageDecl *decl, SILDeclRef accessor,
18071800 bool isSuper,
18081801 bool isDirectAccessorUse,
1809- bool isDistributed,
18101802 SubstitutionMap substitutions,
18111803 CanType baseFormalType, LValueTypeData typeData,
18121804 SILType substFieldType,
18131805 ArgumentList *argListForDiagnostics,
18141806 PreparedArguments &&indices, bool isOnSelfParameter)
18151807 : AccessorBasedComponent(AddressorKind, decl, accessor, isSuper,
1816- isDirectAccessorUse, isDistributed,
1808+ isDirectAccessorUse,
18171809 substitutions,
18181810 baseFormalType, typeData,
18191811 argListForDiagnostics, std::move(indices),
@@ -1836,7 +1828,7 @@ namespace {
18361828 std::move (*this ).prepareAccessorArgs (SGF, loc, base, Accessor);
18371829 addr = SGF.emitAddressorAccessor (
18381830 loc, Accessor, Substitutions, std::move (args.base ), IsSuper,
1839- IsDirectAccessorUse, IsDistributedAccessor, std::move (args.Indices ),
1831+ IsDirectAccessorUse, std::move (args.Indices ),
18401832 SubstFieldType, IsOnSelfParameter);
18411833 }
18421834
@@ -1929,7 +1921,7 @@ namespace {
19291921 bool isOnSelfParameter)
19301922 : AccessorBasedComponent(
19311923 CoroutineAccessorKind, decl, accessor, isSuper,
1932- isDirectAccessorUse, /* isDistributed= */ false ,
1924+ isDirectAccessorUse,
19331925 substitutions, baseFormalType, typeData,
19341926 argListForDiagnostics, std::move(indices), isOnSelfParameter) {}
19351927
@@ -2656,7 +2648,6 @@ namespace {
26562648
26572649 void emitUsingStrategy (AccessStrategy strategy) {
26582650 auto var = dyn_cast<VarDecl>(Storage);
2659- bool isDistributed = var && var->isDistributed ();
26602651
26612652 switch (strategy.getKind ()) {
26622653 case AccessStrategy::Storage: {
@@ -2669,13 +2660,11 @@ namespace {
26692660 case AccessStrategy::DirectToAccessor:
26702661 return asImpl ()
26712662 .emitUsingAccessor (strategy.getAccessor (),
2672- /* isDirect=*/ true ,
2673- isDistributed);
2663+ /* isDirect=*/ true );
26742664
26752665 case AccessStrategy::DispatchToAccessor:
26762666 return asImpl ().emitUsingAccessor (strategy.getAccessor (),
2677- /* isDirect=*/ false ,
2678- isDistributed);
2667+ /* isDirect=*/ false );
26792668
26802669 case AccessStrategy::MaterializeToTemporary: {
26812670 auto typeData = getLogicalStorageTypeData (
@@ -2689,25 +2678,22 @@ namespace {
26892678 }
26902679
26912680 void emitUsingAccessor (AccessorKind accessorKind,
2692- bool isDirect,
2693- bool isDistributed) {
2681+ bool isDirect) {
26942682 auto accessor =
26952683 SGF.SGM .getAccessorDeclRef (Storage->getOpaqueAccessor (accessorKind));
26962684
26972685 switch (accessorKind) {
26982686 case AccessorKind::Set: {
2699- assert (!isDistributed && " setters must not be 'distributed'" );
27002687 LLVM_FALLTHROUGH;
27012688 }
27022689 case AccessorKind::Get: {
27032690 auto typeData = getLogicalStorageTypeData (
27042691 SGF.getTypeExpansionContext (), SGF.SGM , AccessKind, FormalRValueType);
2705- return asImpl ().emitUsingGetterSetter (accessor, isDirect, isDistributed, typeData);
2692+ return asImpl ().emitUsingGetterSetter (accessor, isDirect, typeData);
27062693 }
27072694
27082695 case AccessorKind::Address:
27092696 case AccessorKind::MutableAddress: {
2710- assert (!isDistributed);
27112697 auto typeData =
27122698 getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
27132699 AccessKind, Storage, FormalRValueType);
@@ -2716,7 +2702,6 @@ namespace {
27162702
27172703 case AccessorKind::Read:
27182704 case AccessorKind::Modify: {
2719- assert (!isDistributed);
27202705 auto typeData =
27212706 getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
27222707 AccessKind, Storage, FormalRValueType);
@@ -2811,8 +2796,7 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
28112796 SILType storageType =
28122797 SGF.getLoweredType (Storage->getType ()).getAddressType ();
28132798 LV.add <AddressorComponent>(Storage, addressor,
2814- /* isSuper=*/ false , isDirect,
2815- /* isDistributed=*/ false , Subs,
2799+ /* isSuper=*/ false , isDirect, Subs,
28162800 CanType (), typeData, storageType, nullptr ,
28172801 PreparedArguments (),
28182802 /* isOnSelfParameter */ false );
@@ -2829,11 +2813,10 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
28292813
28302814 void emitUsingGetterSetter (SILDeclRef accessor,
28312815 bool isDirect,
2832- bool isDistributed,
28332816 LValueTypeData typeData) {
28342817 LV.add <GetterSetterComponent>(
28352818 Storage, accessor,
2836- /* isSuper=*/ false , isDirect, isDistributed, Subs, CanType (), typeData,
2819+ /* isSuper=*/ false , isDirect, Subs, CanType (), typeData,
28372820 nullptr , PreparedArguments (),
28382821 /* isOnSelfParameter=*/ false ,
28392822 ActorIso);
@@ -3309,8 +3292,7 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
33093292 SILType varStorageType = SGF.SGM .Types .getSubstitutedStorageType (
33103293 SGF.getTypeExpansionContext (), Storage, FormalRValueType);
33113294
3312- LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect,
3313- /* isDistributed=*/ false , Subs,
3295+ LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect, Subs,
33143296 BaseFormalType, typeData, varStorageType,
33153297 ArgListForDiagnostics, std::move (Indices),
33163298 IsOnSelfParameter);
@@ -3326,10 +3308,9 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
33263308
33273309 void emitUsingGetterSetter (SILDeclRef accessor,
33283310 bool isDirect,
3329- bool isDistributed,
33303311 LValueTypeData typeData) {
33313312 LV.add <GetterSetterComponent>(
3332- Storage, accessor, IsSuper, isDirect, isDistributed, Subs,
3313+ Storage, accessor, IsSuper, isDirect, Subs,
33333314 BaseFormalType, typeData, ArgListForDiagnostics, std::move (Indices),
33343315 IsOnSelfParameter, ActorIso);
33353316 }
0 commit comments