cleanup
This commit is contained in:
@@ -115,7 +115,6 @@ public class UnusedParameters
|
|||||||
for (InstructionContext ins : f.getInstructions())
|
for (InstructionContext ins : f.getInstructions())
|
||||||
if (!ins.getInvokes().isEmpty() && methods.containsAll(ins.getInvokes()))
|
if (!ins.getInvokes().isEmpty() && methods.containsAll(ins.getInvokes()))
|
||||||
{
|
{
|
||||||
System.out.println("Removing from " + ins);
|
|
||||||
int pops = signature.size() - paramIndex - 1; // index from top of stack of parameter
|
int pops = signature.size() - paramIndex - 1; // index from top of stack of parameter
|
||||||
ins.removeStack(pops); // remove parameter from stack
|
ins.removeStack(pops); // remove parameter from stack
|
||||||
|
|
||||||
@@ -128,7 +127,7 @@ public class UnusedParameters
|
|||||||
done.add(ins.getInstruction());
|
done.add(ins.getInstruction());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
for (Method method : methods)
|
||||||
// this double checks that all calls to this have been located
|
// this double checks that all calls to this have been located
|
||||||
for (ClassFile cf : method.getMethods().getClassFile().getGroup().getClasses())
|
for (ClassFile cf : method.getMethods().getClassFile().getGroup().getClasses())
|
||||||
for (Method m : cf.getMethods().getMethods())
|
for (Method m : cf.getMethods().getMethods())
|
||||||
@@ -169,7 +168,6 @@ public class UnusedParameters
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
for (Method method : methods)
|
for (Method method : methods)
|
||||||
if (method.getCode() != null)
|
if (method.getCode() != null)
|
||||||
@@ -243,7 +241,6 @@ public class UnusedParameters
|
|||||||
/* removing the parameter can cause collision of overriden methods,
|
/* removing the parameter can cause collision of overriden methods,
|
||||||
* we should first rename all methods to be unique?
|
* we should first rename all methods to be unique?
|
||||||
*/
|
*/
|
||||||
System.out.println("Removing " + m.getName() + " on " + m.getMethods().getClassFile().getName());
|
|
||||||
removeParameter(methods, signature, execution, unusedParameter, lvtIndexes[unusedParameter]);
|
removeParameter(methods, signature, execution, unusedParameter, lvtIndexes[unusedParameter]);
|
||||||
|
|
||||||
++count;
|
++count;
|
||||||
|
|||||||
Reference in New Issue
Block a user