[swift-evolution] Pitch: Copy constructors for structs

Joe Groff jgroff at apple.com
Thu Dec 24 15:07:25 CST 2015


> On Dec 24, 2015, at 1:04 PM, FĂ©lix Cloutier <felixcca at yahoo.ca> wrote:
> 
> At which point does that happen? The O0 SIL for it has an alloc_stack $Point in main.
> 
> Otherwise, that's hard-to-predict copy elision at work anyway.

The alloc_stack is passed into materializeForSet, but it's not required to take advantage of it. materializeForSet will either initialize the stack space with the temporary result of `get` from a computed property and return the stack address back, or leave it uninitialized and return the original physical address of a stored property.

-Joe


More information about the swift-evolution mailing list