Skip to content

Conversation

@mikeash
Copy link
Contributor

@mikeash mikeash commented Apr 5, 2024

Cherry-pick #72870 to release/6.0.

The descriptor and arguments for prespecialized metadata will always be in the shared cache. Skip creating the mangling for any lookup involving pointers outside the shared cache, as an optimization.

rdar://125974577

…ving pointers outside the shared cache.

The descriptor and arguments for prespecialized metadata will always be in the shared cache. Skip creating the mangling for any lookup involving pointers outside the shared cache, as an optimization.

rdar://125974577

(cherry picked from commit 98229fe)
@mikeash mikeash requested a review from a team as a code owner April 5, 2024 18:35
@mikeash
Copy link
Contributor Author

mikeash commented Apr 5, 2024

Explanation: Computing the mangled name for a prespecialized generic metadata request is somewhat expensive. This optimization avoids it altogether when the addresses of the descriptor or generic arguments mean we know for sure we won't find one anyway.
Original PR: #72870
Reviewed by: @al45tair
Risk: Low. The range checks are straightforward.
Resolves: rdar://125974577
Tests: Manual testing.

@mikeash
Copy link
Contributor Author

mikeash commented Apr 5, 2024

@swift-ci please test

@al45tair
Copy link
Contributor

al45tair commented Apr 8, 2024

@swift-ci Please test macOS platform

@mikeash
Copy link
Contributor Author

mikeash commented Apr 8, 2024

@swift-ci please test macos platform

@mikeash mikeash merged commit 027da91 into swiftlang:release/6.0 Apr 8, 2024
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.

3 participants