ValueNumberDataflow vnaDataflow, ForwardTypeQualifierDataflow forwardDataflow,
BackwardTypeQualifierDataflow backwardDataflow) throws DataflowAnalysisException, CheckedAnalysisException {
for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
Location loc = i.next();
TypeQualifierValueSet forwardsFact = forwardDataflow.getFactAtLocation(loc);
TypeQualifierValueSet backwardsFact = backwardDataflow.getFactAfterLocation(loc);
if (!forwardsFact.isValid() || !backwardsFact.isValid()) {
continue;
}
if (DEBUG) {
checkLocation = "location " + loc.toCompactString();
}
checkForConflictingValues(xmethod, cfg, typeQualifierValue, forwardsFact, backwardsFact, loc,
loc, vnaDataflow.getFactAtLocation(loc));
checkForEqualityTest(xmethod, cfg, typeQualifierValue, forwardsFact, loc, vnaDataflow.getFactAtLocation(loc));
}
for (Iterator<Edge> i = cfg.edgeIterator(); i.hasNext();) {
Edge edge = i.next();
// NOTE: when checking forwards and backwards values on an edge,
// we don't want to apply BOTH edge transfer functions,
// since the purpose of the edge transfer function is to
// propagate information across phi nodes (effectively
// copying information about one value to another).
// Due to pruning of backwards values when a conflict is detected,
// we need to check backwards values as "early" as possible,
// meaning that we want to check at the edge target
// (before the backwards edge transfer function has pruned
// the backwards value.)
TypeQualifierValueSet forwardFact = forwardDataflow.getFactOnEdge(edge);
TypeQualifierValueSet backwardFact = backwardDataflow.getResultFact(edge.getTarget());
// The edge target location is where we can check
// for conflicting flow values.
Location edgeTargetLocation = getEdgeTargetLocation(cfg, edge);
ValueNumberFrame vnaFrame = (edgeTargetLocation != null) ? vnaDataflow.getFactAtLocation(edgeTargetLocation) : null;