@@ -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 (
@@ -2692,25 +2681,22 @@ namespace {
2692
2681
}
2693
2682
2694
2683
void emitUsingAccessor (AccessorKind accessorKind,
2695
- bool isDirect,
2696
- bool isDistributed) {
2684
+ bool isDirect) {
2697
2685
auto accessor =
2698
2686
SGF.SGM .getAccessorDeclRef (Storage->getOpaqueAccessor (accessorKind));
2699
2687
2700
2688
switch (accessorKind) {
2701
2689
case AccessorKind::Set: {
2702
- assert (!isDistributed && " setters must not be 'distributed'" );
2703
2690
LLVM_FALLTHROUGH;
2704
2691
}
2705
2692
case AccessorKind::Get: {
2706
2693
auto typeData = getLogicalStorageTypeData (
2707
2694
SGF.getTypeExpansionContext (), SGF.SGM , AccessKind, FormalRValueType);
2708
- return asImpl ().emitUsingGetterSetter (accessor, isDirect, isDistributed, typeData);
2695
+ return asImpl ().emitUsingGetterSetter (accessor, isDirect, typeData);
2709
2696
}
2710
2697
2711
2698
case AccessorKind::Address:
2712
2699
case AccessorKind::MutableAddress: {
2713
- assert (!isDistributed);
2714
2700
auto typeData =
2715
2701
getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
2716
2702
AccessKind, Storage, FormalRValueType);
@@ -2719,7 +2705,6 @@ namespace {
2719
2705
2720
2706
case AccessorKind::Read:
2721
2707
case AccessorKind::Modify: {
2722
- assert (!isDistributed);
2723
2708
auto typeData =
2724
2709
getPhysicalStorageTypeData (SGF.getTypeExpansionContext (), SGF.SGM ,
2725
2710
AccessKind, Storage, FormalRValueType);
@@ -2814,8 +2799,7 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
2814
2799
SILType storageType =
2815
2800
SGF.getLoweredType (Storage->getType ()).getAddressType ();
2816
2801
LV.add <AddressorComponent>(Storage, addressor,
2817
- /* isSuper=*/ false , isDirect,
2818
- /* isDistributed=*/ false , Subs,
2802
+ /* isSuper=*/ false , isDirect, Subs,
2819
2803
CanType (), typeData, storageType, nullptr ,
2820
2804
PreparedArguments (),
2821
2805
/* isOnSelfParameter */ false );
@@ -2832,11 +2816,10 @@ void LValue::addNonMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
2832
2816
2833
2817
void emitUsingGetterSetter (SILDeclRef accessor,
2834
2818
bool isDirect,
2835
- bool isDistributed,
2836
2819
LValueTypeData typeData) {
2837
2820
LV.add <GetterSetterComponent>(
2838
2821
Storage, accessor,
2839
- /* isSuper=*/ false , isDirect, isDistributed, Subs, CanType (), typeData,
2822
+ /* isSuper=*/ false , isDirect, Subs, CanType (), typeData,
2840
2823
nullptr , PreparedArguments (),
2841
2824
/* isOnSelfParameter=*/ false ,
2842
2825
ActorIso);
@@ -3317,8 +3300,7 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
3317
3300
SILType varStorageType = SGF.SGM .Types .getSubstitutedStorageType (
3318
3301
SGF.getTypeExpansionContext (), Storage, FormalRValueType);
3319
3302
3320
- LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect,
3321
- /* isDistributed=*/ false , Subs,
3303
+ LV.add <AddressorComponent>(Storage, addressor, IsSuper, isDirect, Subs,
3322
3304
BaseFormalType, typeData, varStorageType,
3323
3305
ArgListForDiagnostics, std::move (Indices),
3324
3306
IsOnSelfParameter);
@@ -3334,10 +3316,9 @@ struct MemberStorageAccessEmitter : AccessEmitter<Impl, StorageType> {
3334
3316
3335
3317
void emitUsingGetterSetter (SILDeclRef accessor,
3336
3318
bool isDirect,
3337
- bool isDistributed,
3338
3319
LValueTypeData typeData) {
3339
3320
LV.add <GetterSetterComponent>(
3340
- Storage, accessor, IsSuper, isDirect, isDistributed, Subs,
3321
+ Storage, accessor, IsSuper, isDirect, Subs,
3341
3322
BaseFormalType, typeData, ArgListForDiagnostics, std::move (Indices),
3342
3323
IsOnSelfParameter, ActorIso);
3343
3324
}
@@ -3413,8 +3394,7 @@ void LValue::addMemberVarComponent(SILGenFunction &SGF, SILLocation loc,
3413
3394
auto typeData = getLogicalStorageTypeData (
3414
3395
SGF.getTypeExpansionContext (), SGF.SGM , AccessKind, FormalRValueType);
3415
3396
3416
- asImpl ().emitUsingGetterSetter (accessor, /* isDirect=*/ false ,
3417
- /* isDistributed=*/ true , typeData);
3397
+ asImpl ().emitUsingGetterSetter (accessor, /* isDirect=*/ false , typeData);
3418
3398
}
3419
3399
3420
3400
} emitter (SGF, loc, var, subs, isSuper, accessKind,
0 commit comments