[Newcompiler] TODO list NewCompiler
Stéphane Ducasse
stephane.ducasse at univ-savoie.fr
Wed Aug 2 09:02:35 UTC 2006
Ok now I understand :)
On 2 août 06, at 10:19, Marcus Denker wrote:
>
> On 27.07.2006, at 10:16, Stéphane Ducasse wrote:
>
>>
>> what is the diff between a field and an instVar access?
>
> The IRBuilder adds the concept of accessing instVars of objects
> other then "self" directly. This is needed for accessing variables
> in blocks: e.g. temp Variables in Blocks are not shared with the
> method's context, but they live in an "environment" that is independed
> of the method context. The bytecode generated now need to access
> these variables in the environment object.
>
> For making everything uniform, Anthony decided to just have the
> concept
> of "field access" in IRBuilder, where you push the object whose
> iVar you
> want to access first, then do a pushField: or popField.
>
> If the object is "self", this gets compiled to be a normal push/pop
> InstVar,
> when it's another object, it uses messages to access the instVar,
> as there
> are no bytecode to to it directly.
>
> When I did the "non Closure" mode for the NewCompiler, I renamed
> all the
> Field related stuff to be "InstVar"... this was a good decicion for
> non-closure
> mode and bytesurgeon, but when we want to do both, we need to think
> a bit
> harder.
>
> Right now it is impossible to write IRBuilder code that works in
> both closure/
> non-closure setting, as when in closure mode we need to do a
> pushSelf;
> pushInstVar: 1
>
> and in non-closure mode it's
> pushInstVar: 1
>
> This needs to be fixed. One idea would be to have *both* the
> concept of
> "Field" and "iVar", so people can use iVar when do non-closure
> stuff. Or
> onother option would be to go back to have the 'Field' concept
> only...
>
>
> Marcus
>
>
More information about the Newcompiler
mailing list