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
c8090c0bde
commit
852589a4dd
|
@ -338,9 +338,20 @@ class DependencyGraphBuilder {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < dimensions.size(); ++i) {
|
||||
sb.append('[');
|
||||
itemType = ((ValueType.Array)itemType).getItemType();
|
||||
}
|
||||
String itemTypeStr;
|
||||
if (itemType instanceof ValueType.Object) {
|
||||
itemTypeStr = ((ValueType.Object)itemType).getClassName();
|
||||
} else {
|
||||
itemTypeStr = itemType.toString();
|
||||
}
|
||||
sb.append(itemTypeStr);
|
||||
DependencyNode node = nodes[receiver.getIndex()];
|
||||
for (int i = 0; i < dimensions.size(); ++i) {
|
||||
node.propagate(dependencyChecker.getType(sb.substring(i, sb.length())));
|
||||
node = node.getArrayItem();
|
||||
}
|
||||
sb.append(itemType);
|
||||
nodes[receiver.getIndex()].propagate(dependencyChecker.getType(sb.toString()));
|
||||
String className = extractClassName(itemType);
|
||||
if (className != null) {
|
||||
dependencyChecker.linkClass(className, new CallLocation(caller.getMethod(), currentLocation));
|
||||
|
|
|
@ -120,6 +120,11 @@ public class DependencyNode implements ValueDependencyInfo {
|
|||
if (DependencyChecker.shouldLog) {
|
||||
arrayItemNode.tag = tag + "[";
|
||||
}
|
||||
arrayItemNode.addConsumer(new DependencyConsumer() {
|
||||
@Override public void consume(DependencyAgentType type) {
|
||||
DependencyNode.this.propagate(type);
|
||||
}
|
||||
});
|
||||
}
|
||||
return arrayItemNode;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user