MethodDescriptor md=lb.getMethod();
Hashtable<FlatNode,Hashtable<TempDescriptor, Integer>> temptable=new Hashtable<FlatNode,Hashtable<TempDescriptor, Integer>>();
Hashtable<FlatNode, Integer> atomictable=new Hashtable<FlatNode, Integer>();
- computeCallsFlags(md, lb, temptable, atomictable);
+ try {
+ computeCallsFlags(md, lb, temptable, atomictable);
+ } catch (Error e) {
+ System.out.println("Error in "+md+" context "+lb);
+ e.printStackTrace();
+ System.exit(-1);
+ }
atomictab.put(lb, atomictable);
temptab.put(lb, temptable);
Integer currreturnval=EITHER; //Start off with the either value
for(Iterator methodit=methodset.iterator();methodit.hasNext();) {
MethodDescriptor md=(MethodDescriptor) methodit.next();
+
boolean isnative=md.getModifiers().isNative();
boolean isjoin = md.getClassDesc().getSymbol().equals(TypeUtil.ThreadClass)&&!nodemd.getModifiers().isStatic()&&nodemd.numParameters()==0&&md.getSymbol().equals("join");
LocalityBinding lb=new LocalityBinding(md, isatomic);
if (isnative&&isatomic) {
- System.out.println("Don't call native methods in atomic blocks!");
+ System.out.println("Don't call native methods in atomic blocks!"+currlb.getMethod());
}
if (runmethodset==null||!runmethodset.contains(md)) {
//Skip this part if it is a run method
void processOpNode(FlatOpNode fon, Hashtable<TempDescriptor, Integer> currtable) {
/* Just propagate value */
Integer srcvalue=currtable.get(fon.getLeft());
+
if (srcvalue==null) {
- throw new Error(fon.getLeft()+" is undefined!");
+ if (!fon.getLeft().getType().isPtr()) {
+ srcvalue=LOCAL;
+ } else
+ throw new Error(fon.getLeft()+" is undefined!");
}
- currtable.put(fon.getDest(), currtable.get(fon.getLeft()));
+ currtable.put(fon.getDest(), srcvalue);
}
void processCastNode(FlatCastNode fcn, Hashtable<TempDescriptor, Integer> currtable) {
// making nodes (we create a table)
//if (verbose) System.printString("making nodes (tables in orig. version)");
- Node[] hTable = global new Node[numNodes];
- Node[] eTable = global new Node[numNodes];
- hTable = Node.fillTable(numNodes, numDegree, r);
- eTable = Node.fillTable(numNodes, numDegree, r);
+ Node[] hTable = global new Node[1];
+
+ Node[] eTable = global new Node[1];
+
+ if (true) {
+ eTable=Node.fillTable(numNodes, numDegree, r);
+ hTable=Node.fillTable(numNodes, numDegree, r);
+ }
// making neighbors
//if (verbose) System.printString("updating from and coeffs");