wip removal of unused methods based on execution from init.
This commit is contained in:
@@ -3,6 +3,7 @@ package info.sigterm.deob.deobfuscators;
|
||||
import info.sigterm.deob.ClassFile;
|
||||
import info.sigterm.deob.ClassGroup;
|
||||
import info.sigterm.deob.Method;
|
||||
import info.sigterm.deob.execution.Execution;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -10,7 +11,9 @@ public class UnusedMethods
|
||||
{
|
||||
public void run(ClassGroup group)
|
||||
{
|
||||
group.buildCallGraph();
|
||||
Execution execution = new Execution(group);
|
||||
execution.populateInitialMethods();
|
||||
execution.run();
|
||||
|
||||
int i = 0;
|
||||
for (ClassFile cf : group.getClasses())
|
||||
@@ -21,7 +24,8 @@ public class UnusedMethods
|
||||
if (m.getName().length() > 2)
|
||||
continue;
|
||||
|
||||
if (!m.isUsed())
|
||||
if (!execution.methods.contains(m))
|
||||
//if (!m.isUsed())
|
||||
{
|
||||
cf.getMethods().removeMethod(m);
|
||||
++i;
|
||||
|
||||
Reference in New Issue
Block a user