Skip to content

TypeSystem: Avoid the ISO646 spelling of the logical operators #2001

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
Oct 21, 2020

Conversation

compnerd
Copy link
Member

Avoid the use of the ISO646 logical operator spelling. This enables the removal of the use of the ciso646 header which can cause some issues when building Swift.

Avoid the use of the ISO646 logical operator spelling.  This enables the removal of the use of the `ciso646` header which can cause some issues when building Swift.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

Copy link

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

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

😳

@@ -401,9 +401,9 @@ template <> struct less<swift::ClusteredBitVector> {
for (; iL >= 0 && iR >= 0; --iL, --iR) {

Choose a reason for hiding this comment

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

why does this even exist? Are we putting them into a std::map?

Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't answer that - I don't know why it exists, Im just trying to avoid extension usage. We could try removing it separately I suppose.

Choose a reason for hiding this comment

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

That was more a question for the room — I know you're just the messenger :-)

@@ -401,9 +401,9 @@ template <> struct less<swift::ClusteredBitVector> {
for (; iL >= 0 && iR >= 0; --iL, --iR) {
bool bL = lhs[iL];
bool bR = rhs[iR];
if (bL and not bR)

Choose a reason for hiding this comment

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

if it were my choice, we should switch everything to use not instead of !

Copy link

@kastiglione kastiglione left a comment

Choose a reason for hiding this comment

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

How does this relate to removing the use of ciso646?

@compnerd
Copy link
Member Author

The spelling here requires the use of ciso646, but with the standard spelling, that header can be excluded. This matters because there are literals spelt xor, and, and or in Swift which will be substituted improperly with that header included :-(

@compnerd compnerd merged commit a81d496 into swift/main Oct 21, 2020
@compnerd compnerd deleted the compnerd-iso646 branch October 21, 2020 16:02
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.

4 participants