Search in sources :

Example 1 with ConditionalTransferResult

use of org.checkerframework.dataflow.analysis.ConditionalTransferResult 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);
}
Also used : ConditionalTransferResult(org.checkerframework.dataflow.analysis.ConditionalTransferResult) IntegerLiteralNode(org.checkerframework.dataflow.cfg.node.IntegerLiteralNode) AssignmentNode(org.checkerframework.dataflow.cfg.node.AssignmentNode) LocalVariableNode(org.checkerframework.dataflow.cfg.node.LocalVariableNode) EqualToNode(org.checkerframework.dataflow.cfg.node.EqualToNode) Node(org.checkerframework.dataflow.cfg.node.Node)

Aggregations

ConditionalTransferResult (org.checkerframework.dataflow.analysis.ConditionalTransferResult)1 AssignmentNode (org.checkerframework.dataflow.cfg.node.AssignmentNode)1 EqualToNode (org.checkerframework.dataflow.cfg.node.EqualToNode)1 IntegerLiteralNode (org.checkerframework.dataflow.cfg.node.IntegerLiteralNode)1 LocalVariableNode (org.checkerframework.dataflow.cfg.node.LocalVariableNode)1 Node (org.checkerframework.dataflow.cfg.node.Node)1