correction
authorbdemsky <bdemsky>
Wed, 19 Dec 2007 21:00:03 +0000 (21:00 +0000)
committerbdemsky <bdemsky>
Wed, 19 Dec 2007 21:00:03 +0000 (21:00 +0000)
Robust/src/Analysis/Locality/LocalityAnalysis.java
Robust/src/IR/Tree/BuildIR.java

index 7a6d589c322e906302d8500bb019ace1b0df1f3e..8a4907b0d57bae77739a27417b1fa650097873c6 100644 (file)
@@ -469,7 +469,7 @@ public class LocalityAnalysis {
            if (srctype.equals(LOCAL) && fsfn.getField().getType().isPrimitive())
                return;
            if (!(srctype.equals(GLOBAL)||srctype.equals(EITHER)))
-               throw new Error("Writing possible local reference to global object in context:\n"+lb.getExplanation());
+               throw new Error("Writing possible local reference to global object in context:\n"+lb.getExplanation()+" for FlatFieldNode "+fsfn);
        } else if (dsttype.equals(EITHER)) {
            if (srctype.equals(CONFLICT))
                throw new Error("Using reference that could be local or global in context:\n"+lb.getExplanation());
@@ -490,6 +490,10 @@ public class LocalityAnalysis {
 
     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!");
+       }
        currtable.put(fon.getDest(), currtable.get(fon.getLeft()));
     }
 
index da6095656534530327fbe3ea1a6362a9e029b58f..3c9847d0729cf0c575e26ec9d75df633876ff636 100644 (file)
@@ -414,7 +414,7 @@ public class BuildIR {
            return con;
        } else if (isNode(pn,"createarray")) {
            //System.out.println(pn.PPrint(3,true));
-           boolean isglobal=pn.getChild("createarray")!=null;
+           boolean isglobal=pn.getChild("global")!=null;
            TypeDescriptor td=parseTypeDescriptor(pn);
            Vector args=parseDimExprs(pn);
            int num=0;