mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
wasm gc: fix issue with dependency initialization order
This commit is contained in:
parent
802efd49c6
commit
68a1b2efae
|
@ -410,10 +410,12 @@ public abstract class DependencyAnalyzer implements DependencyInfo {
|
||||||
reachedMethods.add(dep.getReference());
|
reachedMethods.add(dep.getReference());
|
||||||
dep.activated = true;
|
dep.activated = true;
|
||||||
if (!dep.isMissing()) {
|
if (!dep.isMissing()) {
|
||||||
for (DependencyListener listener : listeners) {
|
defer(() -> {
|
||||||
listener.methodReached(agent, dep);
|
for (var listener : listeners) {
|
||||||
}
|
listener.methodReached(agent, dep);
|
||||||
activateDependencyPlugin(dep);
|
}
|
||||||
|
activateDependencyPlugin(dep);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dep;
|
return dep;
|
||||||
|
|
|
@ -388,8 +388,8 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
|
||||||
cancelled |= progressListener.progressReached(progress) != TeaVMProgressFeedback.CONTINUE;
|
cancelled |= progressListener.progressReached(progress) != TeaVMProgressFeedback.CONTINUE;
|
||||||
return !cancelled;
|
return !cancelled;
|
||||||
});
|
});
|
||||||
dependencyAnalyzer.initDependencies();
|
|
||||||
target.contributeDependencies(dependencyAnalyzer);
|
target.contributeDependencies(dependencyAnalyzer);
|
||||||
|
dependencyAnalyzer.initDependencies();
|
||||||
if (target.needsSystemArrayCopyOptimization()) {
|
if (target.needsSystemArrayCopyOptimization()) {
|
||||||
dependencyAnalyzer.addDependencyListener(new StdlibDependencyListener());
|
dependencyAnalyzer.addDependencyListener(new StdlibDependencyListener());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user