Skip to content

[Runtime] Add entry point to compare type context descriptors. #32476

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

Conversation

nate-chandler
Copy link
Contributor

The new function swift_compareTypeContextDescriptors is equivalent to a call through to swift::equalContexts. The implementation it the same as that of swift::equalContexts with the following removals:

  • Handling of context descriptors of kind other outside of ContextDescriptorKind::Type_First...ContextDescriptorKind::Type_Last. Because the arguments are both TypeContextDescriptors, the kinds are known to fall within that range.
  • Casting to TypeContextDescriptor. The arguments are already of that type.

For now, the new function has "future" availability.

@nate-chandler nate-chandler requested a review from jckarter June 19, 2020 20:32
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 81739f624544aab9387ae3097b26892293777485

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test os x platform

@nate-chandler nate-chandler force-pushed the runtime/add-swift_compareTypeContextDescriptors branch from 81739f6 to 3c4e7bf Compare June 20, 2020 02:34
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 81739f624544aab9387ae3097b26892293777485

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 81739f624544aab9387ae3097b26892293777485

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test os x platform

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

Looks good! It might also be helpful to have a comment on the swift_compareTypeContextDescriptors declaration indicating the availability of the entry point.

The new function `swift_compareTypeContextDescriptors` is equivalent to
a call through to swift::equalContexts.  The implementation it the same
as that of swift::equalContexts with the following removals:
- Handling of context descriptors of kind other outside of
  ContextDescriptorKind::Type_First...ContextDescriptorKind::Type_Last.
  Because the arguments are both TypeContextDescriptors, the kinds are
  known to fall within that range.
- Casting to TypeContextDescriptor.  The arguments are already of that
  type.

For now, the new function has "future" availability.
@nate-chandler nate-chandler force-pushed the runtime/add-swift_compareTypeContextDescriptors branch from 3c4e7bf to 2c6d7d7 Compare June 22, 2020 19:07
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test and merge

1 similar comment
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit ecad335 into swiftlang:master Jun 22, 2020
@nate-chandler nate-chandler deleted the runtime/add-swift_compareTypeContextDescriptors branch July 5, 2023 23:36
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.

3 participants