ParseNode question

Bert Freudenberg bert at isgnw.CS.Uni-Magdeburg.De
Thu Feb 4 08:58:42 UTC 1999


On Wed, 3 Feb 1999, Dan Ingalls wrote:

> "Leandro Caniglia" <caniglia at dm.uba.ar> wrote...
> >Is it possible for a VariableNode to decide if it is an instance variable
> >reference?
> 
> [I answered this privately but, in case others are interested...]
> 
> Not easily.  I have been bothered by this before, and the situation is
> even worse with the recent extention to 256 ivars.  I should have
> cleaned it up then, but didn't.  However, look at the code in
> Encoder...
> 
> [snip]
> 
> My suggestion is to add a new ivar to VariableNode, called 'type' or
> 'loadType', and simply store into it the value passed in as 'type:' in
> the creation messages.  Then, testing for instvars should be as simple
> as
> 	^ type = LdInstType I would include this for clarity, even if
> it's not needed in the system right now.

Apropos Encoder:  how about notifying the Encoder with source ranges
for every node? Currently it's only done for method nodes (for debugger
highlighting). This would simplify source code coloring without pretty
printing.

Bert


-- 
 Bert Freudenberg                                            Department of
                                                            Simulation and
 mailto:bert at isg.cs.uni-magdeburg.de                     Computer Graphics
 http://isgwww.cs.uni-magdeburg.de/isg/bert.html        Univ. of Magdeburg





More information about the Squeak-dev mailing list