Mercurial > hg > graal-compiler
changeset 10668:110444cbf1eb
Make FixedGuardNode a DeoptimizingNode.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 09 Jul 2013 11:58:00 +0200 |
parents | 5348b49b2a76 |
children | f11cd00d4115 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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; + } }