[Jastadd] Expr, Stmt and coll attributes

From: Patrick Lam <p.lam_at_ece.uwaterloo.ca>
Date: Fri, 23 Mar 2012 00:19:33 -0700

Hi,

Thanks for the work on JastAdd. It makes certain things a lot easier to
express.

Using code from SVN, I'm encountering something strange.

In particular I'm using r9236 of the Java1.4Frontend, and I'm trying to
use def() from the IntraFlow extension. But I can reproduce the problem
with the following two lines:

   coll SmallSet CFGNode.cdd() [emptySmallSet().mutable()] with add root
BodyDecl;
   VarAccess contributes decl() when isDest() to CFGNode.cdd() for this;
 


I'm not getting any contributions from VarAccess with a simple method
like this one:

class Foo {
   public Foo fob() {
     Foo tt, rr;
     tt = this;
     rr = tt;
     return rr;
   }
}

def() from JavaDeadAssigns doesn't seem to work right either; it only
catches VariableDeclaration and not VarAccess.

In particular, if I collect on Stmt, then I get a bunch of
contributions. But if I collect on Expr or any descendant, I get
nothing. Am I doing something wrong?

Thanks!

pat
Received on Fri Mar 23 2012 - 08:20:22 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST