Eliminating superclass lookup in the VM (and dynamic composition of behavior)

Nathanael Schärli n.schaerli at gmx.net
Thu Dec 12 08:26:40 UTC 2002


Stephen

> Sure, but from my perspective, the VM is currently 
> implementing a rigid conceptual model.  If we can get that 
> out of the VM, or at least make it cleaner to override that 
> behavior, then it's much easier to play around with other 
> concepts in behavior composition...and that's what I'm after.

I see what you mean. The current VM really does not leave much freedom
for experimenting with new language properties. And therefore it is
correct that managing your own flat method dictionary is one of the
easier ways for getting something else than the traditional language
semantics as far as methods lookup and message sending is concerned.

Thus, having a more flexible VM would give people more flexibility for
playing with the language. However, these additional VM features need to
be hooked up to the Smalltalk level. This can be done in a rather
"ad-hoc" way by just adding a couple of "magic selectors" that are
invoked from the VM under certain conditions and then perform a
customized algorithm rather than the default algorithm that is specified
in the VM. However, this can also be done by creating a nice conceptual
model (e.g., a good MOP) that integrates the additional VM functionality
at a very high level of abstraction that closely corresponds to the
general philosphy of the language (e.g., a MOP is an *object-oriented*
way of specifying the semantics of our *object-oriented* programs). I
think that the latter approach is the way to go.

Nevertheless, I see that while developing and experimenting with such a
conceptual model, it would often be nice if the VM would already provide
more flexibility, even if this additional power would be accessible from
the image-level in a rather ad-hoc way.

Nathanael


> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Stephen Pair
> Sent: Thursday, December 12, 2002 2:29 AM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: RE: Eliminating superclass lookup in the VM (and 
> dynamic composition of behavior)
> 
> 
> > Once you have a conceptual model with nice properties, the 
> > implementation is just a "technical exercise", and it can 
> of course be 
> > done in different ways. Typically you encounter the same 
> > space-performance trade-off as in nearly all the other kind of 
> > implementations. As an example, just consider traits:
> 
> Sure, but from my perspective, the VM is currently 
> implementing a rigid conceptual model.  If we can get that 
> out of the VM, or at least make it cleaner to override that 
> behavior, then it's much easier to play around with other 
> concepts in behavior composition...and that's what I'm after.
> 
> With regard to how behavior is bound to a given message, 
> perhaps the only assumption that we should make (in the VM) 
> is that we can make no assumptions.
> 
> - Stephen
> 
> 




More information about the Squeak-dev mailing list