[self-interest] inheritance in Self
David.Ungar at Sun.COM
Thu Sep 19 04:56:25 UTC 2002
We use the most obvious trick in the world; a bit in the object's header
just for this purpose. Lookup sets the bit when it sees the object, and
clears them all when
it's done. I think the bit may also be used for the collector, so it is
not entirely profligate.
My pleasure, Steve. I enjoyed reading about your own language,
On Wednesday, September 18, 2002, at 06:11 PM, Steve Dekorte wrote:
> On Wednesday, September 18, 2002, at 05:26 PM, David Ungar wrote:
>> Not every object is guaranteed to respond to any particular message.
>> Lookup loops *are* allowed in Self. The virtual machine simply stops
>> following parent links
>> if it gets to an object it has already traversed.
> Interesting. Do you use any tricks to make checking if the parent has
> already been searched on each lookup fast? The only thing that occurs
> me is OR-ing each new parent pointer into variable and then doing an
> with of this with the next parent pointer to see if a check is needed,
> but this becomes ineffective on long parent chains. Also, pointers are
> less spread out in copying garbage collectors like the one Self uses.
> guess if each object stored a hash value of itself, that could be used)
> Thanks for the response,
> Your use of Yahoo! Groups is subject to
More information about the Self-interest