From c224c57f98bfe16b87697e81600e6be39c7dfbc8 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 26 Oct 2017 15:50:46 +0300 Subject: [PATCH] Fix compiler crash when there's no method found during DCE --- .../main/java/org/teavm/dependency/DependencyGraphBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java b/core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java index f2e7316bc..85fd26514 100644 --- a/core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java +++ b/core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java @@ -615,10 +615,10 @@ class DependencyGraphBuilder { CallLocation callLocation = new CallLocation(caller.getMethod(), currentLocation); dependencyChecker.linkClass(method.getClassName(), callLocation).initClass(callLocation); MethodDependency methodDep = dependencyChecker.linkMethod(method, callLocation); + methodDep.use(); if (methodDep.isMissing()) { return; } - methodDep.use(); DependencyNode[] targetParams = methodDep.getVariables(); for (int i = 0; i < arguments.size(); ++i) { DependencyNode value = nodes[arguments.get(i).getIndex()];