mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
This commit is contained in:
parent
5c189cfe15
commit
7a109a6f48
|
@ -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) {
|
||||
|
|
|
@ -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]++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user