assignment message (Re: [squeak-dev] Re: Selectors
with underscores)
Bert Freudenberg
bert at freudenbergs.de
Thu Mar 18 15:27:32 UTC 2010
On 18.03.2010, at 15:57, Stéphane Rollandin wrote:
>
>> E.g. this
>>
>> | a b |
>> a := 42.
>> b := a.
>> ^ b
>>
>> is fully equivalent to
>>
>> | a b |
>> a := 42.
>> thisContext at: 2 put: (thisContext at: 1).
>> ^ b
>
> thanks for the clarification.
>
> can the
> | a b |
> part also be rewritten by sending messages to thisContext ?
>
> Stef
No, because the context is allocated before the method is executed. How many temps are needed is stored in the CompiledMethod.
- Bert -
More information about the Squeak-dev
mailing list
|