-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Type checker] Make redeclaration checking validate fewer declarations. #13643
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
[Type checker] Make redeclaration checking validate fewer declarations. #13643
Conversation
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please test compiler performance |
Build failed |
Build failed |
Redeclaration checking was validating all declarations with the same base name as the given declaration (and in the same general nominal type), even when it was trivial to determine that the declarations could not be conflicting. Separate out the easy structural checks (based on kind, full name, instance vs. non-instance member, etc.) and perform those first, before validation. Fixes SR-6558, a case where redeclaration checking caused some unnecessary recursion in the type checker.
b0a6cea
to
8b58b0d
Compare
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test source compatibility |
1 similar comment
@swift-ci please test source compatibility |
@swift-ci please test compiler performance |
1 similar comment
@swift-ci please test compiler performance |
Build comment file:Summary for master fullUnexpected test results, stats may be off for FAIL_Kronos-Kronos.xcodeproj_3.0_BuildXcodeProjectTarget_Kronos_generic-platform-tvOS.log, FAIL_RxDataSources-Pods-Pods.xcodeproj_3.0_BuildXcodeProjectTarget_Pods-RxDataSources_generic-platform-iOS.log, FAIL_Kronos-Kronos.xcodeproj_3.0_BuildXcodeProjectTarget_Kronos_generic-platform-iOS.log, FAIL_Dollar-Dollar.xcodeproj_3.0_BuildXcodeProjectScheme_Dollar_generic-platform-macOS.log, 3, FAIL_Kronos-Kronos.xcodeproj_3.0_BuildXcodeProjectTarget_Kronos_generic-platform-macOS.log, FAIL_RxDataSources-Pods-Pods.xcodeproj_3.0_BuildXcodeProjectTarget_Pods-Example_generic-platform-iOS.log No regressions above thresholds Debugdebug briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
debug detailedRegressed (0)
Improved (2)
Unchanged (delta < 1.0% or delta < 100.0ms) (21)
Debug-optdebug-opt briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
debug-opt detailedRegressed (0)
Improved (2)
Unchanged (delta < 1.0% or delta < 100.0ms) (21)
Wmo-ononewmo-onone briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
wmo-onone detailedRegressed (0)
Improved (1)
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
Releaserelease briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
release detailedRegressed (0)
Improved (1)
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
|
Redeclaration checking was validating all declarations with the same
base name as the given declaration (and in the same general nominal
type), even when it was trivial to determine that the declarations
could not be conflicting. Separate out the easy structural checks
(based on kind, full name, instance vs. non-instance member, etc.) and
perform those first, before validation.
Fixes SR-6558 / rdar://problem/36068194, a case where
redeclaration checking caused some unnecessary recursion in the type
checker.