Skip to content

[cast-opt] Eliminate always true if statement. #23086

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

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Mar 5, 2019

I think that this is a result of previous refactorings. This code has a long
time assert in it that Src (since 2016) is an object and for a long time the bridged type has
always been an object (since 2015). So, thus we know that the following is always true.

SILBridgedTy != Src->getType()

I also removed a level of indentation. NFC.

The 2015 commit hash is: 2dd38ee (the original commit).
The 2016 commit hash is: 506ab98

@gottesmm gottesmm requested a review from atrick March 5, 2019 04:53
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 5, 2019

@swift-ci smoke test and merge

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 5, 2019

Sorry. I meant to write that there has been a long time assert that Src is an address and BridgedObject has always been an object. I am going to fix the commit msg and retest.

I think that this is a result of previous refactorings. This code has a long
time assert in it that Src (since 2016) is an address and for a long time the bridged type has
always been an object (since 2015). So, thus we know that the following is always true.

  SILBridgedTy != Src->getType()

I also removed a level of indentation. NFC.

The 2015 commit hash is: 2dd38ee (the original commit).
The 2016 commit hash is: 506ab98
@gottesmm gottesmm force-pushed the pr-706deb33fc2fb07b5b920a486f7696ceb08a8fc3 branch from 1117aa0 to 2764559 Compare March 5, 2019 04:59
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 5, 2019

@swift-ci smoke test and merge

3 similar comments
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 5, 2019

@swift-ci smoke test and merge

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 5, 2019

@swift-ci smoke test and merge

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 5, 2019

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 0d9b196 into swiftlang:master Mar 5, 2019
@gottesmm gottesmm deleted the pr-706deb33fc2fb07b5b920a486f7696ceb08a8fc3 branch March 5, 2019 06:16
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.

2 participants