[Modules] Selector Spaces

Stephen Pair spair at advantive.com
Fri Aug 17 18:53:29 UTC 2001


I had another thought on how we might be able to work selector spaces
without changing the VM...it won't perform well, but it could be a good
way to try out the concepts quickly.

Basically, a simple tweak to the way the VM handles #doesNotUnderstand:
would offer a neat solution.  Instead of sending #doesNotUnderstand: to
the recevier, send "#noResponseFrom: aMessage" to the messageSelector.
The default implementation of the message (in Object) would turn around
and send #doesNotUnderstand: to the receiver (which would need to be
added to Message).  Then, instances of Selector (which hold the symbol
and the module) could override #noResponseFrom: to retry the message in
different Selector spaces (based on imported modules and such).  But,
the main issue with this approach is that it would not jive well with
the method cache (we could not enter #noResponseFrom: into the cache
because it is not being sent to the receiver).

So, without changing the VM at all, we could alter existing
#doesNotUnderstand: implementations to approximate this behavior by
first routing the Message through the selector to see if it wants to try
another send before doing it's regular processing.  If it works out,
optimizations of this scheme to be tackled later.  (there are only about
14 implementors of #doesNotUnderstand: in the image I have)

- Stephen





More information about the Squeak-dev mailing list