Hello All
I am currently working on X10 compiler as I wish to implement an optimization
in it. For this purpose I have to modify the existing AST and add new nodes in
the AST. For this purpose I believe methods of the classes AltSynthesizer,
Synthesizer and AsyncSynth come into use. I have been able to construct most of
the nodes for my optimization except for "Async". I wish to add a new AST node
for "Async" and that I can do with the help of "getStmt()" method in
"AsyncSynth".
But for async creation it requires a "Context". Now if I have a code something
like this:
for(var j:Int=0; j<m; j++) {
val ni=j;
async {
for(var i:Int=0; i<n; i++) {
.....
}
}
}
Then what all would be part of the context of "async", outer and inner "for"
loop. Will only be type information be pushed and will context for all of these
be separate "Kind". For the two loops I created an "emptyContext()" and that
was working. So I was able to add nested loops to the AST. But as soon as I
added an "Async" and passed an "emptyContext()" to it, the program started
error. I am actually stuck with how and with what to set the context for these
constructs.
Thank you
Regards
Suyash Gupta
Dept. of Computer Science
IIT Madras
------------------------------------------------------------------------------
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