Peeping At The KeyHole
Craig Latta
craig at netjam.org
Tue May 2 20:00:39 UTC 2006
Hi Chris--
> ...how did you ever solve your issue about methods implemented in
> superclasses..
>
> i.e., in the master image I have MyDomainClass>>#name, but
> Object>>#name has already been faulted down, so I'm not getting the
> correct implementation because DNU was not invoked...
Ah, I love this trick. :) In my changes to the garbage collector, I
made it so that inert methods get replaced with nil, but the
corresponding associations persist in their method dictionaries. And I
changed method lookup in the virtual machine so that, when it finds one
of those nils, it behaves as if there's no matching method at all
anywhere in the class hierarchy.
So great, you already brought in Object>>name. But there's still an
entry for >>name in the method dictionary for MyDomainClass, and it
refers to nil instead of a compiled method. So when you send name to an
instance of MyDomainClass, a message-not-understood results, and
MyDomainClass>>name gets swapped in.
At some point, I'll remove all remaining "placeholders" from the kernel
image (remember that a lot of them get nuked anyway when their entire
class gets collected, due to a lack of references). But probably not
until I've personally gone over every single "real" method remaining,
written a comment for it, commented its class, its module, etc. :)
With my previous two kernel images, I was able to point to any
individual byte and justify why it was there (with the aid of the
visualization tools[1]). I'm confident I'll be able to do the same with
the latest kernel image, even though it does a little more than the
other ones.
thanks,
-C
--
Craig Latta
improvisational musical informaticist
www.netjam.org
Smalltalkers do: [:it | All with: Class, (And love: it)]
More information about the Spoon
mailing list