@Override
public MatchResult match(InstructionHandle handle, ConstantPoolGen cpg, ValueNumberFrame before, ValueNumberFrame after,
BindingSet bindingSet) throws DataflowAnalysisException {
Instruction ins = handle.getInstruction();
FieldInstruction fieldIns;
Variable field;
// The instruction must be PUTFIELD or PUTSTATIC
if (ins instanceof PUTFIELD) {
fieldIns = (PUTFIELD) ins;
int numSlots = before.getNumSlots();
ValueNumber ref = before.getValue(isLongOrDouble(fieldIns, cpg) ? numSlots - 3 : numSlots - 2);
field = new FieldVariable(ref, fieldIns.getClassName(cpg), fieldIns.getFieldName(cpg), fieldIns.getSignature(cpg));
} else if (ins instanceof PUTSTATIC) {
fieldIns = (PUTSTATIC) ins;
field = new FieldVariable(fieldIns.getClassName(cpg), fieldIns.getFieldName(cpg), fieldIns.getSignature(cpg));
} else {
return null;
}
Variable value = snarfFieldValue(fieldIns, cpg, before);