Files
swift-mirror/test/SILOptimizer
Artem Chikin d04ae47801 Allow initializing a wrapped property with a nonmutating setter
This is achieved in 3 steps:
1. CSApply detects assignments to property wrappers inside constructors, and produces an `inout` expr instead of a `load`, which it normally would because nonmutating setters take the `self` by-value. This is necessary becasue the assign_by_wrapper instruction expects an address type for its $1 operand.
2. SILGenLValue now emits the assign_by_wrapper pattern for such setters, ignoring the fact that they capture `self` by value. It also introduces an additional load instruction for the setter patrial_apply because the setter signature still expects a value and we now have an address (because of (1)).
3. DefiniteInitialization specifically ignores load instructions used to produce a `self` value for a setter referenced on assign_by_wrapper because it will be deleted by lowering anyway.

Resolves rdar://problem/60600911 and rdar://problem/52280477
2020-04-30 14:49:22 -07:00
..
2020-03-19 02:20:21 -04:00
2020-03-19 02:20:21 -04:00
2020-03-19 02:20:21 -04:00
2020-04-07 21:16:21 -07:00
2020-03-19 02:20:21 -04:00
2020-04-28 08:22:23 -07:00
2020-03-19 02:20:21 -04:00
2020-03-19 02:20:21 -04:00
2020-03-19 02:20:21 -04:00
2020-03-19 02:20:21 -04:00
2020-03-19 02:20:21 -04:00