Search in sources :

Example 6 with HotSpotMetaspaceConstant

use of jdk.vm.ci.hotspot.HotSpotMetaspaceConstant in project graal by oracle.

the class InitializeKlassStubCall method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    assert constant != null : "Expected the value to fold: " + value;
    Value stringValue = gen.operand(string);
    LIRFrameState fs = gen.state(this);
    assert fs != null : "Frame state should be set";
    assert constant instanceof HotSpotMetaspaceConstant;
    Value result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitKlassInitializationAndRetrieval(constant, stringValue, fs);
    gen.setResult(this, result);
}
Also used : LIRFrameState(org.graalvm.compiler.lir.LIRFrameState) HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value) HotSpotMetaspaceConstant(jdk.vm.ci.hotspot.HotSpotMetaspaceConstant)

Example 7 with HotSpotMetaspaceConstant

use of jdk.vm.ci.hotspot.HotSpotMetaspaceConstant in project graal by oracle.

the class LoadConstantIndirectlyFixedNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    assert constant != null : "Expected the value to fold: " + value;
    Value result;
    if (constant instanceof HotSpotObjectConstant) {
        result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitLoadObjectAddress(constant);
    } else if (constant instanceof HotSpotMetaspaceConstant) {
        result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitLoadMetaspaceAddress(constant, action);
    } else {
        throw new PermanentBailoutException("Unsupported constant type: " + constant);
    }
    gen.setResult(this, result);
}
Also used : HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value) HotSpotObjectConstant(jdk.vm.ci.hotspot.HotSpotObjectConstant) HotSpotMetaspaceConstant(jdk.vm.ci.hotspot.HotSpotMetaspaceConstant) PermanentBailoutException(org.graalvm.compiler.core.common.PermanentBailoutException)

Example 8 with HotSpotMetaspaceConstant

use of jdk.vm.ci.hotspot.HotSpotMetaspaceConstant in project graal by oracle.

the class LoadConstantIndirectlyNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    assert constant != null : "Expected the value to fold: " + value;
    Value result;
    if (constant instanceof HotSpotObjectConstant) {
        result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitLoadObjectAddress(constant);
    } else if (constant instanceof HotSpotMetaspaceConstant) {
        result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitLoadMetaspaceAddress(constant, action);
    } else {
        throw new PermanentBailoutException("Unsupported constant type: " + constant);
    }
    gen.setResult(this, result);
}
Also used : HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value) HotSpotObjectConstant(jdk.vm.ci.hotspot.HotSpotObjectConstant) HotSpotMetaspaceConstant(jdk.vm.ci.hotspot.HotSpotMetaspaceConstant) PermanentBailoutException(org.graalvm.compiler.core.common.PermanentBailoutException)

Example 9 with HotSpotMetaspaceConstant

use of jdk.vm.ci.hotspot.HotSpotMetaspaceConstant in project graal by oracle.

the class LoadMethodCountersIndirectlyNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    assert constant != null : "Expected the value to fold: " + value;
    Value result;
    if (constant instanceof HotSpotMetaspaceConstant) {
        result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitLoadMetaspaceAddress(constant, HotSpotConstantLoadAction.LOAD_COUNTERS);
    } else {
        throw new PermanentBailoutException("Unsupported constant type: " + constant);
    }
    gen.setResult(this, result);
}
Also used : Value(jdk.vm.ci.meta.Value) HotSpotMetaspaceConstant(jdk.vm.ci.hotspot.HotSpotMetaspaceConstant) PermanentBailoutException(org.graalvm.compiler.core.common.PermanentBailoutException)

Aggregations

HotSpotMetaspaceConstant (jdk.vm.ci.hotspot.HotSpotMetaspaceConstant)9 Value (jdk.vm.ci.meta.Value)5 PermanentBailoutException (org.graalvm.compiler.core.common.PermanentBailoutException)4 HotSpotLIRGenerator (org.graalvm.compiler.hotspot.HotSpotLIRGenerator)4 HotSpotObjectConstant (jdk.vm.ci.hotspot.HotSpotObjectConstant)3 HotSpotResolvedJavaType (jdk.vm.ci.hotspot.HotSpotResolvedJavaType)2 LIRFrameState (org.graalvm.compiler.lir.LIRFrameState)2 Call (jdk.vm.ci.code.site.Call)1 ConstantReference (jdk.vm.ci.code.site.ConstantReference)1 DataPatch (jdk.vm.ci.code.site.DataPatch)1 Infopoint (jdk.vm.ci.code.site.Infopoint)1 ResolvedJavaType (jdk.vm.ci.meta.ResolvedJavaType)1 LIRKind (org.graalvm.compiler.core.common.LIRKind)1 GraalError (org.graalvm.compiler.debug.GraalError)1 HotSpotForeignCallLinkage (org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage)1 LoadConstantIndirectlyNode (org.graalvm.compiler.hotspot.nodes.aot.LoadConstantIndirectlyNode)1 ResolveConstantNode (org.graalvm.compiler.hotspot.nodes.aot.ResolveConstantNode)1 Variable (org.graalvm.compiler.lir.Variable)1 FixedWithNextNode (org.graalvm.compiler.nodes.FixedWithNextNode)1 ValueNode (org.graalvm.compiler.nodes.ValueNode)1