Skip to content

Commit b4ff64e

Browse files
committed
clenaups
1 parent 2e16273 commit b4ff64e

File tree

6 files changed

+9
-21
lines changed

6 files changed

+9
-21
lines changed

include/swift/AST/Witness.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ class Witness {
180180

181181
/// Retrieve the witness thunk generic signature.
182182
GenericSignature getWitnessThunkSignature() const {
183-
// TODO: find what creates/sets that
184183
if (auto *storedWitness = storage.dyn_cast<StoredWitness *>())
185184
return storedWitness->witnessThunkSig;
186185
return nullptr;

lib/IRGen/GenProto.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,10 +794,6 @@ void EmitPolymorphicParameters::injectAdHocDistributedRequirements() {
794794
IGM.getConformsToProtocolFunctionPointer(),
795795
{metadata, IGM.getAddrOfProtocolDescriptor(proto)});
796796

797-
// TODO: insufficient for lookup conformance
798-
799-
// TODO: dynamic is fine, but also put the requiremtn in the witness thunk
800-
801797
IGF.setUnscopedLocalTypeData(
802798
archetypeTy,
803799
LocalTypeDataKind::forAbstractProtocolWitnessTable(proto),

lib/SILGen/SILGenType.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,6 @@ SILFunction *SILGenModule::emitProtocolWitness(
752752
// thunk's generic signature.
753753
auto reqtSubMap = witness.getRequirementToWitnessThunkSubs();
754754

755-
// TODO: maybe fix those signature here
756755
// The generic environment for the witness thunk.
757756
auto *genericEnv = witness.getWitnessThunkSignature().getGenericEnvironment();
758757
auto genericSig = witness.getWitnessThunkSignature().getCanonicalSignature();

lib/Sema/CSSimplify.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8801,18 +8801,18 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
88018801

88028802
if (witness->isGeneric()) {
88038803
// `DistributedActorSystem.remoteCall`
8804-
if (witness->isDistributedActorSystemRemoteCall(/*isVoidReturn=*/false, /*allowRequirement=*/true)) {
8804+
if (witness->isDistributedActorSystemRemoteCall(/*isVoidReturn=*/false, /*allowRequirement=*/false)) {
88058805
if (GP->isEqual(cast<FuncDecl>(witness)->getResultInterfaceType()))
88068806
return synthesizeConformance();
88078807
}
88088808

88098809
// `DistributedTargetInvocationEncoder.record{Argument, ResultType}`
88108810
// `DistributedTargetInvocationDecoder.decodeNextArgument`
88118811
// `DistributedTargetInvocationResultHandler.onReturn`
8812-
if (witness->isDistributedTargetInvocationEncoderRecordArgument(/*allowRequirement=*/true) ||
8813-
witness->isDistributedTargetInvocationEncoderRecordReturnType(/*allowRequirement=*/true) ||
8814-
witness->isDistributedTargetInvocationDecoderDecodeNextArgument(/*allowRequirement=*/true) ||
8815-
witness->isDistributedTargetInvocationResultHandlerOnReturn(/*allowRequirement=*/true)) {
8812+
if (witness->isDistributedTargetInvocationEncoderRecordArgument(/*allowRequirement=*/false) ||
8813+
witness->isDistributedTargetInvocationEncoderRecordReturnType(/*allowRequirement=*/false) ||
8814+
witness->isDistributedTargetInvocationDecoderDecodeNextArgument(/*allowRequirement=*/false) ||
8815+
witness->isDistributedTargetInvocationResultHandlerOnReturn(/*allowRequirement=*/false)) {
88168816
auto genericParams = witness->getGenericParams()->getParams();
88178817
if (GP->isEqual(genericParams.front()->getDeclaredInterfaceType()))
88188818
return synthesizeConformance();

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5646,12 +5646,6 @@ void ConformanceChecker::resolveValueWitnesses() {
56465646
Conformance->setPreconcurrencyEffectful();
56475647
}
56485648

5649-
// TODO: make sure this new we don't include this new requirement as we do lowering
5650-
// but we do dynamic lookup in IR so we dont need to keep that requirement
5651-
// since we dont have a source for that; since there is not WT to pass in, since we'll look it up
5652-
// metadata source for that new requirement -- may already work
5653-
5654-
// TODO: maybe we dont need this here after we fix signature
56555649
// Finally, check some ad-hoc protocol requirements.
56565650
//
56575651
// These protocol requirements are not expressible in Swift today, but as

test/Distributed/Runtime/distributed_actor_remoteCall_roundtrip_optimized_or_not.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %empty-directory(%t)
22

3-
// X: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -target %target-swift-5.7-abi-triple %S/../Inputs/FakeDistributedActorSystems.swift
4-
// X: %target-build-swift -module-name main -target %target-swift-5.7-abi-triple -j2 -parse-as-library -I %t %s %S/../Inputs/FakeDistributedActorSystems.swift -o %t/a.out
5-
// X: %target-codesign %t/a.out
6-
// X: %target-run %t/a.out | %FileCheck %s --enable-var-scope
3+
// RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -target %target-swift-5.7-abi-triple %S/../Inputs/FakeDistributedActorSystems.swift
4+
// RUN: %target-build-swift -module-name main -target %target-swift-5.7-abi-triple -j2 -parse-as-library -I %t %s %S/../Inputs/FakeDistributedActorSystems.swift -o %t/a.out
5+
// RUN: %target-codesign %t/a.out
6+
// RUN: %target-run %t/a.out | %FileCheck %s --enable-var-scope
77

88
// The same test, but in optimized mode
99
// RUN: %target-swift-frontend-emit-module -O -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -target %target-swift-5.7-abi-triple %S/../Inputs/FakeDistributedActorSystems.swift

0 commit comments

Comments
 (0)