Skip to content

Commit

Permalink
more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kadirayk committed Feb 24, 2023
1 parent bde5426 commit d727b7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/analysis/IDELinearConstantAnalysisProblem.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public FlowFunction<DFF> getNormalFlowFunction(Unit curr, Unit succ) {
public Set<DFF> computeTargets(DFF source) {
Set<DFF> res = new HashSet<>();
res.add(source);
if (source != zeroValue() && (lop == source && rop instanceof IntConstant || rop == source && lop instanceof IntConstant)) {
if (source != zeroValue() && (lop == source.getValue() && rop instanceof IntConstant || rop == source.getValue() && lop instanceof IntConstant)) {
res.add(DFF.asDFF(lhs));
}
return res;
Expand Down Expand Up @@ -292,10 +292,10 @@ public boolean equalTo(EdgeFunction<Integer> other) {
return new EdgeFunction<Integer>() {
@Override
public Integer computeTarget(Integer source) {
if (lop == srcNode && rop instanceof IntConstant) {
if (lop == srcNode.getValue() && rop instanceof IntConstant) {
IntConstant ic = (IntConstant) rop;
return executeBinOperation(op, source, ic.value);
} else if (rop == srcNode && lop instanceof IntConstant) {
} else if (rop == srcNode.getValue() && lop instanceof IntConstant) {
IntConstant ic = (IntConstant) lop;
return executeBinOperation(op, ic.value, source);
}
Expand Down

0 comments on commit d727b7f

Please sign in to comment.