# HG changeset patch # User Roland Schatz # Date 1373363880 -7200 # Node ID 110444cbf1eb5fc11654997f7802eeddb5b4fc32 # Parent 5348b49b2a76ff03bb7637ef7c07e7630cfff724 Make FixedGuardNode a DeoptimizingNode. diff -r 5348b49b2a76 -r 110444cbf1eb graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Tue Jul 09 11:57:18 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Tue Jul 09 11:58:00 2013 +0200 @@ -31,7 +31,7 @@ import com.oracle.graal.nodes.util.*; @NodeInfo(nameTemplate = "FixedGuard(!={p#negated}) {p#reason/s}") -public final class FixedGuardNode extends FixedWithNextNode implements Simplifiable, Lowerable, Node.IterableNodeType, Negatable, GuardingNode { +public final class FixedGuardNode extends DeoptimizingFixedWithNextNode implements Simplifiable, Lowerable, Node.IterableNodeType, Negatable, GuardingNode { @Input private LogicNode condition; private final DeoptimizationReason reason; @@ -106,6 +106,7 @@ FixedNode next = next(); setNext(null); DeoptimizeNode deopt = graph().add(new DeoptimizeNode(action, reason)); + deopt.setDeoptimizationState(getDeoptimizationState()); IfNode ifNode; if (negated) { ifNode = graph().add(new IfNode(condition, deopt, next, 0)); @@ -128,4 +129,14 @@ public FixedGuardNode asNode() { return this; } + + @Override + public boolean canDeoptimize() { + return true; + } + + @Override + public DeoptimizationReason getDeoptimizationReason() { + return reason; + } }