[ENH request] self class.

Avi Bryant avi at beta4.com
Sat Oct 16 10:19:12 UTC 2004


On Oct 16, 2004, at 9:21 AM, stéphane ducasse wrote:

> Thanks for these numbers.
> I was thinking about the following:
> 	- could not we late bound the choice in a MOP way?
> 	ie normally inlined full speed and only for the classes that need it 
> use plain messages?
> 	
> 	- because except for certain cases we will need to redefine class and 
> we only want to pay in that
> 	case. So this is a MOP entry for me.

The problem is that the optimization happens at the send site, whereas 
the redefinition happens at the receiver.  So if you have any class in 
the system that you want to redefine #class for, then every method in 
the system (potentially) needs to use a real send for it.  So I don't 
see how a MOP could help here.

You could certainly use the optimization until the first time #class is 
redefined, and then recompile all the methods that send it...

Avi




More information about the Squeak-dev mailing list