mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix bug in dependency analyzer
This commit is contained in:
parent
2bbdf6caba
commit
945a0fee9d
|
@ -120,10 +120,14 @@ public class DependencyNode implements ValueDependencyInfo {
|
|||
}
|
||||
|
||||
int j = 0;
|
||||
boolean copied = false;
|
||||
for (int i = 0; i < newTypes.length; ++i) {
|
||||
DependencyType type = newTypes[i];
|
||||
if (addType(type) && filter(type)) {
|
||||
newTypes[j++] = type;
|
||||
} else if (!copied) {
|
||||
copied = true;
|
||||
newTypes = newTypes.clone();
|
||||
}
|
||||
}
|
||||
if (j == 0) {
|
||||
|
|
|
@ -51,10 +51,13 @@ class DependencyNodeToNodeTransition implements DependencyConsumer {
|
|||
|
||||
void consume(DependencyType[] types) {
|
||||
int j = 0;
|
||||
boolean copied = false;
|
||||
for (DependencyType type : types) {
|
||||
boolean added = false;
|
||||
if (filterType(type)) {
|
||||
if (!destination.hasType(type)) {
|
||||
types[j++] = type;
|
||||
added = true;
|
||||
}
|
||||
|
||||
if (type.getName().startsWith("[")) {
|
||||
|
@ -65,6 +68,10 @@ class DependencyNodeToNodeTransition implements DependencyConsumer {
|
|||
source.getClassValueNode().connect(destination.getClassValueNode());
|
||||
}
|
||||
}
|
||||
if (!added && !copied) {
|
||||
copied = true;
|
||||
types = types.clone();
|
||||
}
|
||||
}
|
||||
|
||||
if (j == 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user