On Apr 22, 2013, at 1:23 PM, Guillermo Polito <guillermopol...@gmail.com> wrote:
> Hi! > > I'm taking a look at the AST annotation in > > RBProgramNode>>annotateInClass: aBehavior > self annotateInScope: (RBVariableScope > owner: (RBLiteralScope > owner: RBRootScope new > class: aBehavior) > class: aBehavior) > > With that code, the order in which variables are annotated is > > 1) inst vars > 2) literal vars (class vars, pools, globals in the environment) > 3) the root scope -> pseudo-vars (self, super, thiscontext) > > Shouldn't the order be different? Something like: > > 1) pseudo-vars (self, super, thiscontext) > 2) inst vars > 3) literal vars (class vars, pools, globals in the environment) > > So there are never conflicts, and no other scope can bind pseudo-vars? Hello, For now Opal is not using the semantic analysis of AST-Semantics but instead it's own. (it is more low-level with escaping variables and things like that). So the goal is to merge the two. What I wanted to say: No idea. :-) In Opal, self, super, thiscontex is in the Method Scope while self and super is in the Instance scope. So the lookup is temps + thisContext ivars + self + super literal vars Marcus