@@ -1291,7 +1291,6 @@ namespace {
1291
1291
SILDeclRef Accessor;
1292
1292
bool IsSuper;
1293
1293
bool IsDirectAccessorUse;
1294
- bool IsDistributedAccessor;
1295
1294
bool IsOnSelfParameter;
1296
1295
SubstitutionMap Substitutions;
1297
1296
Optional<ActorIsolation> ActorIso;
@@ -1301,7 +1300,6 @@ namespace {
1301
1300
AbstractStorageDecl *decl, SILDeclRef accessor,
1302
1301
bool isSuper,
1303
1302
bool isDirectAccessorUse,
1304
- bool isDistributedAccessor,
1305
1303
SubstitutionMap substitutions,
1306
1304
CanType baseFormalType, LValueTypeData typeData,
1307
1305
ArgumentList *argListForDiagnostics,
@@ -1312,7 +1310,6 @@ namespace {
1312
1310
std::move (indices)),
1313
1311
Accessor(accessor), IsSuper(isSuper),
1314
1312
IsDirectAccessorUse(isDirectAccessorUse),
1315
- IsDistributedAccessor(isDistributedAccessor),
1316
1313
IsOnSelfParameter(isOnSelfParameter),
1317
1314
Substitutions(substitutions),
1318
1315
ActorIso(actorIso) {}
@@ -1324,7 +1321,6 @@ namespace {
1324
1321
Accessor(copied.Accessor),
1325
1322
IsSuper(copied.IsSuper),
1326
1323
IsDirectAccessorUse(copied.IsDirectAccessorUse),
1327
- IsDistributedAccessor(copied.IsDistributedAccessor),
1328
1324
IsOnSelfParameter(copied.IsOnSelfParameter),
1329
1325
Substitutions(copied.Substitutions),
1330
1326
ActorIso(copied.ActorIso) {}
@@ -1342,7 +1338,6 @@ namespace {
1342
1338
SILDeclRef accessor,
1343
1339
bool isSuper,
1344
1340
bool isDirectAccessorUse,
1345
- bool isDistributedAccessor,
1346
1341
SubstitutionMap substitutions,
1347
1342
CanType baseFormalType,
1348
1343
LValueTypeData typeData,
@@ -1351,8 +1346,7 @@ namespace {
1351
1346
bool isOnSelfParameter,
1352
1347
Optional<ActorIsolation> actorIso)
1353
1348
: AccessorBasedComponent(GetterSetterKind, decl, accessor, isSuper,
1354
- isDirectAccessorUse, isDistributedAccessor,
1355
- substitutions,
1349
+ isDirectAccessorUse, substitutions,
1356
1350
baseFormalType, typeData, subscriptArgList,
1357
1351
std::move (indices), isOnSelfParameter,
1358
1352
actorIso)
@@ -1467,7 +1461,6 @@ namespace {
1467
1461
ArgumentSource &&value, ManagedValue base) && override {
1468
1462
assert (getAccessorDecl ()->isSetter ());
1469
1463
assert (!ActorIso && " no support for cross-actor set operations" );
1470
- assert (!IsDistributedAccessor && " setters cannot be 'distributed'" );
1471
1464
SILDeclRef setter = Accessor;
1472
1465
1473
1466
if (canRewriteSetAsPropertyWrapperInit (SGF) &&
@@ -1661,7 +1654,7 @@ namespace {
1661
1654
1662
1655
rvalue = SGF.emitGetAccessor (
1663
1656
loc, getter, Substitutions, std::move (args.base ), IsSuper,
1664
- IsDirectAccessorUse, IsDistributedAccessor, std::move (args.Indices ), c,
1657
+ IsDirectAccessorUse, std::move (args.Indices ), c,
1665
1658
IsOnSelfParameter);
1666
1659
1667
1660
} // End the evaluation scope before any hop back to the current executor.
@@ -1806,14 +1799,13 @@ namespace {
1806
1799
AddressorComponent (AbstractStorageDecl *decl, SILDeclRef accessor,
1807
1800
bool isSuper,
1808
1801
bool isDirectAccessorUse,
1809
- bool isDistributed,
1810
1802
SubstitutionMap substitutions,
1811
1803
CanType baseFormalType, LValueTypeData typeData,
1812
1804
SILType substFieldType,
1813
1805
ArgumentList *argListForDiagnostics,
1814
1806
PreparedArguments &&indices, bool isOnSelfParameter)
1815
1807
: AccessorBasedComponent(AddressorKind, decl, accessor, isSuper,
1816
- isDirectAccessorUse, isDistributed,
1808
+ isDirectAccessorUse,
1817
1809
substitutions,
1818
1810
baseFormalType, typeData,
1819
1811
argListForDiagnostics, std::move(indices),
@@ -1836,7 +1828,7 @@ namespace {
1836
1828
std::move (*this ).prepareAccessorArgs (SGF, loc, base, Accessor);
1837
1829
addr = SGF.emitAddressorAccessor (
1838
1830
loc, Accessor, Substitutions, std::move (args.base ), IsSuper,
1839
- IsDirectAccessorUse, IsDistributedAccessor, std::move (args.Indices ),
1831
+ IsDirectAccessorUse, std::move (args.Indices ),
1840
1832
SubstFieldType, IsOnSelfParameter);
1841
1833
}
1842
1834
@@ -1929,7 +1921,7 @@ namespace {
1929
1921
bool isOnSelfParameter)
1930
1922
: AccessorBasedComponent(
1931
1923
CoroutineAccessorKind, decl, accessor, isSuper,
1932
- isDirectAccessorUse, /* isDistributed= */ false ,
1924
+ isDirectAccessorUse,
1933
1925
substitutions, baseFormalType, typeData,
1934
1926
argListForDiagnostics, std::move(indices), isOnSelfParameter) {}
1935
1927
@@ -2656,7 +2648,6 @@ namespace {
2656
2648
2657
2649
void emitUsingStrategy (AccessStrategy strategy) {
2658
2650
auto var = dyn_cast<VarDecl>(Storage);
2659
- bool isDistributed = var && var->isDistributed ();
2660
2651
2661
2652
switch (strategy.getKind ()) {
2662
2653
case AccessStrategy::Storage: {
@@ -2669,13 +2660,11 @@ namespace {
2669
2660
case AccessStrategy::DirectToAccessor:
2670
2661
return asImpl ()
2671
2662
.emitUsingAccessor (strategy.getAccessor (),
2672
- /* isDirect=*/ true ,
2673
- isDistributed);
2663
+ /* isDirect=*/ true );
2674
2664
2675
2665
case AccessStrategy::DispatchToAccessor:
2676
2666
return asImpl ().emitUsingAccessor (strategy.getAccessor (),
2677
- /* isDirect=*/ false ,
2678
- isDistributed);
2667
+ /* isDirect=*/ false );
2679
2668
2680
2669
case AccessStrategy::MaterializeToTemporary: {
2681
2670
auto typeData = getLogicalStorageTypeData (
@@ -2689,25 +2678,22 @@ namespace {
2689
2678
}
2690
2679
2691
2680
void emitUsingAccessor (AccessorKind accessorKind,
2692
- bool isDirect,
2693
- bool isDistributed) {
2681
+ bool isDirect) {
2694
2682
auto accessor =
2695
2683
SGF.SGM .getAccessorDeclRef (Storage->getOpaqueAccessor (accessorKind));
2696
2684
2697
2685
switch (accessorKind) {
2698
2686
case AccessorKind::Set: {
2699
- assert (!isDistributed && " setters must not be 'distributed'" );
2700
2687
LLVM_FALLTHROUGH;
2701
2688
}
2702
2689
case AccessorKind::Get: {
2703
2690
auto typeData = getLogicalStorageTypeData (
2704
2691
SGF.getTypeExpansionContext (), SGF.SGM , AccessKind, FormalRValueType);
2705
- return asImpl ().emitUsingGetterSetter (accessor, isDirect, isDistributed, typeData);
2692
+ return asImpl ().emitUsingGetterSetter (accessor, isDirect, typeData);
2706
2693
}
2707
2694
2708
2695
case AccessorKind::Address:
2709
2696
case AccessorKind::MutableAddress: {
2710
- assert (!isDistributed);
2711
2697
auto typeData =
2712
2698
getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
2713
2699
AccessKind, Storage, FormalRValueType);
@@ -2716,7 +2702,6 @@ namespace {
2716
2702
2717
2703
case AccessorKind::Read:
2718
2704
case AccessorKind::Modify: {
2719
- assert (!isDistributed);
2720
2705
auto typeData =
2721
2706
getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
2722
2707
AccessKind, Storage, FormalRValueType);
@@ -2811,8 +2796,7 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
2811
2796
SILType storageType =
2812
2797
SGF.getLoweredType (Storage->getType ()).getAddressType ();
2813
2798
LV.add <AddressorComponent>(Storage, addressor,
2814
- /* isSuper=*/ false , isDirect,
2815
- /* isDistributed=*/ false , Subs,
2799
+ /* isSuper=*/ false , isDirect, Subs,
2816
2800
CanType (), typeData, storageType, nullptr ,
2817
2801
PreparedArguments (),
2818
2802
/* isOnSelfParameter */ false );
@@ -2829,11 +2813,10 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
2829
2813
2830
2814
void emitUsingGetterSetter (SILDeclRef accessor,
2831
2815
bool isDirect,
2832
- bool isDistributed,
2833
2816
LValueTypeData typeData) {
2834
2817
LV.add <GetterSetterComponent>(
2835
2818
Storage, accessor,
2836
- /* isSuper=*/ false , isDirect, isDistributed, Subs, CanType (), typeData,
2819
+ /* isSuper=*/ false , isDirect, Subs, CanType (), typeData,
2837
2820
nullptr , PreparedArguments (),
2838
2821
/* isOnSelfParameter=*/ false ,
2839
2822
ActorIso);
@@ -3309,8 +3292,7 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
3309
3292
SILType varStorageType = SGF.SGM .Types .getSubstitutedStorageType (
3310
3293
SGF.getTypeExpansionContext (), Storage, FormalRValueType);
3311
3294
3312
- LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect,
3313
- /* isDistributed=*/ false , Subs,
3295
+ LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect, Subs,
3314
3296
BaseFormalType, typeData, varStorageType,
3315
3297
ArgListForDiagnostics, std::move (Indices),
3316
3298
IsOnSelfParameter);
@@ -3326,10 +3308,9 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
3326
3308
3327
3309
void emitUsingGetterSetter (SILDeclRef accessor,
3328
3310
bool isDirect,
3329
- bool isDistributed,
3330
3311
LValueTypeData typeData) {
3331
3312
LV.add <GetterSetterComponent>(
3332
- Storage, accessor, IsSuper, isDirect, isDistributed, Subs,
3313
+ Storage, accessor, IsSuper, isDirect, Subs,
3333
3314
BaseFormalType, typeData, ArgListForDiagnostics, std::move (Indices),
3334
3315
IsOnSelfParameter, ActorIso);
3335
3316
}
0 commit comments