Search in sources :

Example 16 with PermanentBailoutException

use of org.graalvm.compiler.core.common.PermanentBailoutException 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 17 with PermanentBailoutException

use of org.graalvm.compiler.core.common.PermanentBailoutException 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

PermanentBailoutException (org.graalvm.compiler.core.common.PermanentBailoutException)17 Value (jdk.vm.ci.meta.Value)5 HotSpotMetaspaceConstant (jdk.vm.ci.hotspot.HotSpotMetaspaceConstant)4 HotSpotObjectConstant (jdk.vm.ci.hotspot.HotSpotObjectConstant)3 DebugContext (org.graalvm.compiler.debug.DebugContext)3 GraalError (org.graalvm.compiler.debug.GraalError)3 Indent (org.graalvm.compiler.debug.Indent)3 HotSpotLIRGenerator (org.graalvm.compiler.hotspot.HotSpotLIRGenerator)3 ArrayDeque (java.util.ArrayDeque)2 ArrayList (java.util.ArrayList)2 BitSet (java.util.BitSet)2 StackSlot (jdk.vm.ci.code.StackSlot)2 ValueUtil.asStackSlot (jdk.vm.ci.code.ValueUtil.asStackSlot)2 JavaConstant (jdk.vm.ci.meta.JavaConstant)2 FixedNode (org.graalvm.compiler.nodes.FixedNode)2 Block (org.graalvm.compiler.nodes.cfg.Block)2 SubstrateIntrinsicGraphBuilder (com.oracle.graal.pointsto.phases.SubstrateIntrinsicGraphBuilder)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataOutputStream (java.io.DataOutputStream)1 EnumSet (java.util.EnumSet)1