Hello All 

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. 

Thank you 

Regards 
Suyash Gupta 
------------------------------------------------------------------------------
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

Reply via email to