Skip to content

Conversation

janbaig
Copy link
Contributor

@janbaig janbaig commented Aug 23, 2025

This work is part of the ongoing effort to reimplement property wrappers in terms of init accessors, reducing their reliance on special-case infrastructure in SILGen.

As a step toward this, the ad-hoc assign_by_wrapper instruction, specific to property wrappers, has been removed and replaced with the more general assign_or_init, which was originally introduced to support init accessors. This unifies wrapper initialization with existing compiler features instead of maintaining a separate SILGen instruction.

SILGen now synthesizes an init accessor thunk that performs the wrapper initialization (self._x = Wrapper(initialValue:)) and passes it into assign_or_init. This ensures property wrapper initialization is expressed through the same pathway as other init accessor cases.

janbaig added 23 commits July 29, 2025 21:16
@janbaig janbaig requested a review from xedin August 26, 2025 18:50
@xedin
Copy link
Contributor

xedin commented Aug 26, 2025

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Aug 26, 2025

@swift-ci please test source compatibility

@xedin
Copy link
Contributor

xedin commented Aug 28, 2025

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Aug 28, 2025

@swift-ci please test source compatibility

@xedin
Copy link
Contributor

xedin commented Aug 29, 2025

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Sep 3, 2025

@swift-ci please smoke test

@xedin
Copy link
Contributor

xedin commented Sep 3, 2025

@swift-ci please smoke test

@xedin xedin merged commit 0bcc956 into swiftlang:main Sep 3, 2025
3 checks passed
@janbaig janbaig deleted the temp-branch branch September 4, 2025 14:19
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