Skip to content

[CoroutineAccessors] Key table membership off availability. #77265

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 12 commits into from
Oct 31, 2024

Conversation

nate-chandler
Copy link
Contributor

Visit the new accessors when they're required (which always requires the new feature, among other things), adding them to witness and virtual tables. For modify2, cache the required-ness in the same way that it is cached for modify.

Base the existence of the requirement for the underscored accessors on the availability of the non-underscored accessors. If the (non-underscored) accessor's was available earlier than the feature, interpret that to mean that the underscored version was available in that earlier version, and require the underscored version. The goal is to ensure that the ABI is preserved, so long as the simplest migration is done (namely, deleting the underscores from the old accessors).

@nate-chandler nate-chandler changed the title [CoroutineAccessor] Key table membership off availability. [CoroutineAccessors] Key table membership off availability. Oct 29, 2024
@nate-chandler nate-chandler force-pushed the general-coro/20241024/1 branch from 89d3d08 to 2bcd778 Compare October 29, 2024 19:35
Expect yield_once_2 for callee-allocated coroutines.
In preparation for putting read2 and modify2 into witness tables and
only including read and modify in them when appropriate, export these
types, mark the module resilient, but mark the types frozen.  This keeps
the test passing as written.
Test that the provided vtables are complete via CHECK-NEXT.
For FileCheck that vary on this basis.
When the CoroutineAccessors feature is enabled, `begin_apply`
instructions produce an additional result representing the allocation
done by the callee.  Fix a couple of cases where this additional result
was not being handled.
In preparation to make it more involved.
Adding a synthesis routine for modify2 separate from that for modify was
inadverently omitted during the initial inadverently.  Fix that here.
Whether read2/modify2 are required will not always be identical to
whether read/modify are required.  Add separate prediates for the
former.  For now, duplicate the latter's implementation.
Every required accessors should be visited.  Results in the new
accessors appearing in vtables and wtables.
If read2/modify2 exist, prefer them as part of the access strategy for
reading/writing/read-writing.
If the feature is enabled, base the requirement for the underscored
accessors on the availability of the non-underscored accessors.  If the
(non-underscored) accessor's was available earlier than the feature,
interpret that to mean that the underscored version was available in
that earlier version, and require the underscored version.  The goal is
to ensure that the ABI is preserved, so long as the simplest migration
is done (namely, deleting the underscores from the old accessors).

For modify2, cache the required-ness in the same way that it is cached
for modify.
@nate-chandler nate-chandler force-pushed the general-coro/20241024/1 branch from 2bcd778 to b87b42c Compare October 29, 2024 21:24
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

1 similar comment
@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler nate-chandler marked this pull request as ready for review October 30, 2024 04:22
@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler nate-chandler merged commit 65a6d03 into swiftlang:main Oct 31, 2024
7 checks passed
@nate-chandler nate-chandler deleted the general-coro/20241024/1 branch October 31, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant