Mercurial > hg > truffle
changeset 13211:d862cb983214
Relax overly strict assertion
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Mon, 02 Dec 2013 14:19:20 -0800 |
parents | b96cc3b87e87 |
children | eb03a7335eb0 |
files | graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java Mon Dec 02 13:46:05 2013 +0100 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java Mon Dec 02 14:19:20 2013 -0800 @@ -96,6 +96,7 @@ if (n instanceof PhiNode || n instanceof ProxyNode) { ValueNode node = (ValueNode) n; if (node.kind() == Kind.Object) { + assert !(node.stamp() instanceof IllegalStamp) : "We assume all Phi and Proxy stamps are legal before the analysis"; node.setStamp(StampFactory.illegal(node.kind())); } } @@ -129,9 +130,9 @@ private static boolean checkNoIllegalStamp(StructuredGraph graph) { for (Node n : graph.getNodes()) { - if (n instanceof ValueNode) { + if (n instanceof PhiNode || n instanceof ProxyNode) { ValueNode node = (ValueNode) n; - assert !(node.stamp() instanceof IllegalStamp); + 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)."; } } return true;