Skip to content

[5.9][Runtime] Skip metadata records search for classes in the __C module. #66176

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
May 27, 2023

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented May 26, 2023

Cherry-pick #66109 to release/5.9.

ObjC classes won't be found, so don't spend lots of time searching for them.

rdar://109783948
(cherry picked from commit f9599dd)

…dule.

ObjC classes won't be found, so don't spend lots of time searching for them.

rdar://109783948
(cherry picked from commit f9599dd)
@mikeash mikeash requested a review from a team as a code owner May 26, 2023 16:53
@mikeash
Copy link
Contributor Author

mikeash commented May 26, 2023

• Description: We currently do slow scans of all available Swift types when looking up mangled names that refer to ObjC classes, such as __C.NSObject. These scans always fail, and this change skips them entirely.
• Risk: Low. It's possible we've missed some case where such type records actually exist where Swift looks for them, and the scan would therefore succeed. Naturally, we don't believe this to actually be the case.
• Original PR: #66109
• Reviewed By: @al45tair
• Testing: The Swift test suite thoroughly tests these type lookups.
• Resolves: rdar://109783948

@mikeash
Copy link
Contributor Author

mikeash commented May 26, 2023

@swift-ci please test

@mikeash mikeash merged commit 67453a1 into swiftlang:release/5.9 May 27, 2023
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