use of org.apache.bcel.generic.DSTORE in project jop by jop-devel.
the class ReplaceAtomicAnnotation method getModifiedArguments.
protected static SortedSet<Integer> getModifiedArguments(MethodGen method) {
SortedSet<Integer> result = new TreeSet<Integer>();
int arguments = getArgsCount(method);
for (Instruction in : method.getInstructionList().getInstructions()) {
if (in instanceof IndexedInstruction) {
IndexedInstruction i = (IndexedInstruction) in;
if (i.getIndex() < arguments) {
if (i instanceof DSTORE || i instanceof LSTORE) {
result.add(i.getIndex());
result.add(i.getIndex() + 1);
} else if (i instanceof StoreInstruction || i instanceof IINC) {
result.add(i.getIndex());
}
}
}
}
return result;
}
Aggregations