strange method in Croquet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

strange method in Croquet

askoh
Administrator
futureSend:at:args:
has senders. But those methods does not show the method being used. Why? What is happening?

Aik-Siong Koh
Reply | Threaded
Open this post in threaded view
|

Re: strange method in Croquet

Bert Freudenberg

On 06.01.2009, at 13:48, askoh wrote:

>
> futureSend:at:args:
> has senders. But those methods does not show the method being used.  
> Why?
> What is happening?


The compiler optimizes messages of the form

        receiver future doSomethingWith: someObject

into

        receiver futureSend: #doSomethingWith: at: 0 args: {someObject}

This is fully equivalent but avoids creating a TFutureMaker instance  
which would otherwise do the same in its #doesNotUnderstand: method  
(see #future).

- Bert -