[Vm-dev] become: bug

Florin Mateoc florin.mateoc at gmail.com
Sun Jan 31 14:18:42 UTC 2016


On 1/31/2016 8:04 AM, Bert Freudenberg wrote:
>  
>
>
> Uh, nice brain twister.
>
> It sounds obvious at first that if an object had a reference to itself, this invariant would stay even when exchanging its identity.
>
> But actually “become” means that every slot that was pointing to the one object is now pointing to the other. So yes, that array now must point to the new object if it formerly pointed to the array.
>
> With a one-way “b becomeForward: a” of course it’s different, because only references to ‘b’ are replaced with references to ‘a’, references to ‘a’ are not touched at all.
>
> So David’s right, there is no bug.
>
> - Bert -
>

Thank you, Bert, for spelling it out.
I needed the slot visualization to dispel the confusion

Florin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160131/2a7198b2/attachment-0001.htm


More information about the Vm-dev mailing list