Reduce memory consumption

This commit is contained in:
Alexey Andreev 2018-08-20 18:56:16 +03:00
parent 2dd145a731
commit 0ebf8c2f6e
2 changed files with 10 additions and 0 deletions

View File

@ -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 { static class ReportEntry {
String title; String title;
int count; int count;

View File

@ -386,6 +386,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
return; return;
} }
dependencyAnalyzer.cleanup();
inline(classSet, dependencyAnalyzer); inline(classSet, dependencyAnalyzer);
if (wasCancelled()) { if (wasCancelled()) {
return; return;