Skip to content

[Distributed] Undo new record and mangling scheme for dist.p.witnesses #71801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Feb 22, 2024

This change undoes an approach we thought viable to encode distributed
actor remote targets, as encoding their protocol method names. This also
needed extra metadata sections and tricky "find if this is a witness or
not" methods;

Instead, we will be mangling the concrete names; and special handle
proxy types that are prefixed with $. This way we will not need extra
metadata records, and can handle generic calls more properly.

This XFAILs one test which was testing new functionality, that is
pending now until we implement the new mangling scheme.

@ktoso ktoso force-pushed the wip-remove-accessor-protocol-sections branch from fe4eb76 to 0d80c8b Compare February 22, 2024 04:45
@ktoso ktoso marked this pull request as ready for review February 22, 2024 04:45
@ktoso ktoso requested review from bnbarham and removed request for a team, xedin, slavapestov, mikeash, al45tair and hborla February 22, 2024 04:45
@ktoso ktoso changed the title [WIP][Distributed] Remove protocol accessible section; not used after all [Distributed] Undo new record and mangling scheme for dist.p.witnesses Feb 22, 2024
@ktoso ktoso requested a review from xedin February 22, 2024 04:46
@ktoso
Copy link
Contributor Author

ktoso commented Feb 22, 2024

@swift-ci please test

@ktoso ktoso added the distributed Feature → concurrency: distributed actor label Feb 22, 2024
@@ -390,6 +390,7 @@ bool swift::checkDistributedSerializationRequirementIsExactlyCodable(
std::count(protocols.begin(), protocols.end(), decodable) == 1;
}

// TODO(distributed): probably can be removed?
llvm::ArrayRef<ValueDecl *>
AbstractFunctionDecl::getDistributedMethodWitnessedProtocolRequirements() const {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure yet so I kept it around for now

@@ -359,7 +355,6 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
#define __ptrauth_swift_escalation_notification_function
#define __ptrauth_swift_dispatch_invoke_function
#define __ptrauth_swift_accessible_function_record
#define __ptrauth_swift_accessible_protocol_requirement_function_record
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're removing the entire new section kind; this is safe since no release is using this yet.

This change undoes an approach we thought viable to encode distributed
actor remote targets, as encoding their protocol method names. This also
needed extra metadata sections and tricky "find if this is a witness or
not" methods;

Instead, we will be mangling the concrete names; and special handle
proxy types that are prefixed with `$`. This way we will not need extra
metadata records, and can handle generic calls more properly.

This XFAILs one test which was testing new functionality, that is
pending now until we implement the new mangling scheme.
@ktoso ktoso force-pushed the wip-remove-accessor-protocol-sections branch from 5383b7e to 44b1227 Compare February 22, 2024 04:57
@ktoso
Copy link
Contributor Author

ktoso commented Feb 22, 2024

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented Feb 22, 2024

Merging as we'll build the new mangling scheme anew from clean slate.

@ktoso
Copy link
Contributor Author

ktoso commented Feb 22, 2024

Thanks for review Mike!

@ktoso ktoso merged commit 1d44e2e into swiftlang:main Feb 22, 2024
@ktoso ktoso deleted the wip-remove-accessor-protocol-sections branch February 22, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants