# HG changeset patch # User Gilles Duboscq # Date 1380107116 -7200 # Node ID 70f43f67cdcbdc9739cc68a03a9413cf902ba4c1 # Parent bc3bb6c6ca70ca5aa126894100b885690d786d9b StubForeignCallNode is not a DeoptimizingNode diff -r bc3bb6c6ca70 -r 70f43f67cdcb graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed Sep 25 12:12:45 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed Sep 25 13:05:16 2013 +0200 @@ -616,7 +616,15 @@ @Override public Variable emitForeignCall(ForeignCallLinkage linkage, DeoptimizingNode info, Value... args) { - LIRFrameState state = !linkage.canDeoptimize() ? null : stateFor(info.getDeoptimizationState(), info.getDeoptimizationReason()); + LIRFrameState state = null; + if (linkage.canDeoptimize()) { + if (info != null) { + state = stateFor(info.getDeoptimizationState(), info.getDeoptimizationReason()); + } else { + assert needOnlyOopMaps(); + state = new LIRFrameState(null, null, null, (short) -1); + } + } // move the arguments into the correct location CallingConvention linkageCc = linkage.getOutgoingCallingConvention(); diff -r bc3bb6c6ca70 -r 70f43f67cdcb graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Sep 25 12:12:45 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Sep 25 13:05:16 2013 +0200 @@ -243,7 +243,7 @@ Variable result; if (linkage.canDeoptimize()) { - assert info != null; + assert info != null || stub != null; append(new AMD64HotSpotCRuntimeCallPrologueOp()); result = super.emitForeignCall(linkage, info, args); append(new AMD64HotSpotCRuntimeCallEpilogueOp()); diff -r bc3bb6c6ca70 -r 70f43f67cdcb graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/StubForeignCallNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/StubForeignCallNode.java Wed Sep 25 12:12:45 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/StubForeignCallNode.java Wed Sep 25 13:05:16 2013 +0200 @@ -34,11 +34,10 @@ * Node for a {@linkplain ForeignCallDescriptor foreign} call from within a stub. */ @NodeInfo(nameTemplate = "StubForeignCall#{p#descriptor/s}") -public class StubForeignCallNode extends FixedWithNextNode implements DeoptimizingNode, LIRLowerable, MemoryCheckpoint.Multi { +public class StubForeignCallNode extends FixedWithNextNode implements LIRLowerable, MemoryCheckpoint.Multi { @Input private final NodeInputList arguments; private final MetaAccessProvider runtime; - @Input private FrameState deoptState; private final ForeignCallDescriptor descriptor; @@ -71,7 +70,7 @@ assert graph().start() instanceof StubStartNode; ForeignCallLinkage linkage = gen.getRuntime().lookupForeignCall(descriptor); Value[] operands = operands(gen); - Value result = gen.emitForeignCall(linkage, this, operands); + Value result = gen.emitForeignCall(linkage, null, operands); if (result != null) { gen.setResult(this, result); } @@ -84,27 +83,4 @@ } return super.toString(verbosity); } - - @Override - public boolean canDeoptimize() { - return false; - } - - @Override - public FrameState getDeoptimizationState() { - return null; - } - - @Override - public void setDeoptimizationState(FrameState state) { - } - - @Override - public DeoptimizationReason getDeoptimizationReason() { - return null; - } - - public FrameState getState() { - return deoptState; - } }