From: bdemsky Date: Mon, 16 Aug 2004 20:00:25 +0000 (+0000) Subject: oops...freeVars can return null. X-Git-Url: http://demsky.eecs.uci.edu/git/?p=repair.git;a=commitdiff_plain;h=5ce3922b1c7157f5e3c1ec475da11b60d03f7b30 oops...freeVars can return null. --- diff --git a/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java b/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java index 31db16c..68ed221 100755 --- a/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java +++ b/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java @@ -155,16 +155,17 @@ class AbstractInterferes { } else return false; // bad match } Set freevars=rexpr1.freeVars(); - for(Iterator it=freevars.iterator();it.hasNext();) { - VarDescriptor vd=(VarDescriptor)it.next(); - if (vd.isGlobal()) - continue; //globals are fine - else if (varmap.containsKey(vd)&&onetoone) //the mapped variable is fine if we have a 1-1 mapping - continue; - else if (termination.maxsize.getsize(vd.getSet())==1) - continue; - return false; - } + if (freevars!=null) + for(Iterator it=freevars.iterator();it.hasNext();) { + VarDescriptor vd=(VarDescriptor)it.next(); + if (vd.isGlobal()) + continue; //globals are fine + else if (varmap.containsKey(vd)&&onetoone) //the mapped variable is fine if we have a 1-1 mapping + continue; + else if (termination.maxsize.getsize(vd.getSet())==1) + continue; + return false; + } return rexpr1.equals(varmap,rexpr2); } return false;