use of org.checkerframework.dataflow.analysis.RegularTransferResult in project checker-framework by typetools.
the class LiveVarTransfer method visitObjectCreation.
@Override
public RegularTransferResult<LiveVarValue, LiveVarStore> visitObjectCreation(ObjectCreationNode n, TransferInput<LiveVarValue, LiveVarStore> p) {
RegularTransferResult<LiveVarValue, LiveVarStore> transferResult = (RegularTransferResult<LiveVarValue, LiveVarStore>) super.visitObjectCreation(n, p);
LiveVarStore store = transferResult.getRegularStore();
for (Node arg : n.getArguments()) {
store.addUseInExpression(arg);
}
return transferResult;
}
use of org.checkerframework.dataflow.analysis.RegularTransferResult in project checker-framework by typetools.
the class ConstantPropagationTransfer method visitAssignment.
@Override
public TransferResult<Constant, ConstantPropagationStore> visitAssignment(AssignmentNode n, TransferInput<Constant, ConstantPropagationStore> pi) {
ConstantPropagationStore p = pi.getRegularStore();
Node target = n.getTarget();
Constant info = null;
if (target instanceof LocalVariableNode) {
LocalVariableNode t = (LocalVariableNode) target;
info = p.getInformation(n.getExpression());
p.setInformation(t, info);
}
return new RegularTransferResult<>(info, p);
}
use of org.checkerframework.dataflow.analysis.RegularTransferResult in project checker-framework by typetools.
the class ValueTransfer method stringConcatenation.
public TransferResult<CFValue, CFStore> stringConcatenation(Node leftOperand, Node rightOperand, TransferInput<CFValue, CFStore> p, TransferResult<CFValue, CFStore> result) {
AnnotationMirror resultAnno = createAnnotationForStringConcatenation(leftOperand, rightOperand, p);
TypeMirror underlyingType = result.getResultValue().getUnderlyingType();
CFValue newResultValue = analysis.createSingleAnnotationValue(resultAnno, underlyingType);
return new RegularTransferResult<>(newResultValue, result.getRegularStore());
}
Aggregations