mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Reduce memory consumption
This commit is contained in:
parent
622006de0e
commit
7341fb38a6
|
@ -295,16 +295,27 @@ class TypeSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ConsumerWithNode> getConsumers() {
|
List<ConsumerWithNode> getConsumers() {
|
||||||
if (consumers == null) {
|
if (domain == null) {
|
||||||
consumers = new ArrayList<>();
|
return List.of();
|
||||||
for (var node : domain()) {
|
} else if (domain instanceof DependencyNode) {
|
||||||
if (node.followers != null) {
|
var node = (DependencyNode) domain;
|
||||||
consumers.add(new ConsumerWithNode(node.followers.toArray(new DependencyConsumer[0]), node));
|
if (node.followers == null) {
|
||||||
}
|
return List.of();
|
||||||
|
} else {
|
||||||
|
return List.of(new ConsumerWithNode(node.followers.toArray(new DependencyConsumer[0]), node));
|
||||||
}
|
}
|
||||||
consumers.trimToSize();
|
} else {
|
||||||
|
if (consumers == null) {
|
||||||
|
consumers = new ArrayList<>();
|
||||||
|
for (var node : domain()) {
|
||||||
|
if (node.followers != null) {
|
||||||
|
consumers.add(new ConsumerWithNode(node.followers.toArray(new DependencyConsumer[0]), node));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
consumers.trimToSize();
|
||||||
|
}
|
||||||
|
return consumers;
|
||||||
}
|
}
|
||||||
return consumers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int typeCount() {
|
int typeCount() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user