[swift-evolution] Pitch: Copy constructors for structs

Félix Cloutier felixcca at yahoo.ca
Thu Dec 24 15:13:44 CST 2015


Oh well. I thought I had done due diligence! One less thing to be wrong about in the future.

Félix

> Le 24 déc. 2015 à 16:07:25, Joe Groff <jgroff at apple.com> a écrit :
> 
> 
>> 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