-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Simplify devirtualization and fix a bug #7779
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
c37b37c
to
f3ea3e6
Compare
@swift-ci Please test |
Build failed |
Build failed |
It looks like we didn't generate the correct cast instruction in some cases, but another workaround was masking the problem.
It looks like the devirtualizer used to have problems computing method types in the presence of generic substitutions, covariant returns and other things, so it would bail if a perticular set of pre-conditions was not met on the types of original method call and the devirtualized method call. I don't think any of this is necessary anymore. If this patch introduces any regressions, we need to fix the root cause instead of re-introducing this logic.
f3ea3e6
to
2994415
Compare
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
@slavapestov So, you couldn't resit, but remove all this "can be converted in an ABI compatible way" logic? ;-) Overall, it looks simpler. But I see a high potential for breaking things. IIRC, not all of the affected code paths are currently covered by tests. We need to see if it breaks things in the wild. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, let's merge and see of anything is broken.
"So, let's merge and see of anything is broken." That's the spirit :-) |
Replace if statements with asserts, figure out why assert is firing, delete some code, repeat.