mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Reduce memory consumption
This commit is contained in:
parent
2dd145a731
commit
0ebf8c2f6e
|
@ -675,6 +675,15 @@ public class DependencyAnalyzer implements DependencyInfo {
|
|||
}
|
||||
}
|
||||
|
||||
public void cleanup() {
|
||||
for (MethodReference reachableMethod : getReachableMethods()) {
|
||||
MethodDependency dependency = getMethod(reachableMethod);
|
||||
for (int i = dependency.getParameterCount() + 1; i < dependency.getVariableCount(); ++i) {
|
||||
dependency.variableNodes[i] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class ReportEntry {
|
||||
String title;
|
||||
int count;
|
||||
|
|
|
@ -386,6 +386,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
|
|||
return;
|
||||
}
|
||||
|
||||
dependencyAnalyzer.cleanup();
|
||||
inline(classSet, dependencyAnalyzer);
|
||||
if (wasCancelled()) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user