> Now for message receive, one could imagine a partial reification scheme: a 
> tag bit on the object header, if it is there, the VM calls a receive
> method instead of the method that would originally be called. So you would 
> pay, in all casses, one bit-check on message send *and* you need
> space to put this flag. Would anyone want to pay that?
> 
> Perhaps we can be cleverer.  What could we do if we introduced delegation 
> into the language?  Then we can add wrappers around objects and put the 
> interception into the wrappers.  This way there is no additional check.  If 
> one wants to intercept references to an object one creates a DNU wrapper and 
> becomes the two objects.
> 
> An execution model of delegation is that there are two slots for the receiver 
> in a context, a state slot through which inst vars are accessed, and a self 
> slot to which messages are sent.  Normal sends merely duplicate the receiver 
> into both slots.  Delegating sends take state as an additional argument.
> 
> An alternative model is to dispense with direct inst var access (assuming the 
> JIT will inline simple accessors in PICs, or simply by virtue of the use of 
> machine code render accessors affordable) and provide accessors for 
> delegators that indirect through the delegate.

Eliot indeed this kind of schem looks interesting. I would love a system where 
we can really experiment with that kind of infrastructural changes
that open a lot of new space.

Stef


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to