--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java 2017-04-01 08:56:51.000000000 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java 2017-04-01 08:56:51.000000000 -0700 @@ -28,9 +28,6 @@ import java.util.HashMap; import java.util.Map.Entry; -import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant; -import jdk.vm.ci.meta.JavaConstant; - import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.graph.iterators.NodeIterable; import org.graalvm.compiler.hotspot.nodes.aot.InitializeKlassNode; @@ -43,6 +40,9 @@ import org.graalvm.compiler.phases.BasePhase; import org.graalvm.compiler.phases.tiers.PhaseContext; +import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant; +import jdk.vm.ci.meta.Constant; + public class EliminateRedundantInitializationPhase extends BasePhase { /** * Find blocks with class initializing nodes for the class identified the by the constant node. @@ -202,7 +202,7 @@ ControlFlowGraph cfg = ControlFlowGraph.compute(graph, true, false, true, false); ArrayList redundantInits = new ArrayList<>(); for (ConstantNode node : getConstantNodes(graph)) { - JavaConstant constant = node.asJavaConstant(); + Constant constant = node.asConstant(); if (constant instanceof HotSpotMetaspaceConstant) { redundantInits.addAll(processConstantNode(cfg, node)); }