Outers, fields and locals

Thomas Leonard <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
EvalContext holds three arrays:

    private final Object[] myLocals;
    private final Object[] myFields;
    private final Slot[] myOuters;

What's the difference between these? My current guess is:

- locals is a new set of bindings created each time you invoke a
method and includes the local variables and the method's arguments.
- fields are the values that were in scope when the object was defined
and which are used in the object and which aren't in safeScope.
- outers is everything else.

Is the distinction between fields and outers just for performance?
Does this explain the difference in the type (Slot vs Object)? Why do
definitions at the top-level of an emaker go into outers rather than
locals?

Is there any reason why an EvalContext should allow modification of
myFields or myOuters?

Sorry for all the questions. I'm finding the comments on the various
EExpr objects rather terse/confusing. e.g.

/**
 * What an object expression evaluates to.
 */
public class FrameSlotNounExpr extends NestNounExpr {

/**
 * What an object expression evaluates to.
 */
public class FrameFinalNounExpr extends NestNounExpr {

Thanks,


-- 
Dr Thomas Leonard		ROX desktop / Zero Install
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.