Thank you Dave for the reply. I would try the approach you suggested
Regards
Suyash
From: "David P Grove" <gro...@us.ibm.com>
To: "Mailing list for users of the X10 programming language"
<x10-users@lists.sourceforge.net>
Sent: Friday, March 14, 2014 1:27:51 AM
Subject: Re: [X10-users] X10 Compiler query
Hi,
Sorry to be slow answering.
My advice would be to invoke the compiler in a debugger (if you use eclipse to
develop, then there should be an x10c/x10c++ launch configuration defined for
you), set breakpoints, step through the execution and try to see where control
is going.
Most likely there is some small detail that is causing the goal to not be
scheduled or the vistor to not be invoked in the way you expect.
Sorry to be not very specific, but the general approach should help you find
out what is going on.
--dave
suy...@cse.iitm.ac.in wrote on 03/11/2014 01:21:41 PM:
>
> I have been working with the X10 compiler and now I am facing an
> issue. I wish to implement some existing optimization in the X10
> compiler and for that purpose I thought of understanding how the
> current Loop optimizations have been implemented. So I created my
> own visitor by extending the "ContextVisitor" (the same is done by
> ForLoopOptimization"). My implementation follows the same style as
> in "ForLoopOptimization" (cause I am a bit new in implementing) i.e.
> I am also having a new file like "Optimization" (which adds the goal
> for "ForLoopOptimization"). A call similar to "Optimization"
> (goals.add(Optimization(job))) is also added in the ExtensionInfo
> class and then from the Optimization class, a new goal is added for
> my visitor.
>
> The problem is that the control does not reach the methods
> "enterCall" and leaveCall" in my visitor. If instead of
> "ContextVisitor" I try to extend "ErrorHandlingVisitor" (the parent
> class) and use the methods "enter" and "leave" then the control
> reaches these method. These methods have been overrided by me with
> my specific code. I am fine if the compiler throws error but in my
> current case it builds successfully and also an input program gets
> compiled. I require use of "enterCall" and "leaveCall" methods and
> that too especially need to extend "ContextVisitor" cause I need to
> add some new nodes in the AST. For this purpose I believe the
> methods of "AltSynthesizer" class are utilized and a few of them
> require an instance of context visitor. In fact
> "ForLoopOptimization" also uses these methods and the control enters
> in them.
>
> Can someone point out where I might be actually wrong. Currently I
> am working on x10-2.3.0 as my whole past work is based on it.
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users