[squeak-dev] Environments update

Igor Stasenko siguctua at gmail.com
Fri Mar 8 22:41:00 UTC 2013


On 5 March 2013 12:53, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 2013-03-05, at 02:40, Colin Putney <colin at wiresong.com> wrote:
>
>> On Mon, Mar 4, 2013 at 5:09 PM, Igor Stasenko <siguctua at gmail.com> wrote:
>>
>>> you mean changing compiler to compile
>>> "<obj> Foo" message send for accessing Foo name, instead of direct
>>> binding access?
>>>
>> Oh, I see. The source code still reads as a variable access, but the bytecode implements a message send.
>
> No, I think Igor is proposing to write something like "self environment Foo" to access Foo. Which is flexible, granted, but looks ugly.

i making a prototype implementation right now.. so you can look and see.

The trick is in compiler.., when it sees:

someMethod
   ^ Foo

it compiles it not to "read from literal binding" bytecode but to
"push <special object>
 send #Foo"
.. so it is message send for global variable access

then it is all about that <special object> which understands and/or
handles #Foo message
to answer a proper result.

>
> - Bert -
>
>



-- 
Best regards,
Igor Stasenko.


More information about the Squeak-dev mailing list