use of org.checkerframework.dataflow.cfg.node.EqualToNode in project bazel by bazelbuild.
the class ConstantPropagationTransfer method visitEqualTo.
@Override
public TransferResult<Constant, ConstantPropagationStore> visitEqualTo(EqualToNode n, TransferInput<Constant, ConstantPropagationStore> pi) {
ConstantPropagationStore p = pi.getRegularStore();
ConstantPropagationStore old = p.copy();
Node left = n.getLeftOperand();
Node right = n.getRightOperand();
process(p, left, right);
process(p, right, left);
return new ConditionalTransferResult<>(null, p, old);
}
use of org.checkerframework.dataflow.cfg.node.EqualToNode in project checker-framework by typetools.
the class CFAbstractTransfer method visitEqualTo.
@Override
public TransferResult<V, S> visitEqualTo(EqualToNode n, TransferInput<V, S> p) {
TransferResult<V, S> res = super.visitEqualTo(n, p);
Node leftN = n.getLeftOperand();
Node rightN = n.getRightOperand();
V leftV = p.getValueOfSubNode(leftN);
V rightV = p.getValueOfSubNode(rightN);
// if annotations differ, use the one that is more precise for both
// sides (and add it to the store if possible)
res = strengthenAnnotationOfEqualTo(res, leftN, rightN, leftV, rightV, false);
res = strengthenAnnotationOfEqualTo(res, rightN, leftN, rightV, leftV, false);
return res;
}
use of org.checkerframework.dataflow.cfg.node.EqualToNode in project checker-framework by typetools.
the class ConstantPropagationTransfer method visitEqualTo.
@Override
public TransferResult<Constant, ConstantPropagationStore> visitEqualTo(EqualToNode n, TransferInput<Constant, ConstantPropagationStore> pi) {
ConstantPropagationStore p = pi.getRegularStore();
ConstantPropagationStore old = p.copy();
Node left = n.getLeftOperand();
Node right = n.getRightOperand();
process(p, left, right);
process(p, right, left);
return new ConditionalTransferResult<>(null, p, old);
}
Aggregations