Alexey Andreev 2015-03-11 11:32:49 +04:00
parent 5c189cfe15
commit 7a109a6f48
2 changed files with 3 additions and 3 deletions

View File

@ -219,7 +219,7 @@ public class Decompiler {
node.getVariables().add(program.variableAt(i).getRegister());
}
Optimizer optimizer = new Optimizer();
optimizer.optimize(node, program, splitter);
optimizer.optimize(node, splitter);
node.getModifiers().addAll(mapModifiers(method.getModifiers()));
int paramCount = Math.min(method.getSignature().length, program.variableCount());
for (int i = 0; i < paramCount; ++i) {

View File

@ -43,10 +43,10 @@ public class Optimizer {
}
}
public void optimize(AsyncMethodNode method, Program program, AsyncProgramSplitter splitter) {
public void optimize(AsyncMethodNode method, AsyncProgramSplitter splitter) {
ReadWriteStatsBuilder stats = new ReadWriteStatsBuilder(method.getVariables().size());
stats.analyze(program);
for (int i = 0; i < splitter.size(); ++i) {
stats.analyze(splitter.getProgram(i));
Integer var = splitter.getInput(i);
if (var != null) {
stats.reads[var]++;