Skip to content

SILGen: Emit an addressable representation for immutable bindings on demand. [take 2] #79978

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

Conversation

jckarter
Copy link
Contributor

To ensure that dependent values have a persistent-enough memory representation to point into, when an immutable binding is referenced as an addressable argument to a call, have SILGen retroactively emit a stack allocation and materialization that covers the binding's scope.

This second take alters some use of VarLocs to avoid DenseMap interior pointer invalidation.

…demand.

To ensure that dependent values have a persistent-enough memory representation
to point into, when an immutable binding is referenced as an addressable
argument to a call, have SILGen retroactively emit a stack allocation and
materialization that covers the binding's scope.
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

preset=asan
@swift-ci Please test with preset macOS platform

@jckarter jckarter merged commit 8d04ba1 into swiftlang:main Mar 13, 2025
6 checks passed
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.

1 participant