> On Apr 1, 2016, at 4:10 PM, Andrew Trick via swift-dev
> wrote:
>> On Apr 1, 2016, at 8:43 AM, Joe Groff via swift-dev
>> wrote:
>>
>>
>>> On Mar 31, 2016, at 11:49 PM, Patrick Pijnappel
>>> wrote:
>>>
>>> The modified version doesn't seem to change any of the results (on -O or
>>> -Ono
> On Apr 1, 2016, at 8:43 AM, Joe Groff via swift-dev
> wrote:
>
>
>> On Mar 31, 2016, at 11:49 PM, Patrick Pijnappel
>> wrote:
>>
>> The modified version doesn't seem to change any of the results (on -O or
>> -Onone). Note that the problem is that it's not uniquely referenced inside
>> b
> On Mar 31, 2016, at 11:49 PM, Patrick Pijnappel
> wrote:
>
> The modified version doesn't seem to change any of the results (on -O or
> -Onone). Note that the problem is that it's not uniquely referenced inside
> bar where it actually should be – that would mean that ownership is currently
Ok I checked, in the version from my original email we have:
callq _swift_retain
movq %rbx, %rdi
callq __TF4main3barFVS_3FooT_
movq %rbx, %rdi
callq _swift_release
Which makes foo obviously non-uniquely referenced inside bar, preventing
COW optimization. So it seems the optimizer somehow doe
The modified version doesn't seem to change any of the results (on -O or
-Onone). Note that the problem is that it's *not* uniquely referenced
inside bar where it actually should be – that would mean that ownership is
currently not directly transferred right?
On Fri, Apr 1, 2016 at 10:27 AM, Joe G
> On Mar 31, 2016, at 4:21 PM, Joe Groff via swift-dev
> wrote:
>
>>
>> On Mar 31, 2016, at 3:58 PM, Patrick Pijnappel via swift-dev
>> wrote:
>>
>> In trying to implement a COW type, but I'm running into problems with
>> isUniqueReferenced breaking in even fairly simple cases. For example
> On Mar 31, 2016, at 3:58 PM, Patrick Pijnappel via swift-dev
> wrote:
>
> In trying to implement a COW type, but I'm running into problems with
> isUniqueReferenced breaking in even fairly simple cases. For example (with
> -O) the code below prints "bar: false", commenting out the print in
In trying to implement a COW type, but I'm running into problems with
isUniqueReferenced breaking in even fairly simple cases. For example (with
-O) the code below prints "bar: false", commenting out the print in
test() makes
it print "bar: true", and removing the var parameter var foo: Foo and usi