# HG changeset patch # User Roland Schatz # Date 1428919422 -7200 # Node ID 343021aacd2f9328fed463018121b79d99c797bc # Parent ca13a009e38b98ce80faf8127ccbec97c6de6c7c Use isIllegal to determine whether a stamp is illegal. diff -r ca13a009e38b -r 343021aacd2f graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Sun Apr 12 22:37:16 2015 -0700 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Mon Apr 13 12:03:42 2015 +0200 @@ -304,7 +304,7 @@ } protected void emitNode(ValueNode node) { - if (Debug.isLogEnabled() && node.stamp() instanceof IllegalStamp) { + if (Debug.isLogEnabled() && node.stamp().isIllegal()) { Debug.log("This node has invalid type, we are emitting dead code(?): %s", node); } if (node instanceof LIRLowerable) { diff -r ca13a009e38b -r 343021aacd2f graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Sun Apr 12 22:37:16 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Mon Apr 13 12:03:42 2015 +0200 @@ -107,7 +107,7 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (stamp() == StampFactory.illegal(object.getKind())) { + if (stamp().isIllegal()) { // The guard always fails return new DeoptimizeNode(action, reason); } diff -r ca13a009e38b -r 343021aacd2f graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java Sun Apr 12 22:37:16 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java Mon Apr 13 12:03:42 2015 +0200 @@ -116,7 +116,7 @@ Stamp newStamp = StampFactory.declaredTrusted(type).improveWith(object().stamp()); ValueNode condition; ValueNode theValue = object; - if (newStamp instanceof IllegalStamp) { + if (newStamp.isIllegal()) { // This is a check cast that will always fail condition = LogicConstantNode.contradiction(graph()); newStamp = StampFactory.declaredTrusted(type); diff -r ca13a009e38b -r 343021aacd2f graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/InferStamps.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/InferStamps.java Sun Apr 12 22:37:16 2015 -0700 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/InferStamps.java Mon Apr 13 12:03:42 2015 +0200 @@ -88,7 +88,7 @@ for (Node n : graph.getNodes()) { if (n instanceof ValuePhiNode) { ValueNode node = (ValueNode) n; - assert !(node.stamp() instanceof IllegalStamp) : "Stamp is illegal after analysis. This is not necessarily an error, but a condition that we want to investigate (and then maybe relax or remove the assertion)."; + assert node.stamp().isLegal() : "Stamp is illegal after analysis. This is not necessarily an error, but a condition that we want to investigate (and then maybe relax or remove the assertion)."; } } return true;