Re: there is a subtle problem doing: mySlot := obj getSlot(slotname)

Jan-Paul Bultmann <[email protected]> Tue, 08 Nov 2011 17:42:31 +0100
Newsgroups gmane.comp.lang.io
Message-ID <[email protected]>
Our metas and proxy stuff was also only for activatables :)

Maybe we can do that as an optimization for metas?
Jer why dont we implement them and see what we can optimize and inline.
Optimization is never clean :/

And metas will be worth it for further concepts like permissions and contracts. (typing)

Sent from my iPhone

On 08.11.2011, at 16:42, Mildred Ki'Lya <[email protected]> wrote:

> 
> 
> That is a huge overhead on the system, wrapping all arguments in blocks. Block activation isn't exactly expensive, but when you start doing it all over the place, it adds up quickly. Using an inlineMethod would be marginally better, in terms of speed and pressure on the heap, but still would add up to significant overhead with the extra messages being used.
> 
> The idea was to wrap only objects that are activable, like the read barrier you thought about. All other objects would be left unchanged.
>  
> 
> There's a simple solution which is cheap staring us in the face, I know it. Just haven't found it yet.
> 
> What about storing the activable bit with the slot itself, and introduce a new operator.
> I know, that  breaks code, but we can perhaps think further in that direction for a solution that will be backward compatible.
> 
> The idea is simple, the activable bit is not stored in the method, but in the object having the method as a slot. It is triggered using a new operator. For instance:
> 
> A := Object clone do(
>   performSomething <- method(...)
> )
> 
> This would be equivalent to
> 
> A := Object clone do(
>   newActivableSlot("performSomething", method(...))
> )
> 
> When you do:
> 
> A performSomething
> 
> it would be equivalent to:
> 
> A getActivatedSlot("performSomething")
> 
> And getActivatedSlot would look to see if the slot was assigned using := or <- operator (it would look up the activable bit). If the activable bit is set for this slot, it would activate it before returning the result.
> 
> Mildred
> 
> 
> -- 
> Mildred Ki'Lya
> http://mildred.fr
>