@@ -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
@@ -2655,8 +2647,6 @@ namespace {
2655
2647
AccessKind (accessKind) {}
2656
2648
2657
2649
void emitUsingStrategy (AccessStrategy strategy) {
2658
- bool isDistributed = var && var->isDistributed ();
2659
-
2660
2650
switch (strategy.getKind ()) {
2661
2651
case AccessStrategy::Storage: {
2662
2652
auto typeData =
@@ -2668,13 +2658,11 @@ namespace {
2668
2658
case AccessStrategy::DirectToAccessor:
2669
2659
return asImpl ()
2670
2660
.emitUsingAccessor (strategy.getAccessor (),
2671
- /* isDirect=*/ true ,
2672
- isDistributed);
2661
+ /* isDirect=*/ true );
2673
2662
2674
2663
case AccessStrategy::DispatchToAccessor:
2675
2664
return asImpl ().emitUsingAccessor (strategy.getAccessor (),
2676
- /* isDirect=*/ false ,
2677
- isDistributed);
2665
+ /* isDirect=*/ false );
2678
2666
2679
2667
case AccessStrategy::MaterializeToTemporary: {
2680
2668
auto typeData = getLogicalStorageTypeData (
@@ -2691,25 +2679,22 @@ namespace {
2691
2679
}
2692
2680
2693
2681
void emitUsingAccessor (AccessorKind accessorKind,
2694
- bool isDirect,
2695
- bool isDistributed) {
2682
+ bool isDirect) {
2696
2683
auto accessor =
2697
2684
SGF.SGM .getAccessorDeclRef (Storage->getOpaqueAccessor (accessorKind));
2698
2685
2699
2686
switch (accessorKind) {
2700
2687
case AccessorKind::Set: {
2701
- assert (!isDistributed && " setters must not be 'distributed'" );
2702
2688
LLVM_FALLTHROUGH;
2703
2689
}
2704
2690
case AccessorKind::Get: {
2705
2691
auto typeData = getLogicalStorageTypeData (
2706
2692
SGF.getTypeExpansionContext (), SGF.SGM , AccessKind, FormalRValueType);
2707
- return asImpl ().emitUsingGetterSetter (accessor, isDirect, isDistributed, typeData);
2693
+ return asImpl ().emitUsingGetterSetter (accessor, isDirect, typeData);
2708
2694
}
2709
2695
2710
2696
case AccessorKind::Address:
2711
2697
case AccessorKind::MutableAddress: {
2712
- assert (!isDistributed);
2713
2698
auto typeData =
2714
2699
getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
2715
2700
AccessKind, Storage, FormalRValueType);
@@ -2718,7 +2703,6 @@ namespace {
2718
2703
2719
2704
case AccessorKind::Read:
2720
2705
case AccessorKind::Modify: {
2721
- assert (!isDistributed);
2722
2706
auto typeData =
2723
2707
getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
2724
2708
AccessKind, Storage, FormalRValueType);
@@ -2813,8 +2797,7 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
2813
2797
SILType storageType =
2814
2798
SGF.getLoweredType (Storage->getType ()).getAddressType ();
2815
2799
LV.add <AddressorComponent>(Storage, addressor,
2816
- /* isSuper=*/ false , isDirect,
2817
- /* isDistributed=*/ false , Subs,
2800
+ /* isSuper=*/ false , isDirect, Subs,
2818
2801
CanType (), typeData, storageType, nullptr ,
2819
2802
PreparedArguments (),
2820
2803
/* isOnSelfParameter */ false );
@@ -2831,11 +2814,10 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
2831
2814
2832
2815
void emitUsingGetterSetter (SILDeclRef accessor,
2833
2816
bool isDirect,
2834
- bool isDistributed,
2835
2817
LValueTypeData typeData) {
2836
2818
LV.add <GetterSetterComponent>(
2837
2819
Storage, accessor,
2838
- /* isSuper=*/ false , isDirect, isDistributed, Subs, CanType (), typeData,
2820
+ /* isSuper=*/ false , isDirect, Subs, CanType (), typeData,
2839
2821
nullptr , PreparedArguments (),
2840
2822
/* isOnSelfParameter=*/ false ,
2841
2823
ActorIso);
@@ -3316,8 +3298,7 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
3316
3298
SILType varStorageType = SGF.SGM .Types .getSubstitutedStorageType (
3317
3299
SGF.getTypeExpansionContext (), Storage, FormalRValueType);
3318
3300
3319
- LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect,
3320
- /* isDistributed=*/ false , Subs,
3301
+ LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect, Subs,
3321
3302
BaseFormalType, typeData, varStorageType,
3322
3303
ArgListForDiagnostics, std::move (Indices),
3323
3304
IsOnSelfParameter);
@@ -3333,10 +3314,9 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
3333
3314
3334
3315
void emitUsingGetterSetter (SILDeclRef accessor,
3335
3316
bool isDirect,
3336
- bool isDistributed,
3337
3317
LValueTypeData typeData) {
3338
3318
LV.add <GetterSetterComponent>(
3339
- Storage, accessor, IsSuper, isDirect, isDistributed, Subs,
3319
+ Storage, accessor, IsSuper, isDirect, Subs,
3340
3320
BaseFormalType, typeData, ArgListForDiagnostics, std::move (Indices),
3341
3321
IsOnSelfParameter, ActorIso);
3342
3322
}
@@ -3412,8 +3392,7 @@ void LValue::addMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
3412
3392
auto typeData = getLogicalStorageTypeData (
3413
3393
SGF.getTypeExpansionContext (), SGF.SGM , AccessKind, FormalRValueType);
3414
3394
3415
- asImpl ().emitUsingGetterSetter (accessor, /* isDirect=*/ false ,
3416
- /* isDistributed=*/ true , typeData);
3395
+ asImpl ().emitUsingGetterSetter (accessor, /* isDirect=*/ false , typeData);
3417
3396
}
3418
3397
3419
3398
} emitter (SGF, loc, var, subs, isSuper, accessKind,
0 commit comments