src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java
equal
deleted
inserted
replaced
43 import org.graalvm.compiler.nodes.spi.LIRLowerable; |
43 import org.graalvm.compiler.nodes.spi.LIRLowerable; |
44 import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool; |
44 import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool; |
45 import org.graalvm.compiler.nodes.util.GraphUtil; |
45 import org.graalvm.compiler.nodes.util.GraphUtil; |
46 import org.graalvm.compiler.word.Word; |
46 import org.graalvm.compiler.word.Word; |
47 |
47 |
|
48 import jdk.vm.ci.hotspot.HotSpotConstantPoolObject; |
48 import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant; |
49 import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant; |
49 import jdk.vm.ci.hotspot.HotSpotObjectConstant; |
50 import jdk.vm.ci.hotspot.HotSpotObjectConstant; |
50 import jdk.vm.ci.meta.Constant; |
51 import jdk.vm.ci.meta.Constant; |
51 import jdk.vm.ci.meta.Value; |
52 import jdk.vm.ci.meta.Value; |
52 |
53 |
98 assert constant != null : "Expected the value to fold: " + value; |
99 assert constant != null : "Expected the value to fold: " + value; |
99 Value stringValue = gen.operand(string); |
100 Value stringValue = gen.operand(string); |
100 Value result; |
101 Value result; |
101 LIRFrameState fs = gen.state(this); |
102 LIRFrameState fs = gen.state(this); |
102 assert fs != null : "The stateAfter is null"; |
103 assert fs != null : "The stateAfter is null"; |
103 if (constant instanceof HotSpotObjectConstant) { |
104 if (constant instanceof HotSpotObjectConstant || constant instanceof HotSpotConstantPoolObject) { |
104 result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitObjectConstantRetrieval(constant, stringValue, fs); |
105 result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitObjectConstantRetrieval(constant, stringValue, fs); |
105 } else if (constant instanceof HotSpotMetaspaceConstant) { |
106 } else if (constant instanceof HotSpotMetaspaceConstant) { |
106 if (action == HotSpotConstantLoadAction.RESOLVE) { |
107 if (action == HotSpotConstantLoadAction.RESOLVE) { |
107 result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitMetaspaceConstantRetrieval(constant, stringValue, fs); |
108 result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitMetaspaceConstantRetrieval(constant, stringValue, fs); |
108 } else { |
109 } else { |