[squeak-dev] Newbie Question (about OOPs, maybe) (sorry)

Eliot Miranda eliot.miranda at gmail.com
Thu Aug 20 01:20:51 UTC 2009


On Wed, Aug 19, 2009 at 6:05 PM, Ronald Spengler <ron.spengler at gmail.com>wrote:

> This may be my best newbie question ever! Thanks everyone, this has been
> most informative:)
> Is replacing #asOOP with #identityHash bugworthy, do you think?
>

Potentially, yes.  asOOP is one-to-one whereas identityHash is many-to-one,
i.e. oops are unique but identityHashes are not.

>
>
>  - Ron
>
>
> On Wed, Aug 19, 2009 at 3:02 PM, Michael van der Gulik <mikevdg at gmail.com>wrote:
>
>>
>>
>> On Wed, Aug 19, 2009 at 11:51 PM, Bert Freudenberg <bert at freudenbergs.de>wrote:
>>
>>
>>> The intention however was just to print out a number that is unique for
>>> each different instance so that you can see whether two variables are
>>> pointing to the same morph. This is useful for debugging.
>>>
>>>
>>> Indeed. IMHO, all uses of #asOOP should be replaced by #identityHash
>>> (outside of the VMMaker package anyway), and the comment in asOOP updated
>>> (or remove it altogether).
>>>
>>
>>
>> /me thinks...
>>
>> I knew that >>identityHash returned bits from the object header, and I
>> knew that Squeak uses direct pointers, but I never put the two together.
>>
>> I shall remove references to >>asOop in all of my code.
>>
>>
>>> (*) Even in a VM compiled on a 64 bit host OOPs are 32 bits. Only in "64
>>> bit images" OOPs are extended to 64 bits, but they are not in use yet. And
>>> we might rather like to re-introduce an object table anyway, which even with
>>> 32 bit OOPs would give us 2 billion objects ;)
>>>
>>
>> Nah. Make a block-based VM:
>> http://gulik.pbworks.com/Block-based+virtual+machine.
>>
>> Then you can have terrabyte-sized images which page to/from disk, and have
>> lots of concurrency in the VM :-).
>>
>> Unfortunately, the idea is great but it's not on my TODO list.
>>
>> Gulik.
>>
>> --
>> http://gulik.pbwiki.com/
>>
>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090819/87b7b24e/attachment.htm


More information about the Squeak-dev mailing list