[Vm-dev] Why "object becomeForward: 3" is not working?

Mariano Martinez Peck marianopeck at gmail.com
Thu Mar 17 15:03:03 UTC 2016


Ups...sorry..I didn't see that last part of the email.

On Thu, Mar 17, 2016 at 11:56 AM, Bert Freudenberg <bert at freudenbergs.de>
wrote:

>
> On 17.03.2016, at 15:54, Mariano Martinez Peck <marianopeck at gmail.com>
> wrote:
>
>
> On Thu, Mar 17, 2016 at 11:42 AM, Bert Freudenberg <bert at freudenbergs.de>
> wrote:
>
>>
>> There’s only one technical reason I am aware of, and that is that
>> becomeForward actually does change the argument’s identityHash:
>
>
> Couldn't that be solved using the #becomeForward:copyHash: flavor (passing
> `false` to copyHas:) ?
>
>
> Yes, as I wrote further down below  ;)
>
> What *does* work, however (at least in Cog and SqueakJS, although not in
>> the interpreter) is to use 'becomeForward: new copyHash: false’:
>>
>> old := 'hi'.
>> old becomeForward: 3 copyHash: false.
>> old
>> ==> 3
>>
>> ... because in the “copyHash: false” case the argument object is not
>> modified in any way.
>>
>> - Bert -
>>
>
> Sorry for my poor quoting.
>
> - Bert -
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160317/90e35652/attachment-0001.htm


More information about the Vm-dev mailing list