2008/10/19 Andy Wingo <[EMAIL PROTECTED]>: > I have been going through GOOPS more carefully recently, preparing to > make GOOPS and code that uses GOOPS compilable, preserving all of the > intended optimizations. It turns out the dispatch mechanism is rather > interesting. I write about it here: > > > http://wingolog.org/archives/2008/10/17/dispatch-strategies-in-dynamic-languages
Thanks, Andy, for your willingness to plunge into this far-from-perfect code which was carelessly written during a Christmas holiday as a feasibility experiment. The idea of the vector of random values comes from the implementation of CLOS called PCL. The idea of caching versions of a method invocation with specialization to argument types actually used was new to me (although I haven't read the SELF-article you cite). As, I think, Neil Jerram has stated previously, the "vision" is that one could extend GOOPS by taking advantage of this specialization. Since every specialized method stored in the method invocation cache can assume the type of its arguments, it can also remove a lot of the dispatch within its code. It's no longer necessary to check if a value passed as argument is an integer or if it is an object of class Foo. It is possible to just do an integer operation or directly access a slot in a Foo instance using a constant offset. Best regards, Mikael D.
